Documents
The Documents API allows you to manage patient documents in Jump EHR. Documents can include lab results, referral letters, imaging reports, and other clinical files.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /documents | List all documents |
GET | /documents/{id} | Retrieve a document |
GET | /documents/{id}/download | Get download URL |
POST | /documents | Create a document record |
Required scopes: read_documents for GET requests, write_documents for POST requests.
The Document Object
{
"id": "doc_123e4567-e89b-12d3-a456-426614174000",
"patient_id": "pat_456e7890-e89b-12d3-a456-426614174111",
"document_type": "lab_result",
"title": "Blood Test Results",
"description": "Annual blood panel",
"file_name": "blood_test_2025.pdf",
"file_path": "documents/pat_456e7890/blood_test_2025.pdf",
"mime_type": "application/pdf",
"file_size": 245678,
"uploaded_by": "usr_789a0123-e89b-12d3-a456-426614174222",
"created_at": "2025-01-15T10:00:00Z",
"updated_at": "2025-01-15T10:00:00Z"
}Attributes
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (UUID) |
patient_id | string | Associated patient ID |
document_type | string | Type of document |
title | string | Document title |
description | string | Document description |
file_name | string | Original file name |
file_path | string | Storage path |
mime_type | string | File MIME type |
file_size | integer | File size in bytes |
uploaded_by | string | User who uploaded |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last update timestamp |
List Documents
GET /documentsQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 100 | Number of records (max 100) |
offset | integer | 0 | Pagination offset |
patient_id | string | - | Filter by patient |
document_type | string | - | Filter by document type |
Request
curl -X GET "https://app.usejump.co.uk/functions/v1/api-v1/documents?patient_id=pat_456e7890" \
-H "Authorization: Bearer pk_live_your_api_key"Response
{
"data": [
{
"id": "doc_123e4567-e89b-12d3-a456-426614174000",
"patient_id": "pat_456e7890-e89b-12d3-a456-426614174111",
"document_type": "lab_result",
"title": "Blood Test Results",
"mime_type": "application/pdf",
"file_size": 245678,
"created_at": "2025-01-15T10:00:00Z"
}
],
"pagination": {
"total": 1,
"limit": 100,
"offset": 0,
"has_more": false
}
}Retrieve a Document
GET /documents/{id}Request
curl -X GET "https://app.usejump.co.uk/functions/v1/api-v1/documents/doc_123e4567" \
-H "Authorization: Bearer pk_live_your_api_key"Download a Document
GET /documents/{id}/downloadReturns a signed URL for downloading the document file.
Download URLs expire after a short period. Request a new URL if the previous one has expired.
Request
curl -X GET "https://app.usejump.co.uk/functions/v1/api-v1/documents/doc_123e4567/download" \
-H "Authorization: Bearer pk_live_your_api_key"Response
{
"data": {
"download_url": "https://storage.example.com/documents/...",
"expires_at": "2025-01-15T11:00:00Z"
}
}Create a Document
POST /documentsCreates a document record. File upload is handled separately.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
patient_id | string | Yes | Patient ID |
title | string | Yes | Document title |
document_type | string | No | Type of document |
description | string | No | Document description |
Request
curl -X POST "https://app.usejump.co.uk/functions/v1/api-v1/documents" \
-H "Authorization: Bearer pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"patient_id": "pat_456e7890-e89b-12d3-a456-426614174111",
"title": "Referral Letter",
"document_type": "referral",
"description": "Cardiology referral"
}'Related Resources
- Patients - Patient records
- Consultations - Clinical consultations