API Reference
Vocabularies
/api/v1/console/settings/vocabularies JWT API KeyThe vocabularies this surface serves, with the capability each write needs
The table of contents for the single vocabulary-admin screen. It exists so the console does not hard-code a list of eleven tables that then drifts from the server's ten.
- API key scope
- Any key holding a cap: scope (a read every signed-in role can make).
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies" \
-H "X-Api-Key: <YOUR_API_KEY>"Headers
/api/v1/console/settings/vocabularies/{vocabulary} JWT API KeyOne vocabulary's rows, ordered `(active, sortOrder)`
An unrecognised `{vocabulary}` is `NOT_FOUND` with the served list in the message — never the nearest match.
- API key scope
- Any key holding a cap: scope (a read every signed-in role can make).
Path parameters
| vocabularyrequired string | — |
Query parameters
| Active boolean | Filter on the picker flag. Null returns both. <br>FR-PLT-120 makes `active = false` the <b>retirement</b> of a value that has history: it leaves every picker while every row already pointing at it keeps resolving its `name` and `nameAr`. A picker asks for `true`; the settings screen asks for both, because a retired row is still something an operator must be able to see and un-retire. |
| IncludeDeleted boolean | Include tombstoned rows. Gated on the vocabulary's write capability in the service. <br>A tombstone means "this row was entered in error" and is a different state from Panoptes.Application.DTOs.Requests.Platform.ListVocabularyRowsRequest.Active (FR-PLT-120). 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
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Query parameters
Headers
/api/v1/console/settings/vocabularies/{vocabulary} JWT API KeyAdd a merchant row
arm (b),.
`isSystem` and `branchId` are not on the request: the first marks a platform seed, the second would mint a row every other branch inherits.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
Request body
{
"code": "string",
"name": "string",
"nameAr": "string",
"sortOrder": 0,
"active": false,
"metadata": "string"
}| code string | The stable machine key, unique per `(branchId, code)` among live rows (FR-PLT-121). <br>Case is normalised by the service <b>per vocabulary</b> and not by a single global rule: `uom` and `leave_type` are lower-case (`kg`, `annual`), while `payment_method`, `capacity_type` and `role` are upper-case (`CASH`, `CHICKEN_QUARTER`, `OWNER`) because live code compares those with `StringComparer.Ordinal` against upper-case literals. Send it in either case; the service decides. |
| name string | — |
| nameAr string | Arabic label. <b>Required</b> — FR-ALL-017 makes `nameAr` NOT NULL on every one of the eleven tables, because "a picker that falls back to English for some rows is broken in the language most operators read". |
| sortOrder integer (int32) | Position in the picker. FR-PLT-121 orders every vocabulary by `(active, sortOrder)`. |
| active boolean | Whether the row appears in pickers straight away. Defaults to true. |
| metadata string | The per-vocabulary `jsonb` payload (FR-ALL-016). <br>Its keys are the vocabulary's business, not this DTO's: `payment_method` carries `{"settlesAs":"cash"}`, which is what decides whether a tender is expected in the physical drawer at shift count; `uom` carries `{"dimension":"mass","toBase":1000}`; `leave_type` carries `{"paid":true}`. A JSON <b>object</b>, sent as a raw document. Null or blank becomes `{}` — the column is NOT NULL. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}" \
-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"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/{id} JWT API KeyOne row
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
| vocabularyrequired string | — |
| idrequired string (uuid) | — |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/{id} JWT API KeyEdit labels, order, the `active` flag and the metadata payload.,
A `PATCH` as well as a `PUT`, because every field is optional and a null means "leave it alone" — the `PUT` spelling is accepted for the module routes' convention and behaves identically. `code` and `isSystem` are not on the request at all.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
| idrequired string (uuid) | — |
Request body
{
"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-PLT-120 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
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/{id}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"sortOrder": 0,
"active": false,
"metadata": "string"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/{id} JWT API KeyEdit labels, order, the `active` flag and the metadata payload.,
A `PATCH` as well as a `PUT`, because every field is optional and a null means "leave it alone" — the `PUT` spelling is accepted for the module routes' convention and behaves identically. `code` and `isSystem` are not on the request at all.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
| idrequired string (uuid) | — |
Request body
{
"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-PLT-120 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
curl -X PATCH "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/{id}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"sortOrder": 0,
"active": false,
"metadata": "string"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/{id} JWT API KeyTombstone a row entered in error.,
Deliberately narrow, and never a synonym for retirement: a platform-seeded row, a platform-wide row and a row anything references are all refused with `CONFLICT` naming retirement as the act that was meant. The reason is mandatory.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
| idrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | — |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/{id}/active JWT API KeyRetire or un-retire a row
Its own route rather than a field on the edit, because forbids substituting retirement for a tombstone and a checkbox buried in a form is how the two get confused.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
| idrequired string (uuid) | — |
Request body
{
"active": false,
"reason": "string"
}| active boolean | — |
| reason string | Optional note, recorded on the audit row. <br>Not mandatory, unlike the tombstone's reason: retirement is reversible and loses nothing, so demanding prose for it would train operators to type "x" — which is worse than no field, because it looks like a reason in the log. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/{id}/active" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"active": false,
"reason": "string"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/settings/vocabularies/{vocabulary}/reorder JWT API KeyRe-sort a vocabulary in one transaction.,
Declared before `{id:guid}` only for readability; the route constraint already keeps `reorder` and a guid from colliding.
- Capability (any)
manage_settingsormanage_inventory_itemsormanage_hr_settingsoredit_batchorchange_commissionormanage_api_keysormanage_users- API key scope
cap:manage_settingsorcap:manage_inventory_itemsorcap:manage_hr_settingsorcap:edit_batchorcap:change_commissionorcap:manage_api_keysorcap:manage_users(the key's owner must also hold the capability)
Path parameters
| vocabularyrequired string | — |
Request body
{
"order": [
{
"id": "00000000-0000-0000-0000-000000000000",
"sortOrder": 0
}
]
}| order VocabularyOrderEntry[] | The rows to move, with their new positions. Rows absent from the list are left alone. <br>Positions are not required to be contiguous or unique — the seeder itself spaces `sortOrder` by ten so a merchant can insert between two seeded rows without renumbering the list, and rejecting a gap would break that. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/settings/vocabularies/{vocabulary}/reorder" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"order": [
{
"id": "00000000-0000-0000-0000-000000000000",
"sortOrder": 0
}
]
}'Path parameters
Request body (JSON)
Headers