CreateSalesInvoiceFromSalesOrderCommandRequestInput
Creates a sales invoice for the open quantities of a whole sales order. The open quantity is the ordered quantity minus what other invoices, drafts included, already carry; with ‘invoiceOnlyDeliveredQuantity’ only the delivered quantity counts. Without ‘asDraft’ the invoice is finalized at once and gets its number. An invoice cannot span several orders. A refusal carries ‘blockers’ with all reasons, each with a code and a message. Errors: errorCode is SALES_ORDER_NOT_FOUND (no sales order with this ID); errorCode is SALES_ORDER_NOT_INVOICEABLE (the order cannot be invoiced; the blockers say why, for example SALES_ORDER_FULLY_INVOICED, NO_OPEN_LINE_ITEMS, NOTHING_DELIVERED, SALES_ORDER_CANCELLED, SALES_ORDER_ARCHIVED, NOT_A_SALES_ORDER, SALES_ORDER_PENDING, SALES_ORDER_STATUS_INVALID, SALES_ORDER_EXTERNALLY_INVOICED, DUPLICATE_OF_INVOICE, SALES_ORDER_READ_ONLY, INVALID_KIT_OR_CONFIGURATION, CUSTOMER_MISSING, BILLING_ADDRESS_MISSING, SHIPMENT_ADDRESS_MISSING, PAYMENT_METHOD_MISSING, SHIPPING_METHOD_MISSING or TAX_SETTING_MISSING). - Request
CreateSalesInvoiceFromSalesOrderCommandRequestInputFields
The ID of the sales order.
Whether only the delivered quantities are invoiced for item, free, voucher and gift line items. Defaults to false: all open quantities are invoiced.
Whether the invoice is created as a draft: without a number, editable and not binding until it is finalized. Defaults to false: the invoice is finalized at once and gets its number.
A temporary ID chosen by the client. It is not stored and is returned unchanged.
Suppresses the automatic workflow triggers of this call. Defaults to false when omitted.
Client-supplied idempotency key. When provided, a repeated request with the same key and payload replays the original result instead of re-executing the mutation.
Was this page helpful?