Workflow Endpoints

API reference for order workflow endpoints. Update order and shipment statuses, handle partial deliveries, split shipments, and trigger workflow steps like payment capture, notifications, and inventory updates.

The Workflow API allows you to progress orders through their lifecycle by updating statuses and triggering configured workflow steps. Workflow steps can automatically capture payments, send notifications, book shipments, reduce inventory, and more.

For configuring workflows and workflow steps, see Order Workflows and Workflow Steps.

Base URL

https://api.omnium.no/api/Orders

Full Swagger reference: Omnium Order Workflow API Documentation


Update order status

Update the status of an order or a specific shipment, and run the associated workflow.

Endpoint: POST /api/Orders/{orderId}/UpdateStatus

Authorization: Order Admin

Parameters:

ParameterTypeLocationRequiredDescription
orderIdstringpathYesThe order ID

Request body: UpdateStatusPatch

Update order status

Set a new status on the entire order and trigger the workflow.

{
  "status": "InProgress"
}

Update shipment status

Target a specific shipment by setting shipmentId on the shipmentInfo object. The workflow runs for that shipment only. If all shipments reach the same status, the order status is updated automatically.

{
  "status": "Completed",
  "shipmentInfo": {
    "shipmentId": "1",
    "trackingUrl": "https://tracking.bring.com/12345"
  }
}

Update status without running workflow

Set skipRunWorkflow to true to update the status without executing any workflow steps. Useful when syncing status from an external system.

{
  "status": "Completed",
  "skipRunWorkflow": true
}

Response: 200 OK with WorkflowExecutionResult

Error responses:

StatusMeaning
400Missing status, or order is in a queued/read-only state
404Order not found
409Order is locked by another operation
500Internal error

Update order lines and shipments

Create or update shipments and order lines, then run the workflow. This is the primary endpoint for handling partial deliveries, split shipments, and line-item-level status updates.

Endpoint: POST /api/Orders/{orderId}/OrderLinesUpdate

Authorization: Order Admin

Parameters:

ParameterTypeLocationRequiredDescription
orderIdstringpathYesThe order ID

Request body: UpdateLineItemStatusPatch

Deliver items from an existing shipment

Mark specific line items as delivered on an existing shipment and trigger the workflow.

{
  "status": "Completed",
  "lineItemUpdates": [
    {
      "lineItemId": "4",
      "deliveredQuantity": 4
    },
    {
      "lineItemId": "6",
      "deliveredQuantity": 6
    }
  ],
  "shipmentInfo": {
    "shipmentId": "1"
  }
}

Create a partial delivery (new shipment)

Deliver some items in a new shipment while keeping the remaining items in the original shipment. If the shipmentId does not exist, a new shipment is created. Shipping information is copied from the original shipment unless overridden.

{
  "status": "Completed",
  "lineItemUpdates": [
    {
      "lineItemId": "4",
      "deliveredQuantity": 4
    },
    {
      "lineItemId": "6",
      "deliveredQuantity": 6
    }
  ],
  "shipmentInfo": {
    "shipmentId": "2",
    "shipmentMethodName": "Bring"
  }
}

Split shipment without delivering

Move items to a new shipment without marking them as delivered. Use splitQuantity instead of deliveredQuantity. You can optionally specify a different warehouse or pickup point for the new shipment.

{
  "status": "InProgress",
  "lineItemUpdates": [
    {
      "lineItemId": "4",
      "splitQuantity": 2
    },
    {
      "lineItemId": "6",
      "splitQuantity": 1
    }
  ],
  "shipmentInfo": {
    "shipmentId": "2",
    "shipmentMethodName": "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"
      }
    }
  }
}

Deliver and cancel items

Deliver some items and cancel others in the same request.

{
  "status": "Completed",
  "lineItemUpdates": [
    {
      "lineItemId": "4",
      "deliveredQuantity": 4
    },
    {
      "lineItemId": "5",
      "deliveredQuantity": 2,
      "canceledQuantity": 3
    },
    {
      "lineItemId": "6",
      "canceledQuantity": 6
    }
  ],
  "shipmentInfo": {
    "shipmentId": "1"
  }
}

Split a single order line

When an order line has a quantity greater than 1, you can split it into a new partial shipment.

{
  "status": "Completed",
  "lineItemUpdates": [
    {
      "lineItemId": "4",
      "splitQuantity": 1
    }
  ],
  "shipmentInfo": {
    "orderStatus": "Completed"
  }
}

Do not combine deliveredQuantity and splitQuantity on the same line item. If both are provided, splitQuantity is ignored.

Response: 200 OK with WorkflowExecutionResult

Error responses:

StatusMeaning
400Missing or empty line item updates, or order is queued
404Order or line item not found
409Order is locked by another operation
500Internal error

Workflow test (dry run)

Run a workflow in test mode against a cart. No changes are persisted to the order or shipment. Useful for previewing which workflow steps would execute before actually placing the order.

Endpoint: POST /api/Orders/{cartId}/processCartWorkflowTest/{status}

Authorization: Order Admin

Parameters:

ParameterTypeLocationRequiredDescription
cartIdstringpathYesThe cart ID to test against
statusstringpathYesThe status to simulate (e.g., "New", "InProgress")

Response: 200 OK with WorkflowExecutionResult

This is a read-only operation. The cart and any resulting order are not modified. Use this to verify your workflow configuration before going live.


Models

Update status patch model

