GET

/medical/v1/document/downloadUrl

x-api-key*
curl --request GET \
  --url https://api.sandbox.metriport.com/medical/v1/document/downloadUrl \
  --header 'x-api-key: <x-api-key>'

This endpoint returns a URL which you can use to download the specified document and/or convert using the file name provided from the List Documents endpoint.

The URL will only be valid for 60 seconds before you need to request a new one.

Query Params

fileNamerequired
string

The file name of the document.

conversionType
string

The doc type to convert to. Either html or pdf.

This parameter should only be used for converting XML/CDA files.

Response

A json object containing the URL will be returned.

url
string

The presigned URL.

import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const presignedUrl = await metriportClient.getDocumentUrl("abc123-def456");