• Marketplace

marketplace
  1. Help Center
  2. Marketplace
  3. API Reference
  4. Product Categories
  5. Viewing Product Categories

Viewing Product Categories

Function

This interface is used to obtain product categories for launching products.

URI

  • URI format

    GET /v1/products/categories{?language}

    NOTE:

    Enter a question mark (?) and an ampersand (&) at the end of the URI to define multiple search criteria. You can filter all non-mandatory parameters in parameter descriptions.

  • Parameter descriptions

    Parameter

    Mandatory

    Type

    Description

    language

    No

    String

    Specifies a language, which defaults to en_US.

    • en_US: English
    • zh_CN: Chinese
  • Example
    /v1/products/categories?language=en_US

Request

  • Example

    None

Response

  • Parameter descriptions

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    Number

    Specifies a product category ID.

    name

    Yes

    String

    Specifies a product category name.

    parent_id

    Yes

    Number

    Specifies the parent ID of product categories. Value -1 indicates a root node.

  • Example
    [
      {
        "id": 1,
        "name": "Software infrastructure",
        "parent_id": -1
      },
      {
        "id": 101,
        "name": "Operating system",
        "parent_id": 1
      },
      {
        "id": 102,
        "name": "Runtime environment",
        "parent_id": 1
      },
      {
        "id": 103,
        "name": "Database and caching",
        "parent_id": 1
      },
      {
        "id": 104,
        "name": "Website environment",
        "parent_id": 1
      },
      {
        "id": 105,
        "name": "Application server",
        "parent_id": 1
      },
      {
        "id": 106,
        "name": "Management and monitoring",
        "parent_id": 1
      },
      {
        "id": 107,
        "name": "Application development",
        "parent_id": 1
      },
      {
        "id": 108,
        "name": "Network Infrastructure",
        "parent_id": 1
      }
    ]

Returned Value

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    The authentication information has not been provided or is incorrect.

    403 Forbidden

    The request was forbidden.

    404 Not Found

    The requested page was not found.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    408 Request Timeout

    The request timed out.

    500 Internal Server Error

    Failed to complete the request because an internal service error occurred.

    503 Service Unavailable

    Failed to complete the request because the system is currently unavailable.