Bulk Convert

Endpoints

Bulk Convert Endpoint

Submit multiple files for conversion to structured clinical data in a single request.

Overview

The Bulk Convert endpoint allows you to trigger the conversion of multiple documents simultaneously. This is designed for high-volume workflows, bulk data imports, allowing you to manage hundreds of files without making individual API calls for each document.

Enterprise only

The Bulk Convert endpoint is only available for Enterprise customers. Please contact our support team to enable this feature for your organization.

Endpoint Details

URL: POST /api/v1/bulk-convert Content-Type: application/json

Request Parameters

Headers

HeaderTypeRequiredDescription
X-Client-IdstringYesClient ID from the API keys
X-Client-SecretstringYesClient secret from the API keys
Content-TypestringYesMust be application/json

Request Body

ParameterTypeRequiredDescription
filesarrayYesArray of file objects to process.
process_configobjectYesConfiguration for the processing type. Applied to all files in the batch.
output_configobjectYesConfiguration for the output format and enrichments. Applied to all files in the batch.
batch_callback_urlstringOptionalA single webhook URL to receive notifications for all files in this batch.

*Note: You can provide either a batch_callback_url at the root level OR a callback_url for every individual file in the files array.

File limit per request: Maximum of 30 files per request.

Process Config

ParameterTypeRequiredDescription
tasksarray of stringsYesA one-item list containing the processing type to run

Processing types - tasks is a one-item list naming the type to run:

TypeInputOutputDescription
clinical_extractionpdf, ccdafhir or jsonExtract structured clinical data from the document.
dephipdfpdf (presigned URL only)De-identify a PDF by removing protected health information (PHI).

A dephi result is a binary PDF, delivered only through a presigned URL. At request time, set output_config.presigned to true or omit it (false is invalid), then retrieve the file from the Results endpoint with presigned=true.

Output Config

ParameterTypeRequiredDefaultDescription
formatstringYes-Output format for the result. Accepted values: fhir, json, pdf
include_bboxbooleanNot requiredfalseWhether to include bounding box coordinates for extracted entities. Incurs additional cost when enabled.
presignedbooleanNot requiredfalseIf true, the webhook callback includes a presigned download URL instead of the result in the body. If false or omitted, the structured result is returned inline (default).
result_ttlintegerNot required5 (minutes)When presigned is true, controls how long the presigned result URL in the success webhook callback remains valid. Integer minutes in the inclusive range 1 to 15. When omitted, the default is five minutes. Applied to all files in the batch.

File Object Structure

ParameterTypeRequiredDescription
presigned_urlstringYesThe fully-qualified, time-limited URL (such as an S3 presigned URL) to securely access and download the source file to be converted. The URL must be accessible by the platform and valid for the duration of processing.
file_typestringYesType of file: pdf or ccda
callback_urlstringOptionalSpecific webhook URL for this individual file’s completion event.

Request Examples

1. Batch Callback Only

Provide a batch_callback_url if you want to receive job notifications for all files in the bulk request at the same callback URL. Job notifications for each individual file will be sent separately to the callback URL (either the batch or per-file webhook), ensuring that you receive a distinct notification for each conversion job upon its completion.

2. Individual Callbacks Only

Use this method when each file in your bulk request needs to trigger its own callback URL, by specifying a callback_url for every file.

3. Mixed (batch + individual)

If a file specifies its own callback_url, that URL will be used for notifications for that file. For files without an explicit callback_url, the batch_callback_url is used as the default.

In this example: file1 uses priority-webhook for notifications, while file2 falls back to the fallback-webhook.

4. Dephi (de-identification)

Submit a batch of dephi requests to de-identify PDFs - each removes protected health information (PHI) and returns a de-identified PDF. Retrieve each result from the Results endpoint with presigned=true.

Response Format

Success Response (200 OK)

Response Fields

FieldTypeDescription
messagestringSuccess confirmation message
countintegerTotal number of jobs successfully queued
jobsarrayList of created job_ids along with source URLs

Status and Error Codes

HTTP CodeMessage
200Bulk conversion requests submitted
400Invalid request payload
400files array is required
400files array cannot be empty
400File at index {index} must be a valid JSON object/dictionary
400presigned_url is required for file at index {index}
400result_ttl must be an integer between 1 and 15 minutes
401X-Client-Id and X-Client-Secret are not valid
429Too many requests. For more details, visit the page Rate Limits
500Internal error processing bulk request
500Failed to submit batch to processor

Best Practices

  1. URL Validity: Provide a minimum one-hour expiration window for the presigned_url to ensure all the files in a batch are processed.
  2. Async Workflow: Do not poll for status for large batches; rely on webhooks to trigger downstream processing in your application.
  3. Bounding Boxes: Only enable include_bbox when your application requires coordinate data, as it incurs additional processing cost across all files in the batch.

Next Steps

After submitting a bulk request: