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

# CreateSalesInvoice

> Creates a new sales invoice for a sales 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** `CreateSalesInvoice(request: CreateSalesInvoiceCommandRequestInput!): CreateSalesInvoiceCommandResponse!`

## Arguments

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

## Returns

`CreateSalesInvoiceCommandResponse!`

**`salesInvoiceId`**: `ID!`

The ID of the created sales invoice

## Examples

```graphql Mutation
mutation CreateSalesInvoice($request: CreateSalesInvoiceCommandRequestInput!) {
  CreateSalesInvoice(request: $request) {
    salesInvoiceId
  }
}
```

```json Variables
{
  "request": {
    "salesOrderId": "id"
  }
}
```

```json Response
{
  "data": {
    "CreateSalesInvoice": {
      "salesInvoiceId": "id"
    }
  }
}
```
