Mediloop
DocsAPIsPrescription APIRoute to pharmacy
Prescription API

Route to pharmacy

Route a validated and signed prescription to the patient’s preferred pharmacy.

POST/prescriptions/{id}/routeOAuth 2.0prescriptions.route202 Accepted

Authentication

OAuth 2.0

Required

Permissions

prescriptions.route

Required

Rate limit

300 requests / min

Default

Caching

30 seconds

Recommended

Response

202 Accepted

Path parameters

ParameterTypeRequiredDescription
iduuidYesPrescription identifier

Request headers

HeaderTypeRequiredDescription
Idempotency-KeystringNoPrevents duplicate routing

Request body

FieldTypeRequiredDescription
pharmacy_iduuidNoSpecific destination pharmacy
use_default_pharmacybooleanNoUse patient default pharmacy
notesstringNoOptional note to pharmacy
notify_pharmacybooleanNoSend pharmacy notification

Example request

cURL

curl -X POST "https://api.mediloop.com/v1/prescriptions/presc_456/route" \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"pharmacy_id":"pharm_789","notify_pharmacy":true}'

Example response

202 Accepted
{
  "data": {"id":"presc_456","status":"routed","pharmacy_id":"pharm_789"}
}

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