Read Product groups

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) or PENDING_DELETE.
  • supplier: Numeric Supplier ID.
  • area: Area ID.
  • scope=favorites: Count favourites in the specified area; area is required.
  • scope=order or scope=order:favorites: Count Items for an order from from_area; from_area is required, and area cannot 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 an id and default name; it may also have name_de, name_en and account_code. With expand=counts, each entry also has a numeric count.
  • cache_status: Present with a 202 response while the Item count index is being prepared. In that case the groups are returned without counts; retry later. (optional)

Status codes

  • 200 on success.
  • 202 when the Item count index is not ready for expand=counts.
  • 400 for 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 }
  ]
}