Categories (GET)#
Deprecated
Please use 'CategoryTree' instead.
Please be aware that this endpoint is now treated as deprecated. It will remain active to allow backwards-compability with already linked systems.
Read despite deprecation
To sort products into categories the endpoint api/categories
returns a fully functional category-tree.
GET api/categories
Every product contains a reference-link to its category which can then be fetched via GET api/categories
.
Parameters#
NAME | TYPE | DESCRIPTION |
---|---|---|
itemsPerPage |
integer | Optional - allows the restriction of results per page |
page |
integer | Optional - number of page (useful for paginated responses) |
Response#
If a category has no parent-elements it's a main category.
{
"@context": "/v2/api/contexts/Category",
"@id": "/v2/api/categories",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "/v2/api/categories/1",
"@type": "Category",
"id": 1,
"categoryCode": "13A",
"nameEN": "Home & Living",
"nameDE": "Leben & Wohnen",
"parent": null,
"children": [
{
"@id": "/v2/api/categories/6",
"@type": "Category",
"id": 6,
"categoryCode": "13A113B",
"nameEN": "Travelling & Shopping",
"nameDE": "Urlaub & Reisen",
"parent": "/v2/api/categories/1",
"children": [
{
"@id": "/v2/api/categories/29",
"@type": "Category",
"id": 29,
"categoryCode": "13A113B308C",
"nameEN": "Shopping Bags",
"nameDE": "Shopper",
"parent": "/v2/api/categories/6",
"children": []
},
{
"@id": "/v2/api/categories/37",
"@type": "Category",
"id": 37,
"categoryCode": "13A113B389C",
"nameEN": "Luggage",
"nameDE": "Reisegepäck",
"parent": "/v2/api/categories/6",
"children": []
},
{
"@id": "/v2/api/categories/218",
"@type": "Category",
"id": 218,
"categoryCode": "13A113B272C",
"nameEN": "Washing",
"nameDE": "Wäsche",
"parent": "/v2/api/categories/6",
"children": []
}
]
},
{
"@id": "/v2/api/categories/11",
"@type": "Category",
"id": 11,
"categoryCode": "1A9B",
"nameEN": "Fragrances",
"nameDE": "Düfte",
"parent": "/v2/api/categories/2",
"children": []
},
{
"@id": "/v2/api/categories/221",
"@type": "Category",
"id": 221,
"categoryCode": "1A156B",
"nameEN": "Specials",
"nameDE": "Aktionen",
"parent": "/v2/api/categories/2",
"children": []
}
]
}
],
"hydra:totalItems": 336,
"hydra:view": {
"@id": "/v2/api/categories?itemsPerPage=2&page=1",
"@type": "hydra:PartialCollectionView",
"hydra:first": "/v2/api/categories?itemsPerPage=2&page=1",
"hydra:last": "/v2/api/categories?itemsPerPage=2&page=168",
"hydra:next": "/v2/api/categories?itemsPerPage=2&page=2"
}
}