Orders | Workflow

Create or update shipments and order lines, and run workflow.

If no <i>shipmentId</i> is set, the first (and possible only) shipment is used. If a non-existing shipment ID is specific, a new shipment will be created. <br /> If you target an existing shipment, by specifying shipmentId, you could also update shipment tracking link/number and shippingMethodName. If you create a new partial shipment and do not specify shipping information, shipping information will be copied from the previous existing shipment.<br /> Combination of deliveredQuantity and splitQuantity should not be used. SplitQuantity will then be ignored. <br /><br /><b>Asynchronous processing (recommended):</b> Set {enqueue: true} to process the update asynchronously via a Service Bus queue. The API returns {202 Accepted} immediately without waiting for the workflow to complete. When omitted or set to {false}, the update is processed synchronously and returns {200 OK} with the workflow result. <br /><br /> Example on how you create a partial delivered shipment (with shipmentId "2" - this could be set to any string) containing order lines with lineItemId "4" and "6", to "Completed" and run workflow for the shipment:

 POST /api/orders/1234/OrderLinesUpdate
 {
     "status": "Completed",
     "enqueue": true,
     "lineItemUpdates": [
     {
         "lineItemId": "4",
         "deliveredQuantity": 4
     },
     {
         "lineItemId": "6",
         "deliveredQuantity": 6
     }
     ],
     "shipmentInfo": {
         "shipmentId": "2",
         "shippingMethodName": "Bring"
     }
 }
        
        
<br /> Example on how you create a partial shipment without delivered items(using splitQuantity, with shipmentId "2" - this could be set to any string) containing order lines with lineItemId "4" and "6", to "InProgress" and run workflow for the shipment. If the new partial shipment should be sent from a different warehouse that original shipment, set shipmentInfo.warehouseCode. You can also specify pickup point information if the partial shipment should be delivered to a different pickup point:
 POST /api/orders/1234/OrderLinesUpdate
 {
     "status": "InProgress",
     "enqueue": true,
     "lineItemUpdates": [
     {
         "lineItemId": "4",
         "splitQuantity": 2
     },
     {
         "lineItemId": "6",
         "splitQuantity": 1
     }
     ],
     "shipmentInfo": {
         "shipmentId": "2",
         "shippingMethodName": "Bring",
         "warehouseCode": "warehouse4",
         "servicePointId": "12345",
         "pickUpPointInformation": {
             "servicePointId": "12345",
             "name": "Pickup Point Name",
             "address": {
                 "street": "Main Street 1",
                 "postalCode": "12345",
                 "city": "City Name",
                 "country": "Norway",
                 "countryCode": "NO"
             }
         }
     }
 }
        
        
<br /> Example on how you would set status for an existing shipment (with shipmentId "1") to "Completed", while setting delivered quantity and cancelled quantity:
 POST /api/orders/1234/OrderLinesUpdate
 {
     "status": "Completed",
     "enqueue": true,
     "lineItemUpdates": [
     {
         "lineItemId": "4",
         "deliveredQuantity": 4
     },
     {
         "lineItemId": "5",
         "deliveredQuantity": 2,
         "canceledQuantity": 3
     },
     {
         "lineItemId": "6",
         "canceledQuantity": 6
     }
     ],
     "shipmentInfo": {
         "shipmentId": "1"
     }
 }
        
<br />

Example on how you would split a single order line (that has more than 1 quantity), creating a partial delivery (a new shipment) which will be set to "Completed"

 POST /api/orders/1234/OrderLinesUpdate
 {
     "status": "Completed",
     "enqueue": true,
     "lineItemUpdates": [
        {
            "lineItemId": "4",
            "splitQuantity": 1
        }
     ],
     "shipmentInfo": {
         "orderStatus": "Completed",
     }
 }
post/api/Orders/{orderId}/OrderLinesUpdate

Request

  • Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
  • URL: https://api.omnium.no/api/Orders/{orderId}/OrderLinesUpdate
  • Auth: API key in header Authorization

Path parameters

orderIdstring nullable required

The ID of the order

Request body

statusstring nullable

New status to update to

userIdstring nullable

User ID

isShippingCostKeptForExistingShipmentboolean

Is shipping cost kept for existing shipment. If true, shipping cost will not be transferred to the new partial shipment. If false, shipping cost will be transferred if new shipment is completed and existing shipment is not completed

enqueueboolean nullable

When true, the update is processed asynchronously via a Service Bus queue and the API returns 202 Accepted immediately. Defaults to false (synchronous processing), but is the recommended way of using this endpoint.

Response

Success

isAbortedboolean

True if workflow failed and is aborted

Changes

No recorded changes to this operation across all 1 revision of this API.