REST Kategorien (EN)

This REST API allows you to query category data from V8 stores.

Query category lists

Request

GET https://www.websale.de/api/categories/

Filtering options:

The request parameter "filter[parentIndex]" can be used to filter by the index of the parent category.

Example: filter[parentIndex]=123

If an empty value is specified for this parameter, the categories below the "root" (i.e. the top level of the category tree) are returned.

For the request parameter "subshop" the subshop must be specified.

Example: subshop=01-aa

Limit:

The number of categories returned can be limited with the "size" parameter.

Example: size=100

Sorting:

The sorting is specified with the parameter "sort", the values "predefined" (order as displayed in the store) and "catIndex" (ascending by category index) are allowed.

Example: sort=predefined

Examples:

// Zugriff auf bis zu 100 Unterkategorien von Kategorie 123 GET https://www.websale.de/api/categories/?filter[parentIndex]=123&size=100&subshop=deutsch GET https://www.websale.de/api/categories/?filter[parentIndex]=123&size=100&sort=predefined&subshop=deutsch // Toplevel Kategorien GET https://www.websale.de/api/categories/categories?filter[parentIndex]=&size=100&subshop=deutsch

Content-Type

application/json

Authorization-Token

requires

Response

Returns a list of categories if successful.

Example:

{ "totalCount": 1000, // Anzahl der Ergebnisse wenn size nicht greifen würde "items": [ { "parentIndex": "1337", "catIndex": "123", "name": "Erste Kategorie", "hasChildren": true, "hreflang": [ {"catIndex": "456", "subshop": "Deutsch"}, {"catIndex": "457", "subshop": "07-aa"} ]}, ... ] }

 

The "hreflang" parameter specifies the associated categories in other subshops (if the store uses the "hreflang" feature). This field is not part of the V9 REST API.

Nor is the "hasChildren" parameter, which indicates whether a category has subcategories.

Possible errors

400

Bad Request

Invalid authentication token

401

Forbidden

No authorization to call

404

Not Found

The specified subshop or category does not exist

Â