Products | Price List Items

Partially update price list items. Only non-null fields will be updated. Derived fields (DiscountedPrice, Profit, etc.) are recalculated automatically. Items that don't exist will be auto-created. The Id can be provided directly or derived from PriceListId + SkuId/ProductId.

patch/api/PriceLists/PatchPriceListItems

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

Query parameters

activatePriceListsboolean

When true, affected price lists will be activated after patching (pushes prices to products). Default: false.

enrichWithProductDataboolean

When true, product data (e.g. product name, cost price) will be fetched and stored on the price list items in the background. This can be used even when no price fields are changed in the patches — for example, to enrich existing items with product data without modifying prices. Note: the returned Omnium.Public.PriceLists.OmniumPriceListItemPatchUpdateResult will not contain the enriched product data; it is only persisted on the price list items in the background.

updateAllPriceListsboolean

When true, the base prices of the created and changed items - unit price, cost and store cost price - are also written to the same products in every other price list that has not expired and has the same currency, such as campaign price lists. Those lists keep the prices they discount to: the discount amount and percent are recalculated against the new base price, an item without a discount follows the new base price, and a discount is cleared when the new base price is at or below the discounted price. Items in the same request are left as they are sent. Runs in the background after the response; with activatePriceLists the changed items are published on the other price lists that are already active. Default: false.

Request body

idstring nullable

The Id of the price list item to patch. Format: {PriceListId}{SkuId} or {PriceListId}{ProductId}. Can be omitted if PriceListId and SkuId/ProductId are provided separately.

priceListIdstring nullable

The price list this item belongs to. Used together with SkuId or ProductId to derive the Id when Id is not set.

skuIdstring nullable

The SKU identifier. Used together with PriceListId to derive the Id when Id is not set.

productIdstring nullable

The product identifier. Used together with PriceListId to derive the Id when Id is not set. SkuId takes precedence if both are provided.

namestring nullable

Name of the price list item

unitPricenumber nullable

The unit price of the item

costnumber nullable

The cost price in cost currency. Patching it alone changes only the base cost: any existing cost discount is re-applied to the new cost, and an item without one stays undiscounted. Supply Omnium.Public.PriceLists.OmniumPriceListItemPatch.CostDiscount or Omnium.Public.PriceLists.OmniumPriceListItemPatch.CostDiscountPercent only to change the discount itself.

costCurrencyCodestring nullable

Optional per-item override for the cost currency. When set, the price-list-level cost currency is ignored for this item. If provided without CostCurrencyExchangeRate, the rate is resolved server-side via the currency service.

costCurrencyExchangeRatenumber nullable

Optional per-item override for the cost currency exchange rate to the price list currency. When omitted but CostCurrencyCode is set, the rate is resolved server-side via the currency service.

standardCostnumber nullable

Standard cost in cost currency.

standardCostInPriceListCurrencynumber nullable

Standard cost in price list currency. Recomputed by the server from StandardCost x CostCurrencyExchangeRate; values set by the caller are overwritten.

discountnumber nullable

The absolute discount amount for the price list item, in price list currency. Discount, DiscountPercent and DiscountedPrice are three ways to express the same discount. When more than one is supplied, the absolute Discount takes precedence, then DiscountPercent, then DiscountedPrice. Any of the three you omit is reset (it is not carried over from the stored value), so the supplied field alone drives the result.

discountPercentnumber nullable

The discount expressed as a percentage of UnitPrice (e.g. 20 for 20%). See Omnium.Public.PriceLists.OmniumPriceListItemPatch.Discount for how it interacts with Discount and DiscountedPrice.

discountedPricenumber nullable

The resulting price after discount, in price list currency. Must be less than UnitPrice to register a discount. See Omnium.Public.PriceLists.OmniumPriceListItemPatch.Discount for how it interacts with Discount and DiscountPercent.

costDiscountnumber nullable

Cost discount amount, in cost currency. Deducted from Omnium.Public.PriceLists.OmniumPriceListItemPatch.Cost to give the discounted cost. Supply either this or Omnium.Public.PriceLists.OmniumPriceListItemPatch.CostDiscountPercent — the server derives the other, and 0 clears the discount.

costDiscountPercentnumber nullable

The cost discount expressed as a percentage of Omnium.Public.PriceLists.OmniumPriceListItemPatch.Cost (e.g. 20 for 20%). When both are set they must agree: the percentage is only kept to two decimals, so the amount is used as given when it matches, and takes over only when the two contradict each other.

storeCostPricenumber nullable

Store cost price in price list currency. When it is not set, StoreCostPriceAdditionPercent is used to derive it.

storeCostDiscountnumber nullable

Discount on the store cost price, in price list currency. Deducted from StoreCostPrice to give StoreDiscountedCostPrice. Supply either this or StoreCostDiscountPercent — the server derives the other.

storeCostDiscountPercentnumber nullable

The store cost discount expressed as a percentage of StoreCostPrice (e.g. 20 for 20%). When both are set they must agree: the percentage is only kept to two decimals, so the amount is used as given when it matches, and takes over only when the two contradict each other.

storeCostPriceAdditionPercentnumber nullable

Addition percentage on discounted cost, used to derive the store cost price when StoreCostPrice is not set.

taxRatenumber nullable

Optional tax rate override for this item. If null, the price list's tax rate is used. Set to a value (e.g. 0, 12, 25) to override, or omit to leave unchanged.

tagsstring[] nullable

Tags for categorizing/labeling price list items (e.g. "Last Chance", "Clearance").

plannedSalesVolumenumber nullable

Planned sales volume (units) - primary planning input

plannedRevenuenumber nullable

Planned revenue calculated from PlannedSalesVolume x DiscountedPrice

planningCommentstring nullable

Optional internal comment for planning context

plannedPurchaseVolumenumber nullable

Planned purchase volume (units) - expected purchasing quantity for the campaign

planningPurchaseCommentstring nullable

Optional internal comment for purchase planning context

Response

Success

totalCountinteger
updatedCountinteger
createdCountinteger
unchangedCountinteger
notFoundCountinteger
notFoundIdsstring[] nullable
errorCountinteger
errorMessagestring nullable
isModifiedboolean

Changes

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