> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Document Query Status (Legacy)

> Returns the document query status for the specified patient.

<Warning>
  **Legacy Endpoint:** This endpoint is deprecated. We recommend using the [Network Query](/medical-api/api-reference/network/start-network-query) flow instead, which can query all available health data networks (HIEs, pharmacies, and laboratories) in a single call, and returns a direct URL to the updated patient record.
</Warning>

Returns the document query status and a request ID for the specified patient - use this to check the progress of the document query.

See more on [Start Document Query](/medical-api/legacy-api-reference/document/start-document-query).

<Tip>
  To get updates about the document query progress, including download and conversion status, check
  out our [webhooks guide](/medical-api/handling-data/webhooks).
</Tip>

## Query Params

<ParamField query="patientId" type="string" required>
  The ID of the Patient for which to return the status of document querying across HIEs.
</ParamField>

## Response

<Snippet file="document-progress.mdx" />

```json theme={null}
{
  "download": {
    "status": "completed",
    "total": 100,
    "successful": 95,
    "errors": 5
  },
  "convert": {
    "status": "processing",
    "total": 20,
    "successful": 15,
    "errors": 1
  },
  "requestId": "018a80c4-292a-7486-a223-6dcbc636c44c"
}
```

<ResponseExample>
  ```javascript Metriport SDK theme={null}
  import { MetriportMedicalApi } from "@metriport/api-sdk";

  const metriport = new MetriportMedicalApi("YOUR_API_KEY");

  const status = await metriport.getDocumentQueryStatus({
    patientId: "018a80c4-292a-7486-a1234-76yuhe23yu14",
  });

  ```
</ResponseExample>
