POST
/
medical
/
v1
/
document
/
download-url
/
bulk
curl --request POST \
  --url https://api.sandbox.metriport.com/medical/v1/document/download-url/bulk \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");


const status = await api.startBulkGetDocumentUrl(
  "<your-patient-id>",
);

When executed, this endpoint triggers a process to generate all download URLs for a patient’s documents, which will then be delivered via webhook message.

The status of the process is returned in the response. Initially, it will be processing, and when the process is finished, the status will be updated to completed or failed.

The result of the process will be delivered via a webhook message - to set this up, and see the message format, check out our webhooks guide.

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

patientId
string
required

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

Response

status
string
required

The status of the URL generation process - can be processing, completed, or failed.

requestId
string

The ID of your request. This can be referenced for support.

{
    "status": "processing",
    "requestId": "018c1e9d-dfce-70cb-8c0e-edfbbd2a7f5f"
}