Product Prices Resource
The Product Prices resource provides an endpoint for retrieving and removing product price configurations.
URL:
https://api.openpublishing.com/resource/v3/products/[ID]/prices
Supported methods:
GET to products/[ID]/prices for retrieving product price configuration.
PUT to products/[ID]/prices for store the product price configuration.
The product price configuration is a dict with the price configuration for each format. Each format price configuration contains the mandatory regular price configuration and the optional campaign price configuration:
regular: list with configuration items for configuring the regular pricescampaings: List with configuration items for configuring the price campaigns
Single Price Item
A price item contains following fields:
amount(numeric): monetary amount multiplied with100.0currency(3 characters): Currency ISO-4217 code (e.g.EUR,USD) of the amount.12.99 EURwill be transmitted as:"amount": 1299 "currency": "EUR"countries(list of strings): list of ISO-3166 codes (2 characters, e.g.DE,US). For the so called "WORLD" price, the list empty.start_date(date or null): the date from which a price becomes effective (format:YYYY-MM-DD)end_date(date or null): the date until which a price remains effective (format:YYYY-MM-DD)is_gross(boolean):trueif thepriceis a gross pricename(string or null): name of the campaign (only available in items of thecampaignsconfiguration)vat_rate_type(string): the VAT is typically determined according to the tax laws of the country. However, VAT rate type can be explicitly set at title level:auto: default vat rate type, which is calculated based on the country, product format (e-book, book, ...) and datestandard: standard vat rate typereduced: reduced var rat typezero: no VAT
price_type_code(2 character code): an ONIX code indicating the type of the price taken from ONIX Codelist 58price_status(2 character code): an ONIX code which specifies the status of a price taken from ONIX Codelist 61
Example:
{
"amount": 1299,
"countries": [
"AT",
"DE"
],
"currency": "EUR",
"end_date": null,
"is_gross": true,
"price_status": "02",
"price_type_code": "04",
"start_date": "2023-01-01",
"vat_rate_type": "auto"
}
Example JSON
Example of an e-book costing 9.99 EUR (gross) in Germany and Austria until the end of 2022 and increased to 12.99 EUR in 2023. A Christmas price campaign is also configured for these two countries in December 2022, during which the e-book costs 4.99 EUR (gross). The prices for Switzerland and Liechtenstein are 15 CHF (gross) and the so-called WORLD price is 20 USD (net):
{
"book": {
"regular": []
},
"ebook": {
"campaigns": [
{
"amount": 499,
"countries": [
"AT",
"DE"
],
"currency": "EUR",
"end_date": "2022-12-31",
"is_gross": true,
"name": "Christmas campaign",
"price_status": "02",
"price_type_code": "04",
"start_date": "2022-12-01",
"vat_rate_type": "auto"
}
],
"regular": [
{
"amount": 999,
"countries": [
"AT",
"DE"
],
"currency": "EUR",
"end_date": "2022-12-31",
"is_gross": true,
"price_status": "02",
"price_type_code": "04",
"start_date": null,
"vat_rate_type": "auto"
},
{
"amount": 1299,
"countries": [
"AT",
"DE"
],
"currency": "EUR",
"end_date": null,
"is_gross": true,
"price_status": "02",
"price_type_code": "04",
"start_date": "2023-01-01",
"vat_rate_type": "auto"
},
{
"amount": 1500,
"countries": [
"CH",
"LI"
],
"currency": "CHF",
"end_date": null,
"is_gross": true,
"price_status": "02",
"price_type_code": "02",
"start_date": null,
"vat_rate_type": "standard"
},
{
"amount": 2000,
"countries": [],
"currency": "USD",
"end_date": null,
"is_gross": false,
"price_status": "02",
"price_type_code": "03",
"start_date": null,
"vat_rate_type": "auto"
}
]
},
}