API Reference

About Inventory

Products in Omnium are enriched with inventory items. The inventory item carries information about:

  • Physical inventory
  • Reserved inventory
  • Available inventory
  • Priority inventory (units to sell first)
  • Inventory location

An inventory item identifier/key is created from the variant and warehouse code. The warehouse code is the ID of the store/warehouse where the inventory is located.

Note: Adding an inventory item with a warehouseCode and a variant will override any inventory item with the same warehouseCode and inventory.

Creating Inventory Items

  • Add inventory in the GUI
  • Import/export inventory items in the GUI
  • Import through API

Inventory Item Model

For details, refer to the Omnium Inventory Model.


Reorder Suggestions

Omnium calculates reorder suggestions per inventory item, that is per SKU and warehouse, from the quantity fields on the item and the sales history. Set disableReorderSuggestions to true to switch suggestions off for one inventory item, for example a product that is being phased out in one warehouse. Omnium then generates no reorder suggestion for the item, and an existing suggestion is cleared the next time suggestions are calculated. Set the field to false to switch suggestions on again.

FieldTypeDescription
MinQuantitydecimalMinimum inventory quantity
MaxQuantitydecimalMaximum inventory quantity
ReorderMinQuantitydecimalMinimum number of items to order
DisableReorderSuggestionsboolWhen true, no reorder suggestions are generated for this inventory item. null or false leaves suggestions on.

The field is returned with the inventory item. To change it on its own, use the patch endpoints. The add many endpoint stores the posted value, so an item posted without the field switches suggestions on again. The update many endpoint writes the field only together with another changed value on the same item, because an item that differs in this field alone counts as unchanged. The inventory transaction endpoint does not change the field. When inventory rules are applied to API inventory updates, a request to the add many or update many endpoint that changes the inventory quantity of a physical inventory item is handled as inventory transactions, and the field is left unchanged for every item in that request. A request without a quantity change is handled as described above.

Reorder suggestions are generated by the Analytics Reorder Suggestions and Analytics Reorder Suggestions Delta scheduled tasks. Tenant-wide filters are described in the purchase order configuration.


Inventory Sample

Inventory items for the store OmniumBikeShop could look like this:

{
  "sku": "Topeak-43543512",
  "warehouseCode": "WebShop",
  "inventory": 19,
  "reservedInventory": 3,
  "location": null
}

In the Omnium GUI, the inventory item can be displayed as shown below:

Store in the GUI


Create Inventory Items

Add inventory items to Omnium by posting a list of OmniumInventoryItem to the add many endpoint. If the item exists, it will be overridden by the object posted to the endpoint.

For more details, visit the Create inventory items documentation.


Get Inventory Item

Get Single Inventory Item

Inventory items are fetched via a GET request to the inventory endpoint.

An optional parameter for warehouse IDs is available. If warehouseIds is empty, all inventory items for the SKU will be returned.

For more details, visit the Get inventory item documentation.

Search Inventory Items

Sample request for a delta query:

POST /api/inventory/search
{
  "LastModified": "2019-11-21T17:32:28Z"
}

Sample request for inventory for a specific market:

POST /api/inventory/search
{
  "MarketId": "NOR"
}

Sample response if the number of inventory items exceeds 2000 (totalHits):

{
  "totalHits": 41244,
  "result": [
    {
      "sku": "102103",
      "warehouseCode": "40",
      "inventory": 33,
      "reservedInventory": 7,
      "location": "32D-A2"
    },
    {
      "sku": "102104",
      ...
    }
  ],
  "scrollId": "2f842421e06e4c60bb2c4f0d8b3ef60b"
}
Note: If the total number of items exceeds 2000, the response will contain a Scroll ID, which can be used with the Scroll endpoint to fetch all remaining items.

For more details, visit the Search inventory items documentation.


Update Inventory Item

To update an inventory item, send a PUT request with the inventory object to the inventory update endpoint.

For more details, visit the Update inventory item documentation.

Update Multiple Inventory Items

To update multiple inventory items, send a PUT request to the inventory update many endpoint.

Patch Inventory Items

To change single fields without sending the whole item, send a PATCH request with the identifier of the item and only the fields to change to the patch endpoint, or a list of such patches to the patch many endpoint. The item is identified by skuId and warehouseCode, with virtualWarehouseCode for a virtual stock location. Fields that are left out stay unchanged, and the property names listed in fieldsToForceNull are cleared. The stock quantities inventory and reservedInventory cannot be patched; use the update or inventory transaction endpoints for those. Patching only updates items that exist and does not create new ones.

Sample request that switches reorder suggestions off for one inventory item:

PATCH /api/inventory
{
  "skuId": "Topeak-43543512",
  "warehouseCode": "WebShop",
  "disableReorderSuggestions": true
}

The response reports the number of items that were updated, unchanged and not found, with the identifiers of the items that were not found. A single patch for an item that does not exist returns 404 Not Found instead.


