Use getPrice() method to receive detailed information about the offer price based on customer location.
Name | Type | Description |
---|
offerId* | string | Offer ID, e.g. A123123123_US |
ipAddress* | string | IP Address of your visitor, e.g. 172.16.254.1 |
couponCode | string | Optional: coupon campaign code granting discount |
zipCode | string | Optional: zip code for tax breakdown |
Name | Type | Description |
---|
offerPrice | float | Base price of requested offer |
offerCurrency | string | Currency set for offer |
offerCurrencySymbol | string | Unicode currency code |
offerCountry | string | Country set for offer |
customerPriceInclTax | float | Gross price of the offer for customer |
customerPriceExclTax | float | Net price of the offer for customer |
customerCurrency | string | Currency used by customer |
customerCurrencySymbol | string | Unicode currency code |
customerCountry | string | Customer's location country |
discountedCustomerPriceInclTax | float | Gross price of the offer for customer after discount |
discountedCustomerPriceExclTax | float | Net price of the offer for customer after discount |
discountPeriods | integer | Number of discounted periods |
taxBreakdown | object | Breakdown of tax to GST, PST and QST |
{
"method": "getPrice",
"params": {
"offerId": "S325990213_BE",
"ipAddress": "109.123.123.42",
"couponCode": "couponCode",
"zipCode": "R2C0A1"
},
"jsonrpc": "2.0",
"id": 1
}
{
"result": {
"offerPrice": 100,
"offerCurrency": "CAD",
"offerCurrencySymbol": "CA$",
"offerCountry": "CA",
"customerPriceInclTax": 113,
"customerPriceExclTax": 100,
"customerCurrency": "CAD",
"customerCurrencySymbol": "CA$",
"customerCountry": "CA",
"discountedCustomerPriceInclTax": "n/a",
"discountedCustomerPriceExclTax": "n/a",
"discountPeriods": "n/a",
"taxBreakdown": [
{
"taxName": "GST",
"taxRate": 0.05,
"value": 5
},
{
"taxName": "PST",
"taxRate": 0.08,
"value": 8
},
{
"taxName": "QST",
"taxRate": 0,
"value": 0
}
]
},
"id": "1",
"jsonrpc": "2.0"
}
Code | Description |
---|
4 | Offer offerId does not exist. |
17 | Invalid coupon code |