More Info
Software Development Kit

We’ve developed an SDK to help you get access to our API without the HTTP plumbing. It’s currently only available for Node-based applications (let us know what other languages you’d like to see it available on).

The SDK is available as an NPM package and you can access it here.

To install:

npm install --save @metriport/api

Initialize it like so:

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

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

Some examples of usage, once the API client is initialized:

// Create a Facility
const patient = await metriportClient.createFacility({
  // facility data

// Get a Patient
const patient = await metriportClient.getPatient(patientId);

// List the given Patient's available documents/records
const documents = await metriportClient.listDocuments(patientId, facilityId);

The operations available follow the API specification, with this pattern:

  • GET / endpoints are exposed as list<EntityNameInPlural>()
  • GET /:id endpoints are exposed as get<EntityName>()
  • POST / endpoints are exposed as create<EntityName>()
  • PUT /:id endpoints are exposed as update<EntityName>()
  • DELETE /:id endpoints are exposed as remove<EntityName>()

The client source code contain only the exposed operations and is available here.