API Reference
Introduction to Omnium Orders
An order in Omnium could originate from any sales channel and operate and behave in different ways. For instance, it could be an order placed from a web shop, a sale from POS, or a click&collect reservation. As a modern order management system, Omnium accepts all types of orders, and offers customizable workflows for all kinds.
In this section you’ll (hopefully) learn everything you need to know to get started importing, managing and reading orders using Omnium’s API.
Order properties
When working with the Order API, the same model is used for adding, updating and fetching orders.
Crucial properties
ID
The ID of the order must be unique. If you want Omnium to generate an order number, this is possible using the X API when adding orders.
Customer ID: This is usually set to the customer’s phone number, email or ID from an external system. We accept everything, but try avoid 'special characters' such as '+' or '%'.
MarketId
The order must have a market ID which corresponds to a market added to Omnium. A market would typically be “Epic Enterprise Norway”, which would contain stores such as “Epic Enterprise Webshop” and “Epic Enterprise Store New York”. Markets are not entities that are added to Omnium, but settings that are configured.
StoreId
The order must also have a “StoreId” set which corresponds to a store in Omnium. The StoreId should represent the selling store. Unlike markets, stores are entities that are created or imported to Omnium.
OrderType
The OrderType must be set to a corresponding OrderType defined in the Omnium configuration, which will ensure the correct workflow is executed when the order is processed.
Status
The order status defines the current state of the order and should also match a status defined for the current OrderType. Typically, this would be set to "New" for orders that has yet been processed (not yet shipped for instance, and/or payment has not been captured).
Complete model
The full order model definition can be found in
swagger.
OrderForm and LineItems(Order Lines)
Each order contains an order form. The order form contains lists of order lines, payments and shipments. LineItems is a list of order lines, each order line contains price(s), quantity, product data and various meta data.
Shipments
The order form contains one or multiple shipments. A shipment contains shipping information and order lines. An order will usually only contain a single shipment, but for partial deliveries or multiple senders or recipients, there will be multiple shipments. A shipment contains one or multiple order lines, and an order line cannot be added to multiple shipments. A shipment must also contain a "warehouseCode". This should be set to the ID of a store in Omnium that is the shipment sender.
Payments
For every order, there should be a payment corresponding to the total amount of the order. Most commonly, an order will be sent to Omnium after the order has been placed from an e-commerce site. That means that the payment should already be authenticated in the payment provider (such as Klarna, Paypal or Vipps). Omnium will then be able to void, capture or credit the payment later on in the order process.
For an overview of supported payment providers and integration setup, see Payments.
Key Concepts
-
Omnium does not provide a checkout widget. Your frontend application is responsible for integrating directly with the payment provider (using their SDK, redirect, or widget).
-
Omnium stores and manages payment records. Once the provider has authorized the transaction, you must attach the payment details to the cart in Omnium.
-
Omnium executes post-order operations. After the order is created, Omnium can capture, refund, or void the payment through the configured provider integration.
Checkout Flow
The checkout flow typically looks like this:
- Customer completes checkout in your storefront.
- Frontend initiates payment with the chosen provider.
- Provider returns transaction details such as transaction ID, amount, and status.
- Frontend calls Omnium APIs to build the cart:
AddPaymentToCartAddShipmentToCartAddCustomerAddStore
- Cart is placed as an order in Omnium.
- Omnium can later capture, refund, or void the payment.
Adding a Payment to a Cart
Once the provider confirms the payment, you must register it in Omnium.
Endpoint
Example payload
Payment Properties
| Property | Type | Description | Information |
|---|---|---|---|
| PaymentMethodName | string | Value to identify correct payment provider ("Klarna" for instance) | Required |
| TransactionId | string | Unique id for this payment (from payment provider) | Required |
| TransactionType | string | "Authorization", "Captured", "Credit", "Invoiced", "ReleaseRemainingAuthorization" or "Invoiced" | Required |
| Status | string | "Processed" when successful, and "Failed" on unsuccessful | Required |
| Amount | decimal | The amount for this payment transaction | Required |
Multiple Payments
An order can have multiple payment transactions. Common scenarios include:
- Gift card + credit card: Customer pays partially with a gift card and the rest with a credit card
- Split payments: Payment split across multiple methods (e.g., invoice + card)
- Bonus points + card: Customer uses loyalty points for part of the purchase
When an order has multiple payments:
- Payments are stored in a list (
orderForm.payments) - During capture, Omnium processes payments in the order they appear in the list
- For refunds, Omnium typically credits back to the original payment methods
Example: Gift Card + Klarna
Transaction Types
Understanding transaction types is essential for managing payments correctly.
Common Transaction Types (for API consumers)
| Type | Description | When to use |
|---|---|---|
Authorization | Payment is reserved but not yet charged | E-commerce checkout - initial payment |
Capture | Payment has been charged from customer | When order is shipped/fulfilled |
Sale | Immediate capture (no separate authorization) | POS/in-store orders where payment is taken immediately |
Credit | Refund back to customer | Returns, cancellations, or partial refunds |
Invoiced | Invoice-based payment | Klarna invoice, Walley invoice, etc. |
Void | Authorization cancelled | When cancelling an order before capture |
Internal Transaction Types (set by Omnium)
These are typically set by Omnium internally and not by API consumers:
| Type | Description |
|---|---|
AwaitingAuthorization | Used for paylinks and in-store payments waiting for customer to complete payment |
ReleaseRemainingAuthorization | When releasing unused authorization after partial capture |
Settlement / SettlementFee / SettlementRefund | Provider settlement and reconciliation transactions |
Bookkeeping / CreditBookkeeping | Internal accounting transactions |
POS vs E-commerce
POS / In-store orders:
- Use
transactionType: "Sale"- payment is captured immediately at point of sale - No separate authorization/capture flow needed
E-commerce orders:
- Use
transactionType: "Authorization"when registering the payment from checkout - Omnium workflows automatically handle
Capture,Credit, andVoidbased on order status changes
Payment Lifecycle
- Authorization: Payment provider reserves funds on customer's account
- Capture: When you ship the order, Omnium captures (charges) the payment
- Credit: If customer returns items, Omnium can issue a refund
Important: Authorizations expire! Most providers allow 7-30 days before the authorization expires. Check authorizationExpires field.
Payment API Endpoints
On Cart (before order is created)
| Endpoint | Method | Description |
|---|---|---|
/api/Carts/{id}/AddPayments | PUT | Add or update payments on cart |
/api/Carts/{id}/RemovePayments | PUT | Remove payments from cart |
/api/Carts/{id}/GetPaymentOptions | GET | Get available payment methods for the cart's market |
On Order (after order is created)
| Endpoint | Method | Description |
|---|---|---|
/api/Orders/{id}/AddPayments | POST | Add new payments to an existing order |
/api/Orders/{id}/PutPayments | PUT | Replace all payments on an order |
/api/Orders/{id}/GetPaymentOptions | GET | Get available payment methods |
Which Endpoint Should I Use?
- Adding payment during checkout: Use
PUT /api/Carts/{id}/AddPayments - Need to update payment after order is created: Use
POST /api/Orders/{id}/AddPayments - Need to completely replace payment list: Use
PUT /api/Orders/{id}/PutPayments
In-Store Payments and Paylinks
Many Omnium payment integrations also support in-store payments. This is typically done by generating a paylink, which is sent to the customer so they can complete the payment on their own device.
Paylinks are most commonly used for:
- Payments over the phone
- Offsite payments where the customer is not physically present
For web checkouts, the approach is different:
- Your website must implement the full checkout flow with the provider.
- You must also handle the provider's authorization callback before registering the payment in Omnium.
Discount
Omnium supports a flexible discount system that allows you to apply discounts at different levels (order, line item, shipping) and in different ways (fixed amount, percentage, multi-buy offers, etc.).
Ways to Add Discounts
There are three main approaches to adding discounts:
| Approach | Where | Use case |
|---|---|---|
| Simple | lineItem.discounted | Quick, flat discount amount on a single order line |
| Advanced | orderForm.discounts[] | Order-level or line-item discounts with full control (%, fixed, multi-buy, etc.) |
| Shipping | shipment.discounts[] | Free shipping or reduced shipping cost |
Simple Discount: Set the discounted property directly on an order line. This is the easiest way to apply a flat discount to a specific product. The discounted value is the total discount amount for that line item.
Advanced Discount: Add discount objects to the orderForm.discounts array. This gives you full control over:
- Discount type (order-level vs. line-item)
- Reward type (percentage, fixed amount, multi-buy, fixed price bundles)
- Which SKUs the discount applies to
- Priority and stacking rules
Shipment-Specific Discount: Add discount objects to shipment.discounts. Typically used for "free shipping" promotions.
Reward Types
The reward type determines how discountValue is interpreted:
| Value | Type | Description | Example |
|---|---|---|---|
| 0 | None | No reward | - |
| 1 | Money | Fixed monetary discount | discountValue: 50 = 50 NOK off |
| 2 | Percentage | Percentage off | discountValue: 20 = 20% off |
| 3 | Free | Item is free (100% off) | Typically discountValue: 100 |
| 4 | FixedPrice | Multiple items for a fixed total | "4 items for 99" - use promotionFixedPriceReward |
| 5 | Gift | Free gift included | - |
| 6 | MultiBuys | Buy X get Y free/discounted | "3 for 2" - use promotionMultiBuyReward |
| 7 | Kit | Set discount | Buy one from each group A, B, C - get discount on the set |
Discount Types
The discount type determines what the discount applies to:
| Value | Type | Description |
|---|---|---|
| 0 | None | No specific type |
| 1 | LineItem | Applies to specific order lines (use skuIds to specify which) |
| 2 | Order | Applies to the entire order total |
| 3 | Shipping | Applies to shipping cost (add to shipment.discounts) |
| 4 | Manual | Manually added discount (from UI) |
| 5 | BonusPoints | Paid with customer club bonus points |
Priority and Combining Discounts
When multiple discounts exist, use the priority field to control the order of application:
- Lower values are applied first (0 = highest priority, applied first)
- This is important because earlier discounts affect the base for later percentage calculations
Use canBeCombinedWithOtherPromotions to control whether discounts can stack:
true: This discount can stack with other promotionsfalse: This discount may exclude other discounts (depending on configuration)
Use alwaysApply: true for discounts that should never be blocked by exclusivity rules.
Examples
Simple: Discounted Order Line
Advanced: 20% Order-Level Discount
Advanced: $10 Order-Level Discount
Advanced: Fixed Price Order Line Discount
All items involved in the fixed price promotion should be added to the list skuIds. The promotion calculator will prioritize items from highest to lowest price.
If the setting SplitMultibuyPromotionOrderLines is true, the order lines involved in the promotion will be split to have quantity = 1 per order line.
Advanced: 3 for 2 Order Line Discount
All items involved in the multi-buys promotion should be added to the list skuIds. By default, the promotion calculator will prioritize items from lowest to highest price. This can be changed with the setting SortMultibuyItemsDescending.
Advanced: Combination of Fixed Price and Percentage Order Line Discounts
Order the discounts from highest priority.
Shipping Discount
Price properties
The order line consists of multiple price properties. Generally, only the PlacedPrice and TaxRate should be set, in order for the other price properties to be calculated correctly.
PlacedPrice The full price per item, without any discounts added. The PlacedPrice should not be multiplied by quantity.
DiscountedPrice
This price is calculated by the order calculator and should not be set manually.
The discounted price is the total price of the order line reduced by the order line level discounts applied. Any order level discounts are not applied to the discounted price.
The discounted price is calculated with the following formula:
DiscountedPrice = ( ( Quantity - CanceledQuantity ) * PlacedPrice ) - ( ( Discounted / Quantity ) * ( Quantity - CanceledQuantity ) )
ExtendedPrice
This price is calculated by the order calculator and should not be set manually.
The extended price is the total line item price with all discounts applied, including both order line level and order level discounts.
The extended price is calculated with the following formula:
ExtendedPrice = DiscountedPrice - ( ( DiscountedPrice / ( [ Sum of DiscountedPrice for all order lines ] ) * DiscountAmount )
SuggestedRetailPrice
This price is not used in any calculations, and will not be changed by Omnium.
The placed price could be a customer-specific price based on price agreements (e.g., 10% off suggested retail price). In these scenarios, the placed price would already contain a discount, and the suggested retail price could be used to indicate savings for the end customer by comparing suggested retail price to the discounted price.
The price could also be used for reports or statistics by third-party applications.
Price Example This is an example of how the prices would look after calculation when a 10% order discount is added to the order. The case is that the customer bought two products with an original price of $500, but with a 10% discount. So, the customer paid 2 x (500 - 10%) = 900.
Order types
The order type is used for triggering different workflows. A point of sale order can have a different process than an online order.
The order type string is a free text string, but orders in Omnium should have a corresponding order type in the settings in order for workflows to run correctly.
Omnium has five predefined order types, commonly used:
| Order type | Description |
|---|---|
| Pos | Order from Point of Sale system |
| Online | Order from B2B / B2C web portals |
| ClickAndCollect | Click and collect orders (Not paid) |
| Bopis | Buy online, pick up in store (Paid) |
| PreOrder | Orders placed for products that are not yet released |
Adding orders
An order can be added to Omnium in numerous ways. It can be:
- Imported via API
- Created from a cart via API
- Created from a cart via Omnium's UI
- Created from Omnium's UI
- Imported from Excel via Omnium's UI
Example: Creating an order
In order to meet multiple demands and be as flexible as Omnium is, Omnium’s order model is rather large and contains many fields. Most likely, you’ll not be in need of all of them. Below is a basic example of how to add an order, using the POST /api/Orders API.
Relevant swagger documentation
Fetching orders
There are multiple endpoints that could be used to retrieve an order, as there are various ways of searching for an order. This could be faceted free-text searching, filtered search by customer metadata or product data, or simply fetching a single order using the order ID.
Get a single order
Standard Online order
This is the data from the order created in the order creation example.
Updating orders
There are multiple ways an order could be update, and multipe reasons to update an order. Sometimes, you would only like to update data on an order, without triggering any other logic. For this, the patch endpoint would typically be a good fit.
Triggering workflows
An order update often involves a status update which should trigger a workflow in Omnium. A workflow contains workflow steps which triggeres actions configured for the current status. Examples of this could be to capture payment, send email/sms, book shipping, or reduce inventory. Workflows are an essencial part of how Omnium works. More information
There are endpoints specifically created for the purpose of updating order status and the workflow connected to the status: More information
Order/order-config#workflow-steps
Errors
The orders contain a list of errors in the property Errors. This is a list of OmniumEntityError, a class designed to capture detailed information about errors related to order processing. To add error messages to an order, simply add new items to this list.
Validate Order
Webhook validation for orders can be enabled from order settings in configuration. The validator will be run on all updates to the order from the UI. It’s possible to add custom validation using the webhook validator. The webhook validator will post the order. to a provided endpoint, and accept the validated order as response.
Add the webhook validator to Connectors in settings:
Required properties
| Property | Sample value | Description |
|---|---|---|
| Name | webhookOrderValidator | Name of Omnium connector provider. In this case it must be "webhookOrderValidator" |
| Host | https://acme.com | Endpoint host |
| Implementations | "IWebhookOrderValidator" | Connector capabilities. Must include IWebhookOrderValidator. |
