# GetDocumentList

Returns a summary of documents for a date range

`GET /documents`

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

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

## Description

Returns a list of document summaries with a processing date within the specified date range.

**Filterable properties (`$filter`):** only the following response properties may be used in `$filter`, with the operators shown. Multiple conditions may be combined with `and` / `or`.

| Property | Supported operators |
|---|---|
| `id` | `eq` |
| `companyId` | `eq` |
| `status` | `eq` |
| `documentNumber` | `eq` |
| `documentType` | `eq` |
| `documentDate` | `eq` |
| `flow` | `eq` |
| `countryCode` | `eq` |
| `countryMandate` | `eq` |
| `receiver` | `eq` |
| `businessStatus` | `eq` |
| `supplierName` | `eq` |
| `customerName` | `eq` |
| `interface` | `eq` |
| `lastUpdatedAt` | `gt`, `lt` |
| `lastMediaTypeAddedAt` | `gt`, `lt` |
| `additionalDocAttributes.*` | `eq` |

For `additionalDocAttributes`, use dot notation to target a specific attribute (for example, `$filter=additionalDocAttributes.incarcare eq 'UP1312321'` or `$filter=additionalDocAttributes.ksefNumber eq '132132132'`). The available attribute names depend on the country mandate.

Example: `$filter=status eq 'Complete' and lastUpdatedAt gt '2026-01-01T00:00:00'`.

**Sortable properties (`$orderBy`):** the following fields may be used with the `$orderBy` query parameter. Append `asc` or `desc` to specify sort direction; ascending is applied when direction is omitted.

| Field | Example |
|---|---|
| `createdAt` | `$orderBy=createdAt` or `$orderBy=createdAt desc` |

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.6"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `startDate` | string | query | No | Start date for documents to return. Defaults to the previous month. Format: "YYYY-MM-DDThh:mm:ss". |
| `endDate` | string | query | No | End date for documents to return. Defaults to the current date. Format: "YYYY-MM-DDThh:mm:ss". |
| `flow` | string | query | No | Optional filter for document direction: issued uses "out" and received uses "in". |
| `$count` | string | query | No | When set to true, the response body also includes the count of items in the collection. |
| `$countOnly` | string | query | No | When set to true, the response returns only the count of items in the collection. |
| `$filter` | string | query | No | Filter results by one or more response properties. See the operation description for the full list of filterable properties and the operators each supports. Most properties only support `eq`; `lastUpdatedAt` additionally supports `gt` and `lt`. Conditions can be combined with `and` / `or`. |
| `$include` | string | query | No | Comma-separated list of optional response fields to include. Supported values: `events`. Each requested field is added to the response only when present in this parameter; multiple fields can be requested together by separating them with a comma. Unsupported values are ignored. |
| `$orderBy` | string | query | No | Sort the results by a supported field. Append `asc` or `desc` to control direction; if direction is omitted, ascending order is applied.

**Sortable fields:**

| Field | Example |
|---|---|
| `createdAt` | `$orderBy=createdAt` (ascending) |
| `createdAt` | `$orderBy=createdAt desc` (descending) | |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a collection of document summaries for the specified date range. | `DocumentListResponse` |
| 400 | Bad request. | `BadRequest` |
| 401 | Unauthorized. |  |
| 403 | Forbidden. | `ForbiddenError` |

### 200 Response: `DocumentListResponse`

Returns the requested list of documents

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordsetCount` | string | No | Count of collections for the given date range Example: `1`. |
| `@nextLink` | string | No |  |
| `value` | DocumentSummary[] | **Yes** | Array of documents matching query parameters |

## Example Request

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