Metriport Document API

Medical API clinical document query and retrieval.

Operations 4

POST /medical/v1/document/query Start Document Query #
GET /medical/v1/document/query Get Document Query Status #
GET /medical/v1/document List Documents #
GET /medical/v1/document/download-url Get Document URL #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/metriport-document-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

metriport-document-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Metriport Consolidated Document API
  description: Metriport is an open-source, universal API for healthcare data. The Medical API exchanges patient medical records across the CommonWell and Carequality networks and returns consolidated FHIR R4 data; the Devices API hydrates activity, biometrics, nutrition, and sleep data from connected wearables and mHealth apps. This specification documents the hosted Metriport cloud surface at https://api.metriport.com. The same code may be self-hosted from the open-source repository.
  termsOfService: https://www.metriport.com/terms
  contact:
    name: Metriport Support
    email: contact@metriport.com
    url: https://docs.metriport.com
  version: '1.0'
servers:
- url: https://api.metriport.com
  description: Metriport hosted production API
- url: https://api.sandbox.metriport.com
  description: Metriport sandbox API
security:
- ApiKeyAuth: []
tags:
- name: Document
  description: Medical API clinical document query and retrieval.
paths:
  /medical/v1/document/query:
    post:
      operationId: startDocumentQuery
      tags:
      - Document
      summary: Start Document Query
      description: Triggers a network query across the HIE networks to discover and download the available clinical documents for a Patient. Results are delivered asynchronously via webhook.
      parameters:
      - name: patientId
        in: query
        required: true
        schema:
          type: string
      - name: facilityId
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The document query progress object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentQuery'
    get:
      operationId: getDocumentQueryStatus
      tags:
      - Document
      summary: Get Document Query Status
      parameters:
      - name: patientId
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The current document query progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentQuery'
  /medical/v1/document:
    get:
      operationId: listDocuments
      tags:
      - Document
      summary: List Documents
      description: Lists the available clinical documents (FHIR DocumentReferences) for a Patient that have been retrieved from the networks.
      parameters:
      - name: patientId
        in: query
        required: true
        schema:
          type: string
      - name: dateFrom
        in: query
        required: false
        schema:
          type: string
          format: date
      - name: dateTo
        in: query
        required: false
        schema:
          type: string
          format: date
      responses:
        '200':
          description: A list of DocumentReferences.
          content:
            application/json:
              schema:
                type: object
                properties:
                  documents:
                    type: array
                    items:
                      $ref: '#/components/schemas/DocumentReference'
  /medical/v1/document/download-url:
    get:
      operationId: getDocumentUrl
      tags:
      - Document
      summary: Get Document URL
      description: Returns a signed URL to download a specific document referenced by its file name.
      parameters:
      - name: fileName
        in: query
        required: true
        schema:
          type: string
      - name: conversionType
        in: query
        required: false
        schema:
          type: string
          enum:
          - html
          - pdf
      responses:
        '200':
          description: A signed download URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
components:
  schemas:
    Progress:
      type: object
      properties:
        status:
          type: string
          enum:
          - processing
          - completed
          - failed
        total:
          type: integer
        successful:
          type: integer
        errors:
          type: integer
    DocumentQuery:
      type: object
      properties:
        download:
          $ref: '#/components/schemas/Progress'
        convert:
          $ref: '#/components/schemas/Progress'
    DocumentReference:
      type: object
      description: A FHIR R4 DocumentReference describing a retrieved clinical document.
      properties:
        id:
          type: string
        fileName:
          type: string
        description:
          type: string
        status:
          type: string
        contentType:
          type: string
        size:
          type: integer
        indexed:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key