pricing
This topic explains how to communicate with pricing API.
GET | api/episerver/v3.0/pricing | Gets sku price information. |
The pricing
API has its own endpoint:
/api/episerver/v3.0/pricing?contentIds={{contentIds}}&marketId={{marketId}}¤cyCode={{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/v3.0/pricing?contentIds=3c69e19f-43eb-40cf-b0ba-4a61c6d443f4&marketId=default¤cyCode=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
}
]
}
]
Updated about 1 month ago