Mediloop
DocsAPIsPrescription APIDispensation
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 Created

Authentication

OAuth 2.0

Required

Permissions

prescriptions.dispense

Required

Rate limit

300 requests / min

Default

Caching

30 seconds

Recommended

Response

201 Created

Path parameters

ParameterTypeRequiredDescription
iduuidYesPrescription identifier

Request headers

HeaderTypeRequiredDescription
Idempotency-KeystringNoPrevents duplicate dispensation

Request body

FieldTypeRequiredDescription
dispensed_itemsarrayYesItems dispensed
notesstringNoDispensation notes
pharmacy_notestringNoInternal pharmacy note
substitutionobjectNoGeneric/brand substitution
deliveryobjectNoDelivery information
reimbursementobjectNoInsurance/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

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