CreateShippingRunCommandResponse
Starts a shipping run: delivers many sales orders in one go. The run works asynchronously; read its state with GetShippingRun and the result per sales order with QueryShippingRunOrdersByShippingRunId. First every sales order is checked like a single delivery: blocked or not deliverable orders are skipped and their blockers recorded. Then all remaining orders are delivered together in one transaction, each completely (or what is in stock with ‘allowPartialDelivery’) with one package with the shipping method of the order; if the delivery fails technically, no order of the run is delivered and the run fails. Then, if requested, a label is requested for every new package (see CreatePackageShippingLabel) and failed labels are recorded per order without undoing the delivery, or the new packages are marked as shipped. Printing is done by the print service. This is the one set-wise write of the domain, justified by the volume of a shipping day; the single delivery stays CreateSalesOrderDelivery. errorCode is one of: SALES_ORDER_IDS_INVALID (the list is empty, has more than 2000 entries or names a sales order twice); SHIPPING_RUN_ID_CONFLICT (a shipping run with this ID exists with a different request); WAREHOUSE_NOT_FOUND (a given warehouse was not found or does not deliver). - Response
CreateShippingRunCommandResponseFields
The ID of the shipping run.
Was this page helpful?