API Reference
Export Presets
/api/v1/console/settings/export-presets JWT API KeyThe branch's live presets, grouped by domain then name
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Query parameters
| Domain string | Restrict to one export domain. Absent lists every domain. |
| ImportCompatible boolean | Restrict to presets whose columns round-trip through the import pipeline. |
| 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/export-presets" \
-H "X-Api-Key: <YOUR_API_KEY>"Query parameters
Headers
/api/v1/console/settings/export-presets JWT API KeySave one
An upsert on `(branchId, domain, name)`: re-saving under a name that already exists in the branch updates it, which is what a column picker needs. Refuses an unknown domain, a blank name and — — a selection with no fields.
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Request body
{
"domain": "string",
"name": "string",
"fields": [
"string"
],
"importCompatible": false
}| domain string | The export domain the preset selects columns for. Must name one of the domains this build actually exports — an unknown one would store a selection no route could ever read. |
| name string | The operator's name for the preset. Trimmed; unique per branch and domain. |
| fields string[] | The <b>ordered</b> column keys (FR-API-106: at least one). Order is the column order of the artifact, so it is preserved through de-duplication rather than sorted. |
| importCompatible boolean | True when the selected columns round-trip back through the bulk-import parser (FR-RPT-110). A declaration by the operator, not something this build verifies — see the service's note. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/settings/export-presets" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"domain": "string",
"name": "string",
"fields": [
"string"
],
"importCompatible": false
}'Request body (JSON)
Headers
/api/v1/console/settings/export-presets/{id} JWT API KeyRetire one by tombstone
The unique index is partial (`WHERE deleted_at IS NULL`), so the retired `(branchId, domain, name)` becomes reusable immediately rather than being reserved forever. A preset in another branch reads as `NOT_FOUND`.
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | Required, and recorded in the audit row. |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/settings/export-presets/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/settings/export-presets/{id}/run JWT API KeyCreate run
Run a preset: the domain's report over `preset` or `from`/`to`, with only the preset's columns, as `xlsx` (default) or `csv`.
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"preset": "string",
"from": "2026-11-27",
"to": "2026-11-27",
"fromTime": "string",
"toTime": "string",
"format": "string"
}| preset string | — |
| from string (date) | — |
| to string (date) | — |
| fromTime string | Optional start time, `HH:mm` Baghdad local, on `from`. Honoured when the preset's report is order-based; otherwise the file header says `timeFilterApplied: false`. 422 on a bad format. |
| toTime string | Optional end time, `HH:mm` Baghdad local, on `to`, end minute inclusive. Start must be <= end (else 422). |
| format string | `xlsx` (default) | `csv`. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/settings/export-presets/{id}/run" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"preset": "string",
"from": "2026-11-27",
"to": "2026-11-27",
"fromTime": "string",
"toTime": "string",
"format": "string"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/settings/export-presets/domains JWT API KeyThe export domains a preset may name
Served from the server's own closed list so the settings screen renders a picker rather than keeping a second copy of it — a second copy of a closed vocabulary is a second copy that drifts, and a preset naming a domain no export route builds would be a saved selection nothing could ever read.
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/settings/export-presets/domains" \
-H "X-Api-Key: <YOUR_API_KEY>"Headers
/api/v1/console/settings/export-presets/domains/{domain}/fields JWT API KeyThe columns a domain's report offers
- Capability
manage_settings- API key scope
cap:manage_settings(the key's owner must also hold the capability)
Path parameters
| domainrequired string | — |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/settings/export-presets/domains/{domain}/fields" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers