GET /product_categories

GET /product_categories

Return all product categories

Query parameters

  • page integer

    requested page number

    Minimum value is 1. Default value is 1.

  • page_size integer

    requested page size

    Minimum value is 1, maximum value is 100. Default value is 12.

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • data array[object]
      Hide data attributes Show data attributes array[object]
      • id integer(int32)
      • title string
      • alias string
      • menuindex integer(int32)
      • created_at string(DateTime)
      • updated_at string(DateTime)
      • parent_id integer(int32)
      • child_categories array[object]
        Hide child_categories attributes Show child_categories attributes array[object]
        • id integer(int32)
        • title string
        • alias string
        • menuindex integer(int32)
        • created_at string(DateTime)
        • updated_at string(DateTime)
        • parent_id integer(int32)
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 500

    Server Error

GET /product_categories
curl \
 -X GET https://api.cosmily.com/api/v1/product_categories \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": 42,
      "title": "string",
      "alias": "string",
      "menuindex": 42,
      "created_at": "string",
      "updated_at": "string",
      "parent_id": 42,
      "child_categories": [
        {
          "id": 42,
          "title": "string",
          "alias": "string",
          "menuindex": 42,
          "created_at": "string",
          "updated_at": "string",
          "parent_id": 42
        }
      ]
    }
  ]
}
Response examples (200)
{
  "data": [
    {
      "id": 42,
      "title": "string",
      "alias": "string",
      "menuindex": 42,
      "created_at": "string",
      "updated_at": "string",
      "parent_id": 42,
      "child_categories": [
        {
          "id": 42,
          "title": "string",
          "alias": "string",
          "menuindex": 42,
          "created_at": "string",
          "updated_at": "string",
          "parent_id": 42
        }
      ]
    }
  ]
}