# GetDocumentStatus

Checks the status of a document

`GET /documents/{documentId}/status`

**API:** Avalara E-Invoicing API
**Tag:** Documents
**API Version:** 1.0
**Base URL:** https://api.sbx.avalara.com/einvoicing
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/e-invoicing/api/v1.0/methods/Documents/GetDocumentStatus/

## Description

Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | The HTTP Header meant to specify the version of the API intended to be used |
| `X-Avalara-Client` | string | header | No | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a "Fingerprint" |
| `documentId` |  | path | Yes | The unique ID for this document that was returned in the POST /einvoicing/documents response body |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `DocumentStatusResponse` |
| 401 | Unauthorized |  |
| 403 | Forbidden | `ForbiddenError` |
| 404 | A document for the specified ID was not found. | `NotFoundError` |

### 200 Response: `DocumentStatusResponse`

Returns the current document ID and status

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | No | The unique ID for this document Example: `52f60401-44d0-4667-ad47-4afe519abb53`. |
| `status` | string | No | Status of the transaction:  'Pending'  'Failed'  'Complete' Example: `Complete`. |
| `events` | StatusEvent[] | No |  |

## Example Request

```bash
curl -X GET "https://api.sbx.avalara.com/einvoicing/documents/{documentId}/status" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```