Endpoints
Results Endpoint
Retrieve conversion results for jobs that have succeeded.
Overview
The Results endpoint allows you to download the results for jobs with a success status. Structured FHIR or JSON results are returned in the response body by default, and you can optionally request a temporary download URL instead by setting presigned=true. PDF results are available only through a presigned download URL, so presigned=true is required for them.
Endpoint Details
URL: GET /api/v1/results/{job_id}
Request Parameters
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-Client-Id | string | Yes | Client ID from the API keys |
X-Client-Secret | string | Yes | Client secret from the API keys |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | Unique identifier for the job |
Query Parameters (optional)
| Parameter | Type | Required | Description |
|---|---|---|---|
presigned | boolean | No | Controls how the result is returned. For structured FHIR or JSON results, omit or set false to receive the result in the response body, or set true to receive a temporary download URL (5 min TTL). For PDF results, presigned must be true. Requests that omit it or set it to false return 400 PRESIGNED_REQUIRED. |
Request Examples
With presigned URL
Add presigned=true to receive a temporary download URL. This is the required retrieval pattern for PDF results, and an optional pattern for structured FHIR or JSON results:
Response Format
Success Response (200 OK) - structured result in response body
Success Response (200 OK) - with presigned=true
When presigned=true, the response contains a time-limited download URL. Use it with a simple GET to download the result file. The URL expires in 5 minutes. PDF results are always returned this way.
Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Success message |
fhir_data | object | (Structured results returned in the body.) FHIR Bundle containing the converted resources |
presigned_url | string | (When presigned=true, and always for PDF results.) Temporary download URL for the result file; valid for 5 minutes |
FHIR Bundle Structure
The fhir_data field contains a FHIR Bundle with the following structure:
| Field | Type | Description |
|---|---|---|
resourceType | string | Always “Bundle” for FHIR bundles |
type | string | Bundle type (usually “collection”) |
entry | array | Array of FHIR resources |
Common FHIR Resources
The conversion process typically generates these FHIR resources:
- Patient - Patient demographic information
- Encounter - Healthcare encounters and visits
- Condition - Diagnoses and medical conditions
- Medication - Medications and prescriptions
- Observation - Lab results and vital signs
- Procedure - Medical procedures performed
Status and Error Codes
| HTTP Code | Message |
|---|---|
200 | Results retrieved successfully |
400 | Job ID is required |
400 | Job with ID {job_id} is not ready yet. Current status: {status} |
400 | Job with ID {job_id} failed. Results are not available. |
400 | PRESIGNED_REQUIRED - this PDF result is only available through a presigned download URL. Retry the request with presigned=true. |
401 | X-Client-Id and X-Client-Secret are not valid |
403 | Unauthorized access |
404 | Job with ID {job_id} was not found |
429 | Too many requests. For more details, visit the page Rate Limits |
500 | Internal error, Please try again later. |
503 | Conversion service is currently unavailable. Please try again later. |
504 | API gateway timeout |
Job Data Expiry
The results endpoint returns data only for jobs within their retention window. Job data is available for retrieval for 7 days by default, though this period may vary based on your organization’s settings. Once this window passes, the job data is no longer retained, so a 404 may indicate that the job data has expired rather than that the job ID never existed.
Best Practices
- Job Completion: Only call this endpoint after confirming the job status is
success - Presigned URL: Use
presigned=truefor large results or when you prefer to download the result file; use the URL within 5 minutes. PDF results requirepresigned=true. - Data Processing: Parse and validate the result according to your application needs
- Security: Keep your client credentials secure
Next Steps
After retrieving results:
- Process the result: Parse the FHIR Bundle and extract relevant resources, or download the result file via the presigned URL and then process it
- Store Results: Save the result to your database, EHR system, or document store
- Validate Data: Ensure the result meets your quality standards