# DownloadBatch

Download a single batch file

`GET /api/v2/companies/{companyId}/batches/{batchId}/files/{id}/attachment`

**API:** AvaTax API
**Tag:** Batches
**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/Batches/DownloadBatch/

## Description

Download a single batch file identified by this URL.

### Security Policies

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

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that owns this batch |
| `batchId` | integer | path | Yes | The ID of the batch object |
| `id` | integer | path | Yes | The primary key of this batch file object |
| `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 | OK |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/batches/{batchId}/files/{id}/attachment" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```