# ListBatchSearches

Lists all batch searches that were previously submitted.

`GET /trading-partners/batch-searches`

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

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

## Description

This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.6"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `$filter` | string | query | No | Filters the results by field name. Only the eq operator and the name field are supported. For more information, refer to the Avalara filtering guide. |
| `count` | boolean | query | No | When set to true, returns the total count of matching records included as @recordSetCount in the response body. |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `$orderBy` | string | query | No | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. |
| `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 | Returns a collection of batch searches. | `BatchSearchListResponse` |
| 400 | Bad request | `ErrorResponse` |
| 401 | Unauthorized | `BatchSearchListResponse` |
| 403 | Forbidden | `ErrorResponse` |
| 500 | Internal server error. | `ErrorResponse` |

### 200 Response: `BatchSearchListResponse`

Response schema for listing batch search details.

| Property | Type | Required | Description |
|---|---|---|---|
| `@recordSetCount` | integer | No | The count of records in the result set. |
| `@nextLink` | string | No | Next Link |
| `value` | BatchSearch[] | No | List of batch search records. |

## Example Request

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