# ExportAuditLogs

Initiate an ExportAuditLogs report task

`POST /api/v2/reports/exportauditlogs`

**API:** AvaTax API
**Tag:** Reports
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**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/ExportAuditLogs/

## Description

Begins running an `ExportAuditLogs` report task and returns the identity of the report.
            
Reports are run on the server.  When complete, the report file will be available for download
for up to 30 days after completion.  To run a report, you should follow these steps:
            
* Begin a report by calling the report's ExportAuditLogs API.
* In the result of the ExportAuditLogs API, you receive a report's `id` value.
* All reports with `InQueue` status are picked up by the report service and processed in the background.
* Reports that are picked up by the report service will have an `InProgress` status.
* Reports will be updated to `Completed` status when the report is ready for download.
* Check the status of a report by calling `GetAuditLogReport` and passing in the report's `id` value.
* When a report's status is `Completed`, call `DownloadAuditLogReport` to retrieve the file.
            
The `ExportAuditLogs` report produces information about audit records within your account.
            
The following `reportType` values are supported:
* `audit` - Exports audit records for configuration changes. Requires `reportSubType` to specify the table name.
* `audittransactionlogs` - Exports transaction audit logs.
            
When `reportType` is `audit`, the `reportSubType` field supports the following valid table names:
`NEXUS`, `USER`, `COMPANY`, `ACCOUNT`, `COMPANYLOCATION`, `ACCOUNTSETTING`, `COMPANYLOCATIONSETTING`,
`COMPANYSETTING`, `TAXCODE`, `TAXRULE`, `ADDRESSSERVICECONFIG`, `AUDITADVANCEDRULE`, `COMPANYCONTACT`,
`COMPANYLOCATIONPARAMETERDETAIL`, `COMPANYLOCATIONSETTINGCONFIG`, `COMPANYPARAMETERDETAIL`, `COMPANYRETURN`,
`COMPANYRETURNSETTING`, `ITEM`, `SERVICE`, `EXEMPTCERT`, `AVACERTSERVICECONFIG`, `JURISDICTIONOVERRIDE`, `COSTCENTER`.
            
Set `compression` to `GZIP` to reduce the size of the report file and increase download speed.

### 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 |
|---|---|---|---|---|
| `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/) . |

## Request Body

**Schema:** `ReportAuditLogModel`

An input model for requesting an export of audit logs

| Property | Type | Required | Description |
|---|---|---|---|
| `reportType` | string | No | The type of the report (e.g., "audit"). Example: `audit`. |
| `reports` | ReportAuditLogReportInputModel[] | No | The list of reports for this audit log report. |
| `startDate` | string | No | The start date for the audit log report. Example: `2026-06-02T00:00:00+00:00`. |
| `endDate` | string | No | The end date for the audit log report. Example: `2026-07-02T00:00:00+00:00`. |
| `compression` | string | No | The compression type for the report output (e.g., "NONE", "GZIP"). Values: `NONE`, `GZIP`. Example: `NONE`. |
| `reportSource` | string | No | The source of the report (e.g., "AUDITLOGS"). Example: `AUDITLOGS`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 403 | Forbidden |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/reports/exportauditlogs" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "reportType": "audit",
  "reports": [
    {
      "reportSubType": "report",
      "filters": [
        {
          "name": "column_name1",
          "values": [
            "value1_1"
          ]
        }
      ]
    }
  ],
  "startDate": "2026-06-02T00:00:00+00:00",
  "endDate": "2026-07-02T00:00:00+00:00",
  "compression": "NONE",
  "reportSource": "AUDITLOGS"
}'
```