LTP Sports

API Reference · v1

Categories

GET/Catalog/Categories

List all categories

Returns the category hierarchy (categories and sub-categories). Names are returned in the language specified by the 'language' header.

Parameters

NameInTypeRequiredDescription
languageheaderstring | nullOptional(default: en)

Request

GET/Catalog/Categories
GET https://api.ltpdealer.com/v1/Catalog/Categories
Authorization: ApiKey <prefix>.<secret>
language: en

Response

200Successful Response
{
  "categories": [
    {
      "children": [
        {
          "children": [
            {
              "children": [],
              "id": "LIFESTYLE",
              "level": 2,
              "name": "LIFESTYLE",
              "parent_id": "CITY",
              "type": "subcategory"
            }
          ],
          "id": "CITY",
          "level": 1,
          "name": "CITY",
          "parent_id": "01",
          "type": "category"
        }
      ],
      "id": "01",
      "level": 0,
      "name": "01",
      "type": "category_group"
    },
    {
      "children": [
        {
          "children": [
            {
              "children": [],
              "id": "BOTTOM BRACKETS",
              "level": 2,
              "name": "BOTTOM BRACKETS",
              "parent_id": "BB",
              "type": "subcategory"
            },
            {
              "children": [],
              "id": "SMALL PARTS",
              "level": 2,
              "name": "SMALL PARTS",
              "parent_id": "BB",
              "type": "subcategory"
            }
          ],
          "id": "BB",
          "level": 1,
          "name": "BOTTOM BRACKETS",
          "parent_id": "03",
          "type": "category"
        }
      ],
      "id": "03",
      "level": 0,
      "name": "03",
      "type": "category_group"
    }
  ]
}
FieldTypeDescription
categoriesarray<CategoryNode>
422Validation Error
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "Message",
      "type": "Error Type"
    }
  ]
}
FieldTypeDescription
detailarray<ValidationError>

Code Examples

curl -X GET "https://api.ltpdealer.com/v1/Catalog/Categories" \
  -H "Authorization: ApiKey <prefix>.<secret>" \
  -H "language: en"