Loading...
Area: Episerver Content Delivery API
Applies to versions: 2.9.0 and higher

PricingApi

Recommended reading 
get/api/episerver/v2.0/pricingGets sku price information.

Pricing also has its own endpoint /api/episerver/v2.0/pricing?contentIds={{contentIds}}&marketId={{marketId}}&currencyCode={{currencyCode}}.

The response body contains all the prices for the product. A note here to make the result clearer is that price normally is decided by minQuantity (the larger quantity you buy, the less you pay for each item). Discounted prices only exist with default price (that has minQuantity equal to zero). Other prices will not have discounted price.     

Request: /api/episerver/v2.0/pricing?contentIds=3c69e19f-43eb-40cf-b0ba-4a61c6d443f4&marketId=default&currencyCode=USD

Response:

[
  {
    "entryCode"        : "Single-Day-Ticket---Monday_1",
    "prices"           : [
                           {
                             "price"       : 50.000000000,
                             "priceType"   : "AllCustomers",
                             "priceCode"   : "",
                             "validFrom"   : "2019-11-30T17:00:00Z",
                             "validUntil"  : "2019-12-30T17:00:00Z",
                             "minQuantity" : 0.000000000
                           },
                           {
                             "price"       : 30.000000000,
                             "priceType"   : "AllCustomers",
                             "priceCode"   : "",
                             "validFrom"   : "2019-11-30T17:00:00Z",
                             "validUntil"  : "2019-12-30T17:00:00Z",
                             "minQuantity" : 10.000000000
                           }
                         ],
    "discountedPrices" : [
                           {
                             "description"     : null,
                             "discountedPrice" : 40.000000000,
                             "defaultPrice"    : 50.000000000
                           },
                           {
                             "description"     : null,
                             "discountedPrice" : 28.0000000000,
                             "defaultPrice"    : 50.000000000
                           }
                         ]
  }
]

Do you find this information helpful? Please log in to provide feedback.

Last updated: Mar 24, 2021

Recommended reading