Prices
There are two routes that can be taken in order to retrieve prices.
Import all prices from v1/Prices GET endpoint(s) and perform price calculation to determine current price per variant. See the recommended pricing rules listed below.
The benefit of this method is that the external platform also knows the Start- and EndDates of all future prices and discounts, meaning they can go into- and out of effect dynamically.
Four different types of prices can be returned by v1/Prices GET endpoints.
Regular product prices
Regular variant prices
Discount product prices
Discount variant prices
Important rules of the v1/Prices GET endpoints are as follows:
Discount prices always have a DiscountTypeId.
Every price that is not deleted and does not have an EndDate in the past, is in the response. Note that Delta endpoints do return deleted prices, signified by the IsDeleted line.
By default, only EUR prices are returned. If other currencies are used, use the CurrencyCode Prices endpoints to retrieve
The v2/prices/calculated GET endpoint can be used to retrieve the current- and basePrice per variant. This calculation uses the pricing rules listed below.
The benefit of this method is that the external platform does not need any logic concerning prices. However, this also means the external platform does not know about prices and discounts that will go into effect in the future.
Pricing rules
Both products and variants can have multiple active regular and discount prices at the same time. In addition, prices can have start- and enddates. When the v1/prices endpoints are used, OIS does not perform price calculations for external platforms, meaning the external platform must be able to do this. The benefit of importing all prices into external platforms is that prices can go into and out of effect dynamically.
The following is a recommended set of rules to determine the current regular price and the current discount price (if there are discount prices) of a single variant.
Select relevant prices
Any price with a StartDate in the future must be discarded
Any price with an EndDate in the past must be discarded
Any price with IsDeleted: true must be discarded
Distinguish between regular prices and discount prices
If there are multiple relevant regular prices, decide the current regular price (prioritized top to bottom)
Either pick the regular variant price with the most recent StartDate or the lowest regular variant price
If there are no variant specific regular prices, either pick the regular product price with the most recent StartDate or the lowest regular product price
If there are multiple relevant discount prices, decide the current discount price (prioritized top to bottom)
Either pick the discount variant price with the most recent StartDate or the lowest discount variant price
If there are no variant specific discount prices, either pick the discount product price with the most recent StartDate or the lowest discount product price