> ## 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.

# Create a batch of orders in DCL

> DCL batch submission result

### Path parameters

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

### Request body

`object`

<ParamField body="orders" type="object[]" required>
  List of orders to submit
</ParamField>

<ParamField body="dclConfig" type="object">
  DCL batch configuration overrides
</ParamField>

### Response

`object`

<ResponseField name="success" type="boolean" required>
  Overall success indicator
</ResponseField>

<ResponseField name="results" type="object[]" required>
  Results per DCL account

  <Expandable title="results">
    <ResponseField name="accountNumber" type="string" required>
      DCL account number
    </ResponseField>

    <ResponseField name="success" type="boolean" required>
      Whether submission succeeded
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message if failed
    </ResponseField>

    <ResponseField name="orderStatuses" type="object[]" required>
      Status of individual orders
    </ResponseField>

    <ResponseField name="failedOrders" type="object[]" required>
      Orders that failed submission
    </ResponseField>

    <ResponseField name="response" type="object">
      Raw DCL response
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="orderStatuses" type="object[]" required>
  Consolidated order statuses
</ResponseField>

### Status codes

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `200` | DCL batch submission result    |
| `401` | Unauthorized                   |
| `422` | Validation error               |
| `424` | DCL integration not configured |
| `502` | DCL API error                  |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/dcl/batches' \
    --header 'x-stateset-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "orders": [
      {
        "order_number": "ORD-10042",
        "account_number": "string",
        "ordered_date": "2026-08-31T14:22:05Z",
        "shipping_address": {
          "company": null,
          "address1": null,
          "address2": null,
          "city": null,
          "state": null,
          "postal_code": null,
          "country_code": null,
          "phone": null,
          "email": null
        },
        "billing_address": {
          "company": null,
          "address1": null,
          "address2": null,
          "city": null,
          "state": null,
          "postal_code": null,
          "country_code": null,
          "phone": null,
          "email": null
        },
        "lines": [],
        "location": "string",
        "freight_account": "string"
      }
    ],
    "dclConfig": {
      "location": "string",
      "allowPartial": true
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "results": [
      {
        "accountNumber": "string",
        "success": true,
        "error": "string",
        "orderStatuses": [],
        "failedOrders": [],
        "response": {}
      }
    ],
    "orderStatuses": [
      {}
    ]
  }
  ```
</ResponseExample>
