Mediloop
DocsAPIsPrescription APIPrescription API Reference
Prescription API

Prescription API Reference

Reference for Prescription API endpoints, scopes, lifecycle transitions, response codes and resource behavior.

Base URL & authentication

Authenticated request

GET /v1/prescriptions HTTP/1.1
Host: api.mediloop.com
Authorization: Bearer $ACCESS_TOKEN
X-Tenant-Id: $TENANT_ID

Endpoints

MethodEndpointPurposeScope
POST/prescriptionsCreate draftprescriptions.write
GET/prescriptionsList prescriptionsprescriptions.read
GET/prescriptions/{id}Get prescriptionprescriptions.read
PUT/prescriptions/{id}Update draftprescriptions.write
POST/prescriptions/{id}/cancelCancel prescriptionprescriptions.write
POST/prescriptions/{id}/signSign prescriptionprescriptions.sign
POST/prescriptions/{id}/routeRoute to pharmacyprescriptions.route
GET/prescriptions/recurringRecurring treatmentsprescriptions.read
GET/prescriptions/templatesTemplatesprescriptions.templates
POST/prescriptions/{id}/dispenseRecord dispensationprescriptions.dispense
GET/prescriptions/auditAudit historyprescriptions.audit.read

Scopes

ScopePurpose
prescriptions.readRead resources
prescriptions.writeCreate/update/cancel
prescriptions.signDigital signature
prescriptions.routePharmacy routing
prescriptions.dispenseDispensation
prescriptions.audit.readAudit access

Prescription lifecycle

draft

Created by provider

clinically_validated

Clinically validated

signed

Digitally signed

routed

Sent to pharmacy

dispensed

Dispensed to patient

Status values

StatusMeaning
draftCreated and editable by the prescriber
clinically_validatedClinical checks completed
signedImmutable signed snapshot created
routedSent to a pharmacy
dispensedMedication dispensation recorded
cancelledCancelled before completion

Idempotency

Use idempotency keys for signature, routing, cancellation and dispensation where supported so network retries do not create duplicate business actions.

Response codes

HTTPMeaning
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