Breadcrumbs

/feeds/categories-tree

The /feeds/categories-tree endpoints retrieve all categories you have access through KelkooGroup network along with some details about them.

The structure can be a list or a tree.

There are two main use cases for retrieving the categories:

  • you want to display more information about the categories related to offers from Offer search

  • you are using Offer feeds and you need to know the list of available categories.

The id field is the identifier of a category in KelkooGroup systems and can be used with other resources. For instance, this identifier must be used when retrieving an offers feed to filter by a category.

Data freshness

The categories do not change much. You can retrieve this resource once a day, it's enough.

Endpoints

/feeds/categories-tree: retrieve the categories as a tree.

See Request builder

Authentication

See JWT details

Compressed data

Please note that you should ask for compressed data, otherwise you will receive an error 406 Not Acceptable.

Most HTTP client libraries offer a setting to transparently activate compression when configuring the client. See below in the HTTP Headers section how to do it manually.

Query parameters

Name

Type

Domain

Default

Description

Example

country*

string



Country filter

country=fr

format

string

{'json','xml','csv'}

'json'

Output format. Can be specified in the headers. 'csv' is not available as a tree for obvious reasons.

format=xml

HTTP headers

Name

Type

Domain

Default

Description

Example

Accept-Encoding

string

{'gzip'}


You have to request compressed data. This is the way to do it.

Accept-Encoding: gzip

Accept

string

{'application/json', 'application/xml', 'text/csv'}


Output format. Can be specified in the parameters. The http parameters wins.

Accept: application/json

Response

The response can be either

  • in json, in xml

To handle properly this stream, please follow the streaming guide.

In JSON, a category tree is represented as follows

JSON format

JSON
{
  "id": 601,
  "format": "Tree",
  "category": {
    "id": 601,
    "name": "Home Page",
    "ancestorIds": [
      601
    ],
    "offensive": false,
    "categories": [
      {
        "id": 128701,
        "name": "Alimentation, boissons et tabac",
        "ancestorIds": [
          128701,
          601
        ],
        "offensive": false,
        "categories": [
          {
            "id": 100567413,
            "name": "Alimentation bébé",
            "ancestorIds": [
              100567413,
              128701,
              601
            ],
            "offensive": false,
            "categories": []
          }
        ]
      },
      {
        "id": 172601,
        "name": "Auto et Moto",
        "ancestorIds": [
          172601,
          601
        ],
        "offensive": false,
        "categories": [
          {
            "id": 173001,
            "name": "Auto",
            "ancestorIds": [
              173001,
              172601,
              601
            ],
            "offensive": false,
            "categories": [
              {
                "id": 7313,
                "name": "Accessoires Auto",
                "ancestorIds": [
                  7313,
                  173001,
                  172601,
                  601
                ],
                "offensive": false,
                "categories": []
              },
              {
                "id": 100278823,
                "name": "GPS",
                "ancestorIds": [
                  100278823,
                  173001,
                  172601,
                  601
                ],
                "offensive": true,
                "categories": []
              }
            ]
          }
        ]
      },
      {
        "id": 100000,
        "name": "RandomCat",
        "ancestorIds": [
          601
        ],
        "offensive": false,
        "categories": []
      }
    ]
  }
}

XML format

XML
<category_tree xmlns="urn:kelkoo" id="601" format="Tree">
  <category id="601" name="Home Page">
    <category id="128701" name="Alimentation, boissons et tabac">
      <category id="100567413" name="Alimentation bébé"/>
    </category>
    <category id="172601" name="Auto et Moto">
      <category id="173001" name="Auto">
        <category id="7313" name="Accessoires Auto"/>
        <category id="100278823" name="GPS"/>
      </category>
    </category>
    <category id="100000" name="RandomCat"/>
  </category>
</category_tree>