1. Document
  2. Get Document
GET

/medical/v1/document/download

x-api-key*
curl --request GET \
     --url https://api.metriport.com/medical/v1/document/download \
     --header 'x-api-key: AUTH_VALUE'

Query Params

patientIdRequired
string

The ID of the Patient for which to list available Documents.

facilityIdRequired
string

The ID of the Facility where the patient is receiving care.

locationRequired
string

URL from the DocumentReference.

Response

blob

The downloaded Document contents.

import { Metriport } from "@metriport/api";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const documentBlob = await metriportClient.getDocument(
  "2.16.840.1.113883.3.666.5.2004.4.2005",
  "2.16.840.1.113883.3.666.123",
  "https://fhir.metriport.com/oauth/fhir/Binary/2.16.840.1.113883.3.777.666.5.700009.969696"
);