Skip to content
Developers
Pilot. The API is open to a small number of organisations and may change — every change is in the changelog.

Reference · Categories

Update a category

PATCH/v1/sites/{siteId}/categories/{code}

Renames a category, or retires it or brings it back. Only the fields sent change. A category is never deleted: retire it with active false.

Needs Catalogue: writeChanges live data

Path

  • siteIdrequired

    The site, from GET /v1/sites.

    string

  • coderequired

    The record's code.

    string

Headers

  • Authorizationrequired

    An API key from Automation > Access in the Dnero portal, sent as Authorization: Bearer <key>.

    string

Body

  • active

    False to retire the category, true to bring it back. A retired category is kept, so history and reports that use it are unaffected.

    boolean

  • name

    A new name.

    string · 1–200 characters

Responses

200 OK

  • activerequired

    False for a retired category, which is listed only with includeInactive.

    boolean

  • coderequired

    The category's code, the same at every site that has it.

    string

  • namerequired

    The category's name.

    string

  • orderrequired

    Where the category sits among the site's others, lowest first.

    integer

  • defaultCourseCode

    The course a product in this category goes to the kitchen with, unless the product says otherwise.

    string

  • updatedAt

    When the category last changed. Absent for one that has not changed since this was recorded.

    string · date-time