API Reference

Franchisees

5 endpoints· Auth: JWT or API Key
patch/api/v1/console/branches/{branchId}/franchisee JWT API Key

Assign 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

application/json
{
  "franchiseeId": "00000000-0000-0000-0000-000000000000"
}
franchiseeId
string (uuid)
—

Responses

200Success
cURL
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"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/franchisees JWT API Key

The 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

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/franchisees" \
  -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/franchisees JWT API Key

Create 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

application/json
{
  "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

200Success
cURL
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
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
put/api/v1/console/franchisees/{id} JWT API Key

Correct 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

application/json
{
  "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

200Success
cURL
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
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

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

The 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

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

Path parameters

Query parameters

Headers

Set credentials in the “Authorize” menu