# DownloadBatchSearchReport

Downloads batch search results in a csv file.

`GET /trading-partners/batch-searches/{id}/$download-results`

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

Source: https://developer.avalara.com/products/e-invoicing/api/v1.5/methods/Trading%20Partners/DownloadBatchSearchReport/

## Description

This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.5"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `id` | string | path | Yes | Unique identifier of the batch search for which to download the report. |
| `X-Correlation-ID` | string | header | No | Optional correlation identifier provided by the caller to trace the call (for example "f3f0d19a-01a1-4748-8a58-f000d0424f43"). |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Successful report download. Returns a CSV file containing up to 1,000 query results. |  |
| 401 | Unauthorized. | `ErrorResponse` |
| 403 | Forbidden. | `ErrorResponse` |
| 404 | Report not found | `ErrorResponse` |
| 500 | Internal server error. | `ErrorResponse` |

## Example Request

```bash
curl -X GET "https://api.sbx.avalara.com/einvoicing/trading-partners/batch-searches/{id}/$download-results" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```