Skip to main content
GET
/
api
/
v1
/
documents
/
{id}
curl --request GET \
  --url https://anivahealth.com/api/v1/documents/f8a1b2c3-d4e5-4f6a-7b8c-9d0e1f2a3b4c \
  --header 'x-api-key: YOUR_API_KEY' \
  --output lab-report.pdf
(Binary file content — save the response to a file)
Download a lab report document by its file ID. Returns the raw file bytes with the appropriate Content-Type header. Document IDs are obtained from the documents array in the Get Lab Results response.
Requires the RESULTS_VIEW scope. Access is validated against the profile that owns the document. Requests made with a key that lacks this scope return 403 Forbidden.

Request

Path parameters

id
string
required
File ID (UUID) from the documents array in the appointment results response.

Response

On success, the API returns 200 OK with the file bytes and appropriate Content-Type header (e.g., application/pdf).

Error responses

StatusDescription
400Invalid ID format — the provided value is not a valid UUID.
403Forbidden — missing RESULTS_VIEW scope or document outside your access context.
404Document not found.
500Internal server error.
curl --request GET \
  --url https://anivahealth.com/api/v1/documents/f8a1b2c3-d4e5-4f6a-7b8c-9d0e1f2a3b4c \
  --header 'x-api-key: YOUR_API_KEY' \
  --output lab-report.pdf
(Binary file content — save the response to a file)