# Create multiple production orders at once (/docs/api-reference/production-orders/ProductionOrdersController_createBulk)

`POST /api/factories/{factoryId}/production-orders/bulk`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "description": "Product ID",
            "example": "a1b2c3d4-..."
          },
          "productName": {
            "type": "string",
            "description": "Product name for display",
            "example": "Widget A"
          },
          "batchNumber": {
            "type": "string",
            "description": "Customer's own batch identifier (free text, e.g. 'M062026-UBH')",
            "example": "M062026-UBH"
          },
          "methodId": {
            "type": "string",
            "description": "Production method ID"
          },
          "quantityTarget": {
            "type": "number",
            "description": "Target quantity to produce. Must be positive. Accepts decimals for measure-unit products (kg, L, m); integer for count-based products.",
            "example": 1000
          },
          "plannedStart": {
            "type": "string",
            "description": "Planned start date",
            "example": "2026-04-15T08:00:00Z"
          },
          "plannedEnd": {
            "type": "string",
            "description": "Planned end date",
            "example": "2026-04-20T17:00:00Z"
          },
          "shipDate": {
            "type": "string",
            "description": "Shipment date",
            "example": "2026-04-25T00:00:00Z"
          },
          "parentOrderId": {
            "type": "string",
            "description": "Parent order ID for sub-orders"
          },
          "createdBy": {
            "type": "string",
            "description": "User who created the order"
          },
          "priority": {
            "type": "string",
            "description": "Order priority",
            "enum": [
              "standard",
              "rush"
            ],
            "example": "standard"
          }
        },
        "required": [
          "productId",
          "quantityTarget"
        ]
      }
    }
  },
  "required": [
    "orders"
  ]
}
```

## Responses

### 201: Production orders created