getPrice()


Use getPrice() method to receive detailed information about the offer price based on customer location.

Parameters:

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

- required parameter

Response Parameters:

Name Type Description
offerPrice integer Base price of requested offer
offerCurrency string Currency set for offer
offerCurrencySymbol string Unicode currency code
offerCountry string Country set for offer
customerPriceInclTax integer Gross price of the offer for customer
customerPriceExclTax string 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 string Gross price of the offer for customer after discount
discountedCustomerPriceExclTax string Net price of the offer for customer after discount
discountPeriods string Number of discounted periods

Error Codes:

Code Description
4 Offer offerId does not exist.
17 Invalid coupon code

Request:

[
    {
        "method": "getPrice",
        "params": {
            "offerId": "S325990213_BE",
            "ipAddress": "109.123.123.42",
            "couponCode": "couponCode"
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "offerPrice": 15,
            "offerCurrency": "EUR",
            "offerCurrencySymbol": "\u20ac",
            "offerCountry": "PL",
            "customerPriceInclTax": 15,
            "customerPriceExclTax": "12.19",
            "customerCurrency": "EUR",
            "customerCurrencySymbol": "\u20ac",
            "customerCountry": "PL",
            "discountedCustomerPriceInclTax": "12.0000",
            "discountedCustomerPriceExclTax": "9.7561",
            "discountPeriods": "3"
        },
        "id": "1",
        "jsonrpc": "2.0"
    }
]

Remember! you can always check it by yourself using API Console - getPrice()

Back to Customer API