Delete Inventory Item

To delete an inventory item, send a DELETE request to the inventory endpoint:

For more details, visit the Delete inventory item documentation.

Note:The inventory item will be permanently deleted and cannot be recovered.

More Inventory Information

ATP Values

Available to Promise (ATP) refers to the available quantities of the requested product and its expected delivery due dates.

For more details, visit the ATP model documentation.

Priority Stock

priorityInventory is the number of units in inventory that should be sold first, for example a return the store took in for a product it does not carry. It is never more than inventory, and any reduction of inventory uses up priority units first.

  • Set it on existing items with PATCH /api/Inventory or PATCH /api/Inventory/PatchMany. The value is capped at the item's inventory. PATCH changes are not logged as inventory transactions.
  • Adjust it with priorityInventoryChange in POST /api/Inventory/ProcessInventoryTransactions.
  • Adding or updating whole items (POST /api/Inventory, AddMany, Update, UpdateMany, UpdateManyWithMetadata) only reads priorityInventory for items that do not exist yet. Existing items keep their stored count.
  • Inventory transactions include priorityInventoryChange for changes that are logged.

For details, see Priority Stock.


API Integrations – Best Practices

Updating Inventory in Omnium

  • Use the InventoryUpdateMany endpoint.

    • Automatically creates inventory items if they don't already exist.
    • Skips updates for unchanged items to maintain high performance, even with a large amount of inventory items.
    • Will only create inventory transactions for actual changes, so the transaction list stays clean and relevant.
  • Use batch sizes of 1000 for stability and performance.

  • If reservations are managed externally (i.e., outside Omnium):

    • Set isReservedInventoryOverwritten = true in your UpdateMany request.
    • This overwrites reservation values on the items.
    • If left null or false, existing reservations remain unchanged.
  • Avoid creating zero-value inventory items:

    • This reduces the number of inventory items and improves performance.
    • Treat missing inventory items as having a value of zero.

Fetching Inventory from Omnium

  • Full Sync - Use the InventoryScroll endpoint:

    • Intended only for occasional full synchronizations.
    • Note: It is a resource-heavy operation.
  • Delta Updates - Use the InventorySearch endpoint:

    • Set the LastModified date parameter to fetch only changed data.
    • Ideal for frequent, lightweight sync operations.
    • Set IsBatchesExcluded = true when batch data is not required.

Inventory handling in product search API

Overview

The Product Search API returns product data, including an inventory field. This field is not queried from live inventory data—it is a snapshot stored on the product itself.

Architecture

Omnium stores inventory and products separately:

  • Inventory data — The source of truth, updated in real-time via the Inventory API
  • Products — Each product has an inventory field that holds a copy of relevant inventory data

The Product Search API returns product data, including the inventory field. To keep this field in sync with the actual inventory data, a scheduled task periodically copies changes.

Synchronization

The ProductInventoryStatusScheduledTask synchronizes inventory data to products. This is a delta task that processes changes since its last run.

How it works:

  1. On each run, the task queries for inventory changes since the previous execution
  2. It updates the inventory field on affected products
  3. It refreshes the product search to make changes visible

Data freshness is determined by the task schedule. For example:

  • Schedule */5 * * * * (every 5 minutes) → inventory data on products can be up to 5 minutes stale
  • Schedule */1 * * * * (every minute) → inventory data on products can be up to 1 minute stale

The task processes only changes since the last run, so execution time depends on the volume of inventory changes. Initial runs or periods with high inventory activity will take longer. See the task configuration documentation for setup details.

Additionally, the CalculateAndUpdateProductInventory workflow step can be used in order workflows to immediately update product inventory for all SKUs in an order.

Behavior in Search Results

  • If a product has inventory in the queried market, the inventory field will be included in the response.
  • After an inventory change, the updated data will not appear in Product Search results until the synchronization runs (scheduled task or workflow step).
  • New products are automatically initialized with inventory status when the task runs.
  • New warehouses, or changes to existing warehouses are also handled automatically in the scheduled task

Example request

Request

{
  "page": 1,
  "take": 200,
  "storeId": "bike-shop-web-no",
  "productLanguage": "no",
  "sortOrder": "CreatedAscending",
  "isFacetsDisabled": true,
  "isActive": true,
  "excludedFields": {
    "isEverythingExcluded": true
  },
  "includedFields": {
    "specificFields": ["inventory"]
  },
  "productIds": ["V-553456", "DMR Vault Pedal"]
}

Response examples

Case 1: Inventory Exists

{
  "productId": "V-553456",
  "inventory": [{
    "storeId": "bike-shop-web-no",
    "quantity": 10
  }]
}

Case 2: No inventory (Field absent)

{
  "productId": "V-553457"
}

Important notes

  • The inventory field will not be present if the product has no inventory.
  • If inventory was recently updated, the scheduled task may not have processed the changes yet.