PropertyTypeRequiredDescription
StatusstringYesNew status to set (e.g., "New", "InProgress", "InTransit", "ReadyForPickup", "Completed", "OrderCanceled", "PartiallyShipped")
ShipmentInfoUpdateShipmentInfoNoShipment to target and optional shipment data updates
SkipRunWorkflowboolNoIf true, only updates the status without running workflow steps (default: false)
ReturnIdstringNoReturn order form ID, for return order workflows
UserIdstringNoUser identifier to record on the status change

Update line item status patch model

PropertyTypeRequiredDescription
StatusstringYesNew status for the shipment/order
LineItemUpdatesList<LineItemUpdate>YesLine items to update (max 250)
ShipmentInfoUpdateShipmentInfoNoTarget shipment and optional updates. If the shipment ID doesn't exist, a new shipment is created
IsShippingCostKeptForExistingShipmentboolNoIf true, shipping cost stays on the original shipment when splitting. If false, cost transfers to the new shipment when it is completed and the original is not (default: false)
UserIdstringNoUser identifier

Line item update model

PropertyTypeRequiredDescription
LineItemIdstringYesThe line item ID to update
DeliveredQuantitydecimalNoQuantity to mark as delivered
CanceledQuantitydecimalNoQuantity to cancel
SplitQuantitydecimalNoQuantity to move to a new shipment without delivering
ReadyForPickupQuantitydecimalNoQuantity ready for customer pickup (Click & Collect)
ReallocateQuantitydecimalNoQuantity to reallocate to another warehouse
Costdecimal?NoOverride cost price per unit

Use deliveredQuantity when items are shipped/fulfilled. Use splitQuantity when you need to move items to a different shipment without marking them as delivered (e.g., items shipping from a different warehouse later).


Update shipment info model

Allows you to target a specific shipment and optionally update shipment metadata in the same request.

PropertyTypeRequiredDescription
ShipmentIdstringNoShipment to target. If omitted, the first shipment is used. If the ID doesn't exist, a new shipment is created
OrderStatusstringNoStatus to set on the shipment specifically (if different from the order status)
ShipmentMethodNamestringNoUpdate or set the shipping method
TrackingUrlstringNoCarrier tracking URL
TrackingNumberstringNoCarrier tracking number
LabelLinkstringNoLink to the shipping label
ReturnLabelLinkstringNoLink to the return shipping label
ReturnTrackingLinkstringNoReturn tracking URL
ReturnTrackingNumberstringNoReturn tracking number
ShippingMethodProductIdstringNoShipping method product identifier
CommentstringNoReplaces the comment on the shipment
WarehouseCodestringNoWarehouse the shipment is sent from
ServicePointIdstringNoPickup point / service point ID
PickUpPointInformationPickUpPointNoFull pickup point details
PackagesList<ShipmentPackage>NoPackage details with dimensions and tracking (max 250)
ExternalIdsList<OmniumExternalId>NoAdd/update external IDs on the shipment (max 250)
PropertiesList<OmniumPropertyItem>NoAdd/update custom properties on the shipment (max 250)

Pickup point model

PropertyTypeDescription
ServicePointIdstringService point identifier from the shipping provider
NamestringPickup point display name
AddressPickUpPointAddressPickup point address
OpeningHoursList<OpeningHour>Opening hours (day, from, to)

Pickup point address model

PropertyTypeDescription
StreetstringFull street address
StreetNamestringStreet name
StreetNumberstringStreet number
PostalCodestringPostal code
CitystringCity
CountrystringCountry name
CountryCodestringISO country code

Shipment package model

PropertyTypeDescription
IdstringPackage identifier
WeightInKgdoublePackage weight in kilograms
Volumedouble?Package volume in liters
GoodsDescriptionstringDescription of package contents
BarcodestringPackage barcode (e.g., for goods reception)
DimensionsDimensionsPackage dimensions
ShipmentTrackingTrackingPer-package tracking information
LineItemReferencesList<LineItemReference>Links packages to specific line items and quantities

Dimensions model

PropertyTypeDescription
HeightInCmintHeight in centimeters
WidthInCmintWidth in centimeters
LengthInCmintLength in centimeters

Tracking model

PropertyTypeDescription
ShipmentTrackingNumberstringCarrier tracking number
ShipmentTrackingLinkstringCarrier tracking URL
ShipmentLabelLinkstringLink to the shipping label

Workflow execution result model

Returned by all workflow endpoints. Contains the execution result of each workflow step and the updated order.

PropertyTypeDescription
OrderOmniumOrderThe updated order after workflow execution
IsAbortedboolTrue if the workflow failed and was aborted
OrderActionExecutionResultsList<ActionResult>Results for each executed workflow step (max 250)

Action result model

PropertyTypeDescription
ActionTypestringWorkflow step type (e.g., "CapturePayment", "Notification", "ReduceInventory", "BookShipment")
ActionStatusstring"Success", "Warning", or "Error"
ErrorReasonstringError description if the step failed
CancelWorkflowboolWhether this step caused the workflow to abort
IsInvisibleboolWhether this step result should be hidden from end users

Example response:

{
  "order": {
    "id": "ORD-2024-000001",
    "status": "Completed",
    "orderForm": { }
  },
  "isAborted": false,
  "orderActionExecutionResults": [
    {
      "actionType": "CapturePayment",
      "actionStatus": "Success",
      "cancelWorkflow": false
    },
    {
      "actionType": "Notification",
      "actionStatus": "Success",
      "cancelWorkflow": false
    },
    {
      "actionType": "ReduceInventory",
      "actionStatus": "Success",
      "cancelWorkflow": false
    }
  ]
}

When isAborted is true, check the orderActionExecutionResults to identify which step failed and why. The order may have been partially updated depending on which steps succeeded before the failure.