GET /categories
Read the ordered Product groups in your account. An Item's category is the Product group id; use it to filter Items or assign a group. The default response lists all saved groups without pagination or Item counts.
Query parameters
Set expand=counts to add each group's Item count. Only then do the following optional filters affect the counts; they never remove saved groups from the response:
status:ACTIVE,INACTIVE(archived Items) orPENDING_DELETE.supplier: Numeric Supplier ID.area: Area ID.scope=favorites: Count favourites in the specifiedarea;areais required.scope=orderorscope=order:favorites: Count Items for an order fromfrom_area;from_areais required, andareacannot be combined with either scope.division: Division ID for an order scope.
If expand=counts finds Items without a Product group, the response also includes a temporary entry with id: "cat_UNASSIGNED", name: "–" and its count. This entry is not a saved Product group and is absent from the default response. Use cat_UNASSIGNED as an Item's category or with the Item-list category filter, but do not include it when saving Product groups.
Response properties
categories: The ordered array of Product groups. Each has anidand defaultname; it may also havename_de,name_enandaccount_code. Withexpand=counts, each entry also has a numericcount.cache_status: Present with a202response while the Item count index is being prepared. In that case the groups are returned without counts; retry later. (optional)
Status codes
200on success.202when the Item count index is not ready forexpand=counts.400for invalid query parameters or missing parameters required by a scope.
Example request and response
GET /categories?expand=counts&status=ACTIVE
{
"categories": [
{ "id": "cat_KaNDv51Gh0", "name": "Spirits", "count": 12 },
{ "id": "cat_myTRpvnsNb", "name": "Food", "count": 0 }
]
}