---
title: "Create a new sales invoice for a salesorder"
method: POST
path: "/v2/salesinvoice/createsalesinvoice"
tags: ["SalesInvoiceDomainCommand"]
---

# Create a new sales invoice for a salesorder

`POST /v2/salesinvoice/createsalesinvoice`

## Headers

- `x-tenant-id` string, uuid, required
- `x-runas` string
- `x-companyid` string

## Request body

- JTLWawiVerkaufsverwaltungPublicApiDataTransferObjectsV2SalesInvoiceDomainCreateSalesInvoiceCommandRequest — Create a new sales invoice for a salesorder - Request
  - `salesOrderId` string, uuid
  - `invoiceOnlyDeliveredQuantity` boolean — If true, only the delivered quantities of the sales order line items are added to the new invoice.
  - `asDraft` boolean — If true, the invoice will be created as a draft. An invoice draft has no invoice number yet and can be edited until finalized.

## Response `201`

Sales invoice created successfully

---

[API](https://skmtc.net/jtl-software/apis/scx-authentication-api.md) · [All operations](https://skmtc.net/jtl-software/apis/scx-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jtl-software/scx-authentication-api/revisions/f979b1ea6951/schema)
