Mediloop
DocsAPIsPrescription APICancel prescription
Prescription API

Cancel prescription

Cancel a prescription that is no longer valid or needed.

POST/prescriptions/{id}/cancelOAuth 2.0prescriptions.write200 OK

Authentication

OAuth 2.0

Required

Permissions

prescriptions.write

Required

Rate limit

300 requests / min

Default

Caching

30 seconds

Recommended

Response

200 OK

Path parameters

ParameterTypeRequiredDescription
iduuidYesPrescription identifier

Request headers

HeaderTypeRequiredDescription
Idempotency-KeystringNoPrevents duplicate cancellation

Request body

FieldTypeRequiredDescription
reasonstringNoCancellation reason
notesstringNoAdditional audit note

Example request

cURL

curl -X POST "https://api.mediloop.com/v1/prescriptions/presc_456/cancel" \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"reason":"Treatment changed"}'

Example response

200 OK
{
  "data": {"id":"presc_456","status":"cancelled"}
}

Example response

Responses use stable identifiers and lifecycle status values so clients can safely coordinate clinical and pharmacy workflows.

Errors

HTTPDescription
200Request completed successfully
201Resource/action created
400Validation error
401Authentication required
403Insufficient permission or scope
404Prescription not found
409Lifecycle or concurrency conflict
422Unprocessable clinical/request data

Workflow

draft

Created by provider

clinically_validated

Clinically validated

signed

Digitally signed

routed

Sent to pharmacy

dispensed

Dispensed to patient