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

# CreateProductionOrder

> Creates a new production order.

If a request with this mutation's Idempotency-Key was already completed, the response's `extensions` contains an `idempotency.{responseName}` entry with `wasReplayed: true`.



**mutation** `CreateProductionOrder(request: CreateProductionOrderCommandRequestInput!): CreateProductionOrderCommandResponse!`

## Arguments

**`request`**: `CreateProductionOrderCommandRequestInput!` (required)

## Returns

`CreateProductionOrderCommandResponse!`

**`id`**: `ID!`

The ID of the newly created production order.

## Examples

```graphql Mutation
mutation CreateProductionOrder($request: CreateProductionOrderCommandRequestInput!) {
  CreateProductionOrder(request: $request) {
    id
  }
}
```

```json Variables
{
  "request": {
    "input": {
      "productionItemId": "id",
      "billOfMaterialsId": "id",
      "lotCount": 1,
      "lotSize": "value",
      "targetTotalQuantity": "value"
    }
  }
}
```

```json Response
{
  "data": {
    "CreateProductionOrder": {
      "id": "id"
    }
  }
}
```
