Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Request a manager approval

Any signed in user. Files a pending approval for an override the till cannot grant. Branch comes from the session unless branch_id names another, and the caller is the requester.

POST/api/v1/approvals
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Request body
requiredapplication/json
branch_idstring
kindstring
reference_idstring
reasonstring
Responses
201

Approval filed as pending

idstringrequired
branch_idstringrequired
kindstringrequired
reference_idstringrequired
requested_bystringrequired
approved_bystring | nullrequired
statusstringrequired
reasonstringrequired
created_atstringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/approvals' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "branch_id": "string",
  "kind": "string",
  "reference_id": "string",
  "reason": "string"
}'
Response
{
  "id": "string",
  "branch_id": "string",
  "kind": "string",
  "reference_id": "string",
  "requested_by": "string",
  "approved_by": "string",
  "status": "string",
  "reason": "string",
  "created_at": "string"
}