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

Cancel a prescription

Any signed in user. Moves a pending prescription to CANCELLED. Once dispensed or cancelled a prescription is refused, so a booked sale is never reversed.

POST/api/v1/prescriptions/{prescriptionId}/cancel
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Path parameters
prescriptionIdstringrequired

The prescription id to cancel.

Responses
200

Prescription cancelled

rx_idstringrequired
statusstringrequired
400

Prescription is already dispensed or cancelled

detailstringrequired
401

Not authenticated

detailstringrequired
404

Prescription not found

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X POST 'http://localhost:8000/api/v1/prescriptions/string/cancel' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "rx_id": "string",
  "status": "string"
}