# 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.

## 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 by field name and value. This filter supports only eq. For more information, refer to the Avalara filtering guide. |
| `$include` | string | query | No | When set to `events`, each document in the response includes its events array. Omit this parameter or use any other value to exclude events from the response. |
| `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"
```