> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger multiple sync channels in a single API call.

> Batch sync jobs queued

### Path parameters

<ParamField path="tenant_id" type="string" required>
  Tenant identifier
</ParamField>

### Request body

`BatchSyncRequest`

<ParamField body="channels" type="string[]" required>
  Channels to sync. Accepts: shopify, netsuite, dcl, amazon, tiktok, walmart, ebay, etsy, woocommerce, shopware, inventory, products, returns.
</ParamField>

### Response

`BatchSyncResponse`

<ResponseField name="failed" type="integer" required>
  How many failed to queue.
</ResponseField>

<ResponseField name="queued" type="integer" required>
  How many were successfully queued.
</ResponseField>

<ResponseField name="results" type="BatchSyncChannelResult[]" required>
  One entry per requested channel with its job ID (or error reason).

  <Expandable title="BatchSyncChannelResult">
    <ResponseField name="channel" type="string" required />

    <ResponseField name="error" type="string" />

    <ResponseField name="jobId" type="string (uuid)" />

    <ResponseField name="status" type="string" required />
  </Expandable>
</ResponseField>

<ResponseField name="total" type="integer" required>
  Total channels requested.
</ResponseField>

### Status codes

| Code | Meaning |
| - | - |
| `202` | Batch sync jobs queued |
| `401` | Unauthorized |
| `422` | Validation error |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/sync/batch' \
    --header "x-stateset-api-key: $STATESET_SYNC_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "channels": [
      "string"
    ]
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 202 theme={null}
  {
    "failed": 1,
    "queued": 1,
    "results": [
      {
        "channel": "string",
        "error": "string",
        "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "status": "pending"
      }
    ],
    "total": 102
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.