Results

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

HeaderTypeRequiredDescription
X-Client-IdstringYesClient ID from the API keys
X-Client-SecretstringYesClient secret from the API keys

Path Parameters

ParameterTypeRequiredDescription
job_idstringYesUnique identifier for the job

Query Parameters (optional)

ParameterTypeRequiredDescription
presignedbooleanNoControls 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

FieldTypeDescription
messagestringSuccess message
fhir_dataobject(Structured results returned in the body.) FHIR Bundle containing the converted resources
presigned_urlstring(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:

FieldTypeDescription
resourceTypestringAlways “Bundle” for FHIR bundles
typestringBundle type (usually “collection”)
entryarrayArray 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 CodeMessage
200Results retrieved successfully
400Job ID is required
400Job with ID {job_id} is not ready yet. Current status: {status}
400Job with ID {job_id} failed. Results are not available.
400PRESIGNED_REQUIRED - this PDF result is only available through a presigned download URL. Retry the request with presigned=true.
401X-Client-Id and X-Client-Secret are not valid
403Unauthorized access
404Job with ID {job_id} was not found
429Too many requests. For more details, visit the page Rate Limits
500Internal error, Please try again later.
503Conversion service is currently unavailable. Please try again later.
504API 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

  1. Job Completion: Only call this endpoint after confirming the job status is success
  2. Presigned URL: Use presigned=true for large results or when you prefer to download the result file; use the URL within 5 minutes. PDF results require presigned=true.
  3. Data Processing: Parse and validate the result according to your application needs
  4. 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