# ListReports

List all report tasks for account

`GET /api/v2/reports`

**API:** AvaTax API
**Tag:** Reports
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/Reports/ListReports/

## Description

List all report tasks for your account.
            
Reports are run as asynchronous report tasks on the server.  When complete, the report file will be available for download
for up to 30 days after completion.  To run an asynchronous report, you should follow these steps:
            
* Begin a report by calling the report's Initiate API.  There is a separate initiate API call for each report type.
* In the result of the Initiate API, you receive back a report's `id` value.
* Check the status of a report by calling `GetReport` and passing in the report's `id` value.
* When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
            
This API call returns information about all report types across your entire account.
            
Audit-log report types (`audit`, `audittransactionlogs`) are not included in this list; retrieve those via the
`GetAuditLogReport` / `DownloadAuditLogReport` APIs.
            
Pagination note: when the response includes a non-null `pageKey` (next link), more results may exist and the
caller should follow it, even if the current page returned fewer than the requested number of records. This can
happen when a `$filter` is applied, because matches are evaluated server-side across backend pages.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | query | No | The id of the company for which to get reports. |
| `pageKey` | string | query | No | Provide a page key to retrieve the next page of results. |
| `$skip` | integer | query | No | If nonzero, skip this number of results before returning data.  Used with `$top` to provide pagination for large datasets. |
| `$top` | integer | 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 1,000 records. |
| `$filter` | string | query | No | A filter statement to identify specific records to retrieve.  For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).*Not filterable:* reportType, parameters, status, size, format, file, createdUser, completedDate |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `ReportModelFetchResult` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `ReportModelFetchResult`

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordsetCount` | integer | No |  |
| `value` | ReportModel[] | No |  |
| `@nextLink` | string | No |  |
| `pageKey` | string | No |  |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/reports" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```