Prescription API
Audit & History
Retrieve the immutable audit trail and history of prescription events for compliance, traceability and accountability.
GET
/prescriptions/auditOAuth 2.0prescriptions.audit.read200 OKAuthentication
OAuth 2.0
Required
Permissions
prescriptions.audit.read
Required
Rate limit
600 requests / min
Default
Caching
30 seconds
Recommended
Response
200 OK
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prescription_id | uuid | No | Filter by prescription |
| patient_id | uuid | No | Filter by patient |
| event_type | string | No | Filter by event type |
| from | date-time | No | Start timestamp |
| to | date-time | No | End timestamp |
Event types
| Event | Meaning |
|---|---|
| prescription.created | Draft created |
| prescription.validated | Clinical validation completed |
| prescription.updated | Draft changed |
| prescription.signed | Immutable snapshot signed |
| prescription.routed | Sent to pharmacy |
| prescription.dispensed | Dispensation recorded |
| prescription.cancelled | Prescription cancelled |
Audit record
| Field | Meaning |
|---|---|
| event_id | Audit event identifier |
| prescription_id | Prescription reference |
| actor_id | User/membership responsible |
| event_type | Immutable event name |
| occurred_at | Timestamp |
| request_id | Correlation identifier |
| metadata | Non-clinical audit context |
Example request
Audit query
curl -X GET "https://api.mediloop.com/v1/prescriptions/audit?prescription_id=presc_456" \
-H "Authorization: Bearer $ACCESS_TOKEN"Example response
200 OK{"data":[{"event_id":"evt_001","prescription_id":"presc_456","event_type":"prescription.signed","occurred_at":"2026-08-19T10:15:30Z"}]}Example response
Audit records are append-only and should not expose mutable clinical data that can drift from the signed prescription snapshot.
Compliance notes
Use audit history for traceability and legal/compliance review. Access to audit events remains permission- and tenant-scoped.