Prescription API
Dispensation
Record the dispensation of medication for a signed prescription, including partial fulfilment, substitution and reimbursement data.
POST
/prescriptions/{id}/dispenseOAuth 2.0prescriptions.dispense201 CreatedAuthentication
OAuth 2.0
Required
Permissions
prescriptions.dispense
Required
Rate limit
300 requests / min
Default
Caching
30 seconds
Recommended
Response
201 Created
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Prescription identifier |
Request headers
| Header | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | No | Prevents duplicate dispensation |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| dispensed_items | array | Yes | Items dispensed |
| notes | string | No | Dispensation notes |
| pharmacy_note | string | No | Internal pharmacy note |
| substitution | object | No | Generic/brand substitution |
| delivery | object | No | Delivery information |
| reimbursement | object | No | Insurance/reimbursement data |
Example request
cURL
curl -X POST "https://api.mediloop.com/v1/prescriptions/presc_456/dispense" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"dispensed_items":[{"item_id":"item_789","quantity":1,"lot_number":"LOT-AF23B9"}],"reimbursement":{"eligible":true}}'Example response
201 Created{
"data": {"id":"disp_001","prescription_id":"presc_456","status":"dispensed"}
}Example response
Responses use stable identifiers and lifecycle status values so clients can safely coordinate clinical and pharmacy workflows.
Responses
| HTTP | Description |
|---|---|
| 200 | Request completed successfully |
| 201 | Resource/action created |
| 400 | Validation error |
| 401 | Authentication required |
| 403 | Insufficient permission or scope |
| 404 | Prescription not found |
| 409 | Lifecycle or concurrency conflict |
| 422 | Unprocessable clinical/request data |
Workflow
draftCreated by provider
clinically_validatedClinically validated
signedDigitally signed
routedSent to pharmacy
dispensedDispensed to patient