# AuditTransaction

Get audit information about a transaction

`GET /api/v2/companies/{companyCode}/transactions/{transactionCode}/audit`

**API:** AvaTax API
**Tag:** Transactions
**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/crossborder/api/methods/Transactions/AuditTransaction/

## Description

Retrieve audit information about a transaction stored in AvaTax.
            
The `AuditTransaction` API retrieves audit information related to a specific transaction.  This audit
information includes the following:
            
* The `CompanyId` of the company that created the transaction
* The server timestamp representing the exact server time when the transaction was created
* The server duration - how long it took to process this transaction
* Whether exact API call details were logged
* A reconstructed API call showing what the original CreateTransaction call looked like
            
This API can be used to examine information about a previously created transaction.
            
A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
sales, purchases, inventory transfer, and returns (also called refunds).
            
NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
* Replace '/' with '\_-ava2f-\_'  For example: document/Code becomes document_-ava2f-_Code
* Replace '+' with '\_-ava2b-\_'  For example: document+Code becomes document_-ava2b-_Code
* Replace '?' with '\_-ava3f-\_'  For example: document?Code becomes document_-ava3f-_Code
* Replace '%' with '\_-ava25-\_'  For example: document%Code becomes document_-ava25-_Code
* Replace '#' with '\_-ava23-\_'  For example: document#Code becomes document_-ava23-_Code
* Replace ' ' with '%20'  For example: document Code becomes document%20Code

### 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.
* This API depends on the following active services:*Required* (all):  AvaTaxPro, BasicReturns.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyCode` | string | path | Yes | The code identifying the company that owns this transaction |
| `transactionCode` | string | path | Yes | The code identifying the transaction |
| `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 | `AuditTransactionModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `AuditTransactionModel`

Information about a previously created transaction

| Property | Type | Required | Description |
|---|---|---|---|
| `companyId` | integer | No | Unique ID number of the company that created this transaction Example: `0`. |
| `reconstructed` | ReconstructedApiRequestResponseModel | No | Reconstructed API request/response |
| `serverTimestamp` | string | No | Server timestamp, in UTC, of the date/time when the original transaction was created Example: `2026-07-02T04:05:17.3323333Z`. |
| `serverDuration` | string | No | Length of time the original API call took |
| `apiCallStatus` | string | No | api call status Values: `OriginalApiCallAvailable`, `ReconstructedApiCallAvailable`, `Any`. Example: `OriginalApiCallAvailable`. |
| `original` | OriginalApiRequestResponseModel | No | Original API request/response |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/companies/{companyCode}/transactions/{transactionCode}/audit" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```