API Reference

Approval Requests

6 endpoints· Auth: JWT or API Key
get/api/v1/console/fraud/approval-requests JWT API Key

The inbox — pending first, then newest

Readable by the filer and the decider.

Capability (any)
approve_requestsorrequest_change
API key scope
cap:approve_requestsorcap:request_change (the key's owner must also hold the capability)

Query parameters

Status
string
`pending` | `approved` | `rejected`. Null shows all three.
Type
string
One of `FraudVocabularies.ApprovalType`. Null shows every type.
MineOnly
boolean
Restrict to requests this principal filed. The Admin's "what am I waiting on" view — and the list an Owner should check <i>before</i> deciding, since a request they filed themselves is one they may never decide (SRS §4.6.1, Requirement 4.3-R3).
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/fraud/approval-requests" \
  -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/fraud/approval-requests JWT API Key

File a sensitive change instead of making it.,,

Administrator only.

Nothing changes on filing — that is the whole point of the path. The row parks at `pending` and only an Owner's decision moves it.

Capability
request_change
API key scope
cap:request_change (the key's owner must also hold the capability)

Request body

application/json
{
  "type": "string",
  "summary": "string",
  "payload": "string",
  "targetType": "string",
  "targetId": "00000000-0000-0000-0000-000000000000"
}
type
string
One of `FraudVocabularies.ApprovalType`. Closed at the boundary on purpose: a request filed under a type no dispatcher knows can never be applied, so it would sit in the owner's inbox forever looking actionable.
summary
string
The human sentence the owner decides on. This is what the inbox renders.
payload
string
JSON describing the intended change. <b>Never trusted at approval time</b> (SRS §4.3): the column is just a string between filing and decision, so the module that applies the change re-parses it and re-checks entity ownership with an `(id, branchId)` lookup.
targetType
string
The entity the change applies to, e.g. `Product`, `InventoryItem`.
targetId
string (uuid)
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/fraud/approval-requests" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "type": "string",
  "summary": "string",
  "payload": "string",
  "targetType": "string",
  "targetId": "00000000-0000-0000-0000-000000000000"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/fraud/approval-requests/{id} JWT API Key

One request

Another branch's id reads as `NOT_FOUND`.

Capability (any)
approve_requestsorrequest_change
API key scope
cap:approve_requestsorcap:request_change (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Responses

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

Path parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/fraud/approval-requests/{id}/apply JWT API Key

Create apply

Complete the effect of a decided request — the retry when an approval's change did not land, and the way to carry a request approved before approvals applied their effects. Idempotent: an already-applied request answers 200 and writes nothing. The body (a note) is optional.

Capability
approve_requests
API key scope
cap:approve_requests (the key's owner must also hold the capability)
Idempotency
Send an Idempotency-Key header (a UUID you mint). A retry with the same key replays the first answer.

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "note": "string"
}
note
string
Optional context stored on `ApprovalRequest.decisionNote`. Optional on <b>both</b> verbs: unlike a fraud-case close (FR-FRD-029) the specification states no note requirement here, and inventing one would refuse a legitimate owner action.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/fraud/approval-requests/{id}/apply" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/fraud/approval-requests/{id}/approve JWT API Key

Approve., Requirement 4.3-R3

Owner only, and never one's own filing.

Approving routes the request to its type's applier — the module that owns the target entity, which re-parses the untrusted payload and re-proves branch ownership before anything is recorded — and carries the change. `effectApplied` and `appliedAt` report what actually happened; `effect.outcome` is `applied`, `already_in_effect` or `failed` (the decision stands; retry with `…/apply`). A type with no automatic effect (`other`) answers `effectApplied: false`.

Capability
approve_requests
API key scope
cap:approve_requests (the key's owner must also hold the capability)
Idempotency
Send an Idempotency-Key header (a UUID you mint). A retry with the same key replays the first answer.

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "note": "string"
}
note
string
Optional context stored on `ApprovalRequest.decisionNote`. Optional on <b>both</b> verbs: unlike a fraud-case close (FR-FRD-029) the specification states no note requirement here, and inventing one would refuse a legitimate owner action.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/fraud/approval-requests/{id}/approve" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/fraud/approval-requests/{id}/reject JWT API Key

Reject

Same gate, same self-decision bar. Owner only.

Capability
approve_requests
API key scope
cap:approve_requests (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "note": "string"
}
note
string
Optional context stored on `ApprovalRequest.decisionNote`. Optional on <b>both</b> verbs: unlike a fraud-case close (FR-FRD-029) the specification states no note requirement here, and inventing one would refuse a legitimate owner action.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/fraud/approval-requests/{id}/reject" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu