Products | Prices

Put one or more prices to a product in Omnium. Will overwrite existing price if found, or add a new price if no match is found. The price is identified by checking CustomerId, CustomerGroup, VariantId, MarketId, MarketGroupId, CurrencyCode, SalesCode, PromotionId, StoreId, and PriceListId. If IgnoreDates is false, dates are also considered when fetching existing prices. <br />By default (PricesMergeMode = Replace) a matched price is overwritten in full, so fields you do not send are reset to their defaults. Set PricesMergeMode to AddOrUpdate or UpdateOnly to only apply the fields you send and keep the existing values for the rest. See OmniumPriceUpdateRequest.PricesMergeMode for details. <br /><br />ProductId can be omitted when every price in the request carries the SKU in its Code property - Omnium then resolves the product from the SKU. This is intended for source systems that only know the SKU. SKUs that match no product (UnresolvedCodes) or more than one product (AmbiguousCodes) are skipped and returned in the response; the rest of the request is still applied.

Sample request using SKU only (no ProductId). Use this when the source system does not know Omnium's ProductId. Each price is matched to its variant by "code", so sizes/colours can have different prices:

PUT /api/prices/AddMany
[
  {
    "prices": [
      { "code": "SKU-SHIRT-S", "unitPrice": 199, "currencyCode": "NOK", "marketId": "NOR", "validFrom": "2026-01-01T00:00:00Z" },
      { "code": "SKU-SHIRT-L", "unitPrice": 249, "currencyCode": "NOK", "marketId": "NOR", "validFrom": "2026-01-01T00:00:00Z" }
    ]
  }
]
        

The SKUs above may belong to different products - Omnium groups them per product on its own. Response:

{
  "updatedProductCount": 1,
  "unresolvedCodes": null,
  "ambiguousCodes": null
}
        

Sample request using ProductId (unchanged behaviour). "code" still selects the variant, and omitting it puts the price on product level:

PUT /api/prices/AddMany
[
  {
    "productId": "P-12345",
    "ignoreDates": true,
    "prices": [
      { "code": "SKU-SHIRT-S", "unitPrice": 199, "currencyCode": "NOK", "marketId": "NOR" }
    ]
  }
]
        

Sample response when some SKUs could not be used. The prices for these SKUs were NOT applied, everything else in the request was. "unresolvedCodes" means the SKU does not exist in Omnium; "ambiguousCodes" means it exists under several products, so send ProductId for those:

{
  "updatedProductCount": 42,
  "unresolvedCodes": ["SKU-DISCONTINUED"],
  "ambiguousCodes": ["SKU-DUPLICATED"]
}
        

NB! Sending the SKU in "productId" does not work - the price would be silently ignored. Either leave "productId" out entirely and set "code" on every price, or send the real ProductId.

put/api/Prices/AddMany

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/Prices/AddMany
  • Auth: API key in header Authorization

Request body

productIdstring nullable

ProductId of the product to update. (If multiple language versions, all versions will be updated.) <br />Optional: can be omitted when every price in the request carries the SKU in its Code property. Omnium then resolves the product from the SKU, and the SKUs in one request may belong to different products. SKUs that match no product are reported in OmniumPriceUpdateResult.UnresolvedCodes.

ignoreDatesboolean

If true, prices for variant will replace existing prices with other dates. If false, only prices with exact same dates will be overridden.

ignoreValidUntilDateboolean

If true, prices for variant will replace existing prices with other dates for the "ValidUntil" property, but will still need an exact match for the "ValidFrom" property. This will only work if "IgnoreDates" is set to "false".

pricesMergeMode'UpdateOnly' | 'AddOrUpdate' | 'Replace'

Controls how a list on an Omnium.Public.Orders.Models.Patch.OmniumOrderPatch (e.g. Payments, Shipments) is merged into the target.

Response

Success

updatedProductCountinteger

Number of products the supplied prices were applied to.

unresolvedCodesstring[] nullable

SKUs (the Code on the price) that matched no product in Omnium. Their prices were NOT applied - the rest of the request was. Null when every SKU was recognised.

ambiguousCodesstring[] nullable

SKUs (the Code on the price) that exist under more than one product in Omnium, which makes it impossible to tell which product the price belongs to. Their prices were NOT applied - the rest of the request was. Send ProductId explicitly for these SKUs, or resolve the duplicate products. Null when there were none.

Changes

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