Mediloop
DocsAPIsPrescription APIAudit & History
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 OK

Authentication

OAuth 2.0

Required

Permissions

prescriptions.audit.read

Required

Rate limit

600 requests / min

Default

Caching

30 seconds

Recommended

Response

200 OK

Query parameters

ParameterTypeRequiredDescription
prescription_iduuidNoFilter by prescription
patient_iduuidNoFilter by patient
event_typestringNoFilter by event type
fromdate-timeNoStart timestamp
todate-timeNoEnd timestamp

Event types

EventMeaning
prescription.createdDraft created
prescription.validatedClinical validation completed
prescription.updatedDraft changed
prescription.signedImmutable snapshot signed
prescription.routedSent to pharmacy
prescription.dispensedDispensation recorded
prescription.cancelledPrescription cancelled

Audit record

FieldMeaning
event_idAudit event identifier
prescription_idPrescription reference
actor_idUser/membership responsible
event_typeImmutable event name
occurred_atTimestamp
request_idCorrelation identifier
metadataNon-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.