Save Product groups

PUT /categories

Save the complete, ordered list of Product groups in your account. This is a replacement, not an add-one-group request: first read the current list without counts, make your changes, then send every saved group you want to keep. The array order is the order shown in the app. Your API token needs full account-level Items permission to make this request.

Request properties

  • categories: Array of Product group objects. It may be empty if no groups need to remain. Each object has:
    • id: Required Product group ID in the format cat_ followed by ten letters, digits, _ or -. Keep an existing group's ID when editing it; use a new unique ID when adding a group.
    • name: Required, non-empty default name.
    • name_de: German name shown in the app when provided. (optional)
    • name_en: English name shown in the app when provided. (optional)
    • account_code: Accounting code for the group. (optional)

Do not send count, cache_status or cat_UNASSIGNED; these can appear in an expanded read response but are not saved Product group data. Omitted saved groups are removed. The request fails if a group you remove still belongs to an Item that has not been deleted, including an archived Item. If only deleted Items still reference a removed group, the request succeeds and their cleanup is queued.

Status codes

  • 200 on success
  • 400 for invalid data, an empty name, or removing a group still used by a non-deleted Item.
  • 403 if the API token lacks the required Items permission.

Response properties

categories contains the saved array in the order sent.

Example request

This retains both existing groups from the read example and adds another:

{
  "categories": [
    {
      "id": "cat_KaNDv51Gh0",
      "name": "Spirits"
    },
    {
      "id": "cat_myTRpvnsNb",
      "name": "Food"
    },
    {
      "id": "cat_EXAMPLE123",
      "name": "Soft drinks",
      "name_de": "Softdrinks"
    }
  ]
}

Example response

{
  "categories": [
    { "id": "cat_KaNDv51Gh0", "name": "Spirits" },
    { "id": "cat_myTRpvnsNb", "name": "Food" },
    { "id": "cat_EXAMPLE123", "name": "Soft drinks", "name_de": "Softdrinks" }
  ]
}