Documents
Download Medical Document
Download the document file attached to an appointment
GET
Overview
Returns the raw file bytes of a document attached to an appointment. The lookup is keyed by appointment ID and scoped to the authenticated doctor, returning the first document on that appointment owned by the caller. The responseContent-Type reflects the stored file’s MIME type, so this endpoint serves PDFs and images (application/pdf, image/png, image/jpeg, image/webp).
This is a read endpoint and is not plan-gated. A document owned by another doctor is treated as not found (
404).Authentication
string
required
Bearer token for authenticated access. The doctor’s ID is extracted from the JWT token and used to scope the lookup.
Path Parameters
string
required
The appointment ID (ObjectId). Returns the first document on that appointment owned by the authenticated doctor.
Response
On success the endpoint returns the file bytes (not JSON) with download headers.header
The stored file’s MIME type — e.g.
application/pdf, image/png, image/jpeg, image/webp.header
Attachment header. The filename is derived from the storage key with the leading appointment-ID segment removed; it still includes the timestamp segment (e.g.
1719920400000_lab_results.pdf).boolean
Always
false for errorsstring
Error message describing what went wrong