API Reference
Organizations
/api/v1/console/organizations JWT API KeyThe organisations this principal may see
Scoped to the caller's branch memberships. A solo caller legitimately gets an empty page rather than every organisation in the install.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Query parameters
| IncludeDeleted boolean | Include tombstoned rows. `manage_org` only, and silently ignored without it. |
| 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/organizations" \
-H "X-Api-Key: <YOUR_API_KEY>"Query parameters
Headers
/api/v1/console/organizations JWT API KeyCreate an organisation
The timezone is forced to `Asia/Baghdad` and the reporting currency is validated against a live active row in the registry. The new organisation has no branches yet, so it is not visible to `GET` until one is adopted — M:Panoptes.Api.Controllers.V1.Console.Tenancy.OrganizationsController.AdoptBranch(System.Guid,Panoptes.Application.DTOs.Requests.Tenancy.AdoptBranchRequest,System.Threading.CancellationToken) is the next call, and the create response carries the id it needs.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Request body
{
"name": "string",
"nameAr": "string",
"reportingCurrencyCode": "string"
}| name string | — |
| nameAr string | — |
| reportingCurrencyCode string | The <b>presentation</b> currency of consolidated roll-ups — never the currency anything is transacted in (FR-TEN-001). The branch's `baseCurrencyCode` is the functional one; the two are equal on every shipped install and the point of naming them apart is that a mixed-currency organisation becomes representable and detectable rather than an unstated assumption (§5.1.11 limitation 15). |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/organizations" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"reportingCurrencyCode": "string"
}'Request body (JSON)
Headers
/api/v1/console/organizations/{id} JWT API KeyOne organisation
Outside the visible set it reads as NOT_FOUND.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/organizations/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/organizations/{id} JWT API KeyRename or re-denominate an organisation.,
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"name": "string",
"nameAr": "string",
"reportingCurrencyCode": "string",
"active": false
}| name string | — |
| nameAr string | — |
| reportingCurrencyCode string | — |
| active boolean | — |
Responses
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/organizations/{id}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"reportingCurrencyCode": "string",
"active": false
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/organizations/{id} JWT API KeyRetire an organisation
A tombstone with a mandatory reason, never a `DELETE`, and refused while any live branch, region, group or legal entity still points at it — the message names which.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | — |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/organizations/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/organizations/{id}/branches JWT API KeyAdopt one of the caller's branches into this organisation
Route note. spells this as a write to the branch (`attachBranchToOrg`). It is exposed here, on the organisation, because `BranchesController` is a shipped surface this slice does not own — and because the resource being extended is the organisation's branch set, which is what the URI now says. The semantics are unchanged: `regionId` is written on every call as `regionId ?? null`, so an omitted region clears a prior one, and the previous `organizationId` is recorded as the audit `oldValue` under `ATTACH_BRANCH_TO_ORG`.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"branchId": "00000000-0000-0000-0000-000000000000",
"regionId": "00000000-0000-0000-0000-000000000000"
}| branchId string (uuid) | The branch to adopt. It must be one the caller is a member of; anything else reads as `NOT_FOUND`. This is not a tenancy key supplied by the body — it is a <i>selection</i> from the caller's own membership set, which the service re-proves before writing. |
| regionId string (uuid) | The region to place the branch in, or null for none. FR-TEN-031 is explicit that this is written on <b>every</b> call as `regionId ?? null` — omitting it <b>clears</b> a prior region rather than leaving it alone. Kept faithful, because a partial-update reading here would silently disagree with the reference and with the screen built against it. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/organizations/{id}/branches" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"branchId": "00000000-0000-0000-0000-000000000000",
"regionId": "00000000-0000-0000-0000-000000000000"
}'Path parameters
Request body (JSON)
Headers