Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 2.09 KB

download-url-bulk.mdx

File metadata and controls

69 lines (49 loc) · 2.09 KB
title description api
Start Bulk Get Document URL
Triggers a process to generate a list of download URLs for all of the patient's documents.
POST /medical/v1/document/download-url/bulk

When executed, this endpoint triggers a process to generate all download URLs for a patient's documents. This is an asynchronous process, and the status is returned in the response to the original request.

Initially, the status will be processing, and when the process is finished, the status will be updated to completed or failed.

Once completed, a webhook request will be sent your configured URL containing the document download URLs.

Webhook message type - see the respective section on the webhooks page for more details:

  • medical.document-bulk-download: list of download urls for a patient's documents.
If you trigger this endpoint again while the process is still running, you will get a response that reflects the current progress. Essentially, only a single bulk URL generation process will be running for a patient at any given time.

Query Params

The ID of the patient for which to initiate the bulk URL generation.

Body

Response

The status of the URL generation process - can be `processing`, `completed`, or `failed`.
{
    "status": "processing",
    "requestId": "018c1e9d-dfce-70cb-8c0e-edfbbd2a7f5f"
}
```javascript Metriport SDK import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const metadata = { youCan: "putAny", stringKeyValue: "pairsHere", };

const status = await api.startBulkGetDocumentUrl( "", metadata );

</ResponseExample>