# CreateTradingPartnersBatch

Creates a batch of multiple trading partners.

`POST /trading-partners/batch`

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

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

## Description

This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | The HTTP Header meant to specify the version of the API intended to be used. |
| `X-Avalara-Client` | string | header | No | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a "Fingerprint". |
| `X-Correlation-ID` | string | header | No | The caller can use this as an identifier to use as a correlation id to trace the call. |

## Request Body

**Content-Type:** `application/json`

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Batch processing completed |  |
| 400 | Bad request | `ErrorResponse` |
| 401 | Unauthorized | `ErrorResponse` |
| 403 | Forbidden | `ErrorResponse` |
| 409 | Conflict | `ErrorResponse` |
| 413 | ContentTooLarge | `ErrorResponse` |
| 500 | Internal server error | `ErrorResponse` |

## Example Request

```bash
curl -X POST "https://api.sbx.avalara.com/einvoicing/trading-partners/batch" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "value": [
    {
      "id": "",
      "name": "",
      "network": "",
      "registrationDate": "",
      "identifiers": [
        {
          "name": "",
          "displayName": "",
          "value": ""
        }
      ],
      "addresses": [
        {
          "line1": "",
          "line2": "",
          "city": "",
          "state": "",
          "country": "",
          "postalCode": ""
        }
      ],
      "supportedDocumentTypes": [
        {
          "name": "",
          "value": "",
          "supportedByTradingPartner": "",
          "supportedByAvalara": "",
          "extensions": [
            {
              "key": "",
              "values": [
                {}
              ]
            }
          ]
        }
      ],
      "consents": {
        "listInAvalaraDirectory": ""
      },
      "extensions": [
        {
          "key": "",
          "values": [
            {}
          ]
        }
      ]
    }
  ]
}'
```