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

# CreateSalesOrderDeliveryCommandResponse

> Delivers a sales order: reserves the stock, posts the stock outflow and creates the delivery notes with their packages in one transaction. Without 'lineItems' all open quantities are delivered; with 'lineItems' only the given quantities (a partial delivery). When 'allowPartialDelivery' is false (the default), an order that cannot be delivered completely is refused; when it is true, what is in stock is delivered. Stock is taken from 'warehouseIds' in the given order, or from all warehouses that deliver by their delivery priority. Drop-shipping and fulfillment line items get their own delivery notes, and 'oneDeliveryNotePerWarehouse' splits the rest per warehouse. Without 'packages' every delivery note gets one package with the shipping method of the sales order. A package with 'shippedAt' is created as shipped, 'markAsShipped' marks all new packages of own warehouses as shipped now, and 'createShippingLabels' requests a label for every new package whose shipping method is mapped to a shipping service (see CreatePackageShippingLabel). A label that fails does not undo the delivery: its result is in 'shippingLabelResults'. Invoices are not created by this call. A refused action reports 'errorCode' (the main reason) and 'blockers' (all reasons, each with 'code' and 'message'). errorCode is one of: SALES_ORDER_NOT_FOUND (the sales order was not found); SALES_ORDER_LINE_ITEM_NOT_FOUND (a line item does not belong to the sales order); SALES_ORDER_LINE_ITEM_REFERENCED_TWICE (a line item is given twice); CLIENT_ID_NOT_UNIQUE (two packages carry the same client identifier); QUANTITY_EXCEEDS_OPEN_QUANTITY (a quantity is larger than the open quantity of its line item); SERIAL_NUMBERS_INVALID (serial numbers are missing, too few, unknown or given for an item without serial numbers); WAREHOUSE_NOT_FOUND (a given warehouse was not found or does not deliver); SHIPPING_METHOD_NOT_FOUND (a referenced shipping method was not found or is not active); TRACKING_NUMBER_INVALID (the tracking number is empty, longer than 255 characters or does not match the rule of the shipping method); SHIPPING_DATE_OUT_OF_RANGE (the shipping date is outside the supported range); SHIPPING_METHOD_MISSING (a package or the sales order has no shipping method); SALES_ORDER_ALREADY_DELIVERED (the sales order has no open quantity); SALES_ORDER_BLOCKED (the sales order is on hold, not paid, its customer is blocked or shipping is locked; the blockers name the reasons); SALES_ORDER_NOT_FULLY_DELIVERABLE (the order cannot be delivered completely and partial delivery is not allowed); NO_ELIGIBLE_WAREHOUSE (no warehouse can deliver the sales order); DELIVERY_NOT_COMPLETED (the delivery failed and was rolled back). - Response



**Kind**: `object`

## Fields

**`deliveryNoteIds`**: `[ID!]!`

The new delivery notes.

---

**`packages`**: `[CreatedDeliveryPackage!]!`

The new packages with their delivery note and, for given packages, the client identifier.

---

**`shippingLabelResults`**: `[ShippingLabelResult!]!`

The label result per new package when labels were requested. Empty otherwise.

