Skip to main content
GET
/
medical
/
v1
/
network
/
query
/
{requestId}
Get Network Query Status
curl --request GET \
  --url https://api.sandbox.metriport.com/medical/v1/network/query/{requestId} \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const status = await metriport.getNetworkQueryStatus({
  requestId: "22222222-2222-2222-2222-222222222222",
});

Returns the status of a specific network query request - use this to check the progress of the query. See more on Start Network Query.
To get notified about network query progress and completions, check out Network Query Events.

Path Params

requestId
string
required
The ID of the network query request. This is returned when you start a network query.

Response

requestId
string
required
The unique identifier for this network query request. Use this to track the query status and correlate webhooks.
startedAt
string
required
ISO 8601 timestamp of when the network query request was initially made.
status
string
required
The overall status of the network query. Can be one of: - in-progress - at least one source is still being queried
  • completed - all sources have completed successfully - partial - some sources completed, some failed - failed
  • all sources failed
sources
Source[]
required
Array of status objects for each data source being queried. A source type may appear multiple times if it was retried after a failure.
errors
SourceError[]
Array of errors for data sources that could not be queried. Only present when one or more sources fail to start.
Example Response Body (all sources started):
{
  "requestId": "00000000-0000-0000-0000-000000000000",
  "startedAt": "2024-12-30T10:00:00.000Z",
  "status": "in-progress",
  "sources": [
    {
      "type": "hie",
      "status": "in-progress",
      "startedAt": "2024-12-30T10:00:00.500Z"
    },
    {
      "type": "pharmacy",
      "status": "in-progress",
      "startedAt": "2024-12-30T10:00:00.750Z"
    },
    {
      "type": "lab",
      "status": "in-progress",
      "startedAt": "2024-12-30T10:00:01.000Z"
    }
  ]
}
Example Response Body (with source errors):
{
  "requestId": "00000000-0000-0000-0000-000000000000",
  "startedAt": "2024-12-30T10:00:00.000Z",
  "status": "in-progress",
  "sources": [
    {
      "type": "hie",
      "status": "in-progress",
      "startedAt": "2024-12-30T10:00:00.500Z"
    }
  ],
  "errors": [
    {
      "source": "pharmacy",
      "httpStatus": 400,
      "message": "Access to pharmacy data source is not enabled for this account",
      "timestamp": "2024-12-30T10:00:00.600Z"
    },
    {
      "source": "lab",
      "httpStatus": 429,
      "message": "Rate limit exceeded for laboratory data source",
      "timestamp": "2024-12-30T10:00:00.800Z"
    }
  ]
}
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const status = await metriport.getNetworkQueryStatus({
  requestId: "22222222-2222-2222-2222-222222222222",
});