# GetDocumentList

Returns a summary of documents for a date range

`GET /documents`

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

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

## Description

Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.

## 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. |
| `startDate` | string | query | No | Start date of documents to return. This defaults to the previous month. |
| `endDate` | string | query | No | End date of documents to return. This defaults to the current date. |
| `flow` | string | query | No | Optionally filter by document direction, where issued = `out` and received = `in` |
| `$count` | string | query | No | When set to true, the count of the collection is also returned in the response body |
| `$countOnly` | string | query | No | When set to true, only the count of the collection is returned |
| `$filter` | string | query | No | Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. |
| `$top` | string | query | No | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. |
| `$skip` | string | query | No | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `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"
```