API Reference

Product Categories

5 endpoints· Auth: JWT or API Key
get/api/v1/console/product-categories JWT API Key

The branch's categories, with per-branch product counts.,

Ordered by `sortOrder` then `name` — the merchant's own order, decided on the row. A client that re-sorted this alphabetically would render a picker that disagrees with every other client about where a category sits.

API key scope
Any key holding a cap: scope (a read every signed-in role can make).

Query parameters

Active
boolean
Filter on the picker flag. Null returns both. <br>`active = false` is the FR-ALL-017 retirement: the row leaves every picker and every historical `Product.categoryId` still resolves through it. The products screen asks for `true`; the settings screen asks for both.
IncludeDeleted
boolean
Include tombstoned rows. Gated on `edit_recipe` in the service. <br>A tombstone on a reference table means "this row was entered in error" and is a different state from Panoptes.Application.DTOs.Requests.Catalog.ListProductCategoriesRequest.Active (FR-ALL-017). Defaulting it on would put a mistake back into every picker it was hidden from.
Page
integer (int32)
—
PerPage
integer (int32)
—
Search
string
Free-text filter. Its meaning is per-resource and documented on the endpoint.
Skip
integer (int32)
Rows to skip, derived — never sent by the caller on this surface.
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/product-categories" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/product-categories JWT API Key

Add a merchant category.,,

The API scope `write:catalog` maps to `edit_recipe`, so an API credential can never do more here than an Owner could. Effective permission is scope AND capability.

Capability
edit_recipe
API key scope
cap:edit_recipe (the key's owner must also hold the capability)
Public scope
write:catalog

Request body

application/json
{
  "code": "string",
  "name": "string",
  "nameAr": "string",
  "sortOrder": 0,
  "active": false,
  "metadata": "string"
}
code
string
The stable key. Lower-cased and trimmed by the service, unique per branch among live rows. <br>It is the value `ProductService` reads to map the four seeded codes onto a production strategy (FR-CAT-003) and the value FR-CAT-088 groups the sales-by-type report on, which is why the service refuses to change it afterwards.
name
string
—
nameAr
string
Arabic label. <b>Required</b> — FR-ALL-017 makes `nameAr` NOT NULL on every reference table, because "a picker that falls back to English for some rows is broken in the language most operators read".
sortOrder
integer (int32)
Display order in the picker. Ties break on `name`.
active
boolean
Whether the row appears in pickers straight away. Defaults to true.
metadata
string
The per-vocabulary `jsonb` payload (FR-ALL-016). <br>For `product_category` it carries the behavioural mapping a merchant-added category needs: `{"strategy":"MADE_TO_ORDER","productType":"SELLABLE_DISH"}`. FR-CAT-003 is explicit that a category with no declared strategy must fail product creation "rather than falling through silently" — so omitting this is legal here and refused there, and the create response says so rather than leaving the operator to discover it later.<br>A JSON <b>object</b>, sent as a raw document. Null or blank becomes `{}`.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/product-categories" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "code": "string",
  "name": "string",
  "nameAr": "string",
  "sortOrder": 0,
  "active": false,
  "metadata": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/product-categories/{id} JWT API Key

One category

A row in another branch reads as `NOT_FOUND`.

API key scope
Any key holding a cap: scope (a read every signed-in role can make).

Path parameters

idrequired
string (uuid)
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/product-categories/{id}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
patch/api/v1/console/product-categories/{id} JWT API Key

Edit labels, order, the `active` flag and the metadata payload

A `PATCH` and not a `PUT`, because every field is optional and a null means "leave it alone" — a `PUT` would make an omitted `nameAr` a blanking instruction. `code` and `isSystem` are not on the request at all: the first is the key behaviour and reporting are grouped by, the second is a platform seed marker and is not self-service.

Capability
edit_recipe
API key scope
cap:edit_recipe (the key's owner must also hold the capability)
Public scope
write:catalog

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "name": "string",
  "nameAr": "string",
  "sortOrder": 0,
  "active": false,
  "metadata": "string"
}
name
string
—
nameAr
string
Arabic label. May be changed, never blanked (FR-ALL-017 makes it NOT NULL).
sortOrder
integer (int32)
—
active
boolean
The FR-ALL-017 retirement switch. `false` withdraws the row from pickers and leaves every historical reference resolvable — it is <b>not</b> a delete and never becomes one.
metadata
string
Replace the `jsonb` payload wholesale. A JSON object; never merged.

Responses

200Success
cURL
curl -X PATCH "https://staging-api.panoptesos.com/api/v1/console/product-categories/{id}" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "name": "string",
  "nameAr": "string",
  "sortOrder": 0,
  "active": false,
  "metadata": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
delete/api/v1/console/product-categories/{id} JWT API Key

Tombstone a category entered in error

Deliberately narrow, and never a synonym for `active = false`: a platform row and a row any product references are both refused with `CONFLICT` naming deactivation as the action that was meant. The reason is mandatory — in the request, in the validator, and in a database CHECK.

Capability
edit_recipe
API key scope
cap:edit_recipe (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "reason": "string"
}
reason
string
—

Responses

200Success
cURL
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/product-categories/{id}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu