API Reference
Franchisees
/api/v1/console/branches/{branchId}/franchisee JWT API KeyAssign a branch to a franchisee, or unassign it with a null id
Why this route is absolute. The resource being written is the branch — `Branch.franchiseeId` — so the published route is `branches/{id}/franchisee`. It is served here rather than from `BranchesController` because the write is the franchise membership wall and belongs beside the rest of it; splitting the wall across two services is how one half of it gets forgotten.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| branchIdrequired string (uuid) | — |
Request body
{
"franchiseeId": "00000000-0000-0000-0000-000000000000"
}| franchiseeId string (uuid) | — |
Responses
curl -X PATCH "https://staging-api.panoptesos.com/api/v1/console/branches/{branchId}/franchisee" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"franchiseeId": "00000000-0000-0000-0000-000000000000"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/franchisees JWT API KeyThe organisation's franchisees, each with the branches it owns
The organisation boundary is the query scope, so a franchisee of another organisation never appears — and neither does a branch of one under a franchisee that does.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Query parameters
| Active boolean | Filter by the operational suspension flag. Orthogonal to retirement (FR-TEN-119). |
| 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/franchisees" \
-H "X-Api-Key: <YOUR_API_KEY>"Query parameters
Headers
/api/v1/console/franchisees JWT API KeyCreate a franchisee.,
The organisation is the caller's own, resolved from the token. The royalty rate is an integer number of basis points and is refused outside `0 … 10000` in the validator and in the service.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Request body
{
"name": "string",
"nameAr": "string",
"royaltyPctBp": 0
}| name string | — |
| nameAr string | — |
| royaltyPctBp integer (int32) | The agreed royalty in <b>basis points</b> — `500` is 5.00%. <br>An integer, not a percentage and not a decimal. A royalty is a rate applied to somebody else's sales and billed to them; held as a float and multiplied across a year, it is a dispute waiting to be discovered (BR-038). Basis points make 5.5% exactly `550`. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/franchisees" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"royaltyPctBp": 0
}'Request body (JSON)
Headers
/api/v1/console/franchisees/{id} JWT API KeyCorrect a franchisee's name, rate or suspension flag
- 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",
"royaltyPctBp": 0,
"active": false
}| name string | — |
| nameAr string | — |
| royaltyPctBp integer (int32) | — |
| active boolean | The operational suspension flag. A suspended franchisee is still live data (FR-TEN-119) — it is not a retirement mechanism. |
Responses
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/franchisees/{id}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"name": "string",
"nameAr": "string",
"royaltyPctBp": 0,
"active": false
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/franchisees/{id}/royalty-statement JWT API KeyThe royalty owed for a period.,,
Computed over the intersection of the franchisee's branches with the caller's visible set, on the net-sales denominator, with a single rounding step. The response publishes how many owned branches fell outside the caller's visibility, so a partial statement is never mistaken for a complete one.
- Capability
manage_org- API key scope
cap:manage_org(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Query parameters
| From string (date) | — |
| To string (date) | — |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/franchisees/{id}/royalty-statement" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Query parameters
Headers