getOfferDetails

❗️

Deprecated

This JSON-RPC method is deprecated.

This method returns offer details. It returns information about offer and price based on customer location.

Parameters

NameTypeDescription
offerId*stringType the ID of an offer you want to get information about.
ipAddressstringOptional: IP Address of your visitor, e.g. 172.16.254.1
couponCodestringOptional: coupon campaign code granting discount

API Request/Response

Request

{
  "method": "getOfferDetails",
  "params": {
    "offerId": "S388954091_UA",
    "ipAddress": "109.123.123.42",
    "couponCode": "couponCode"
  },
  "jsonrpc": "2.0",
  "id": 1
}

Response

{
  "result":{
     "offerId":"S388954091_UA",
     "offerPrice":9.99,
     "offerCurrency":"EUR",
     "offerCurrencySymbol": "€",
     "offerCountry": "FR",
     "customerPriceInclTax": 9.99,
     "customerPriceExclTax": 8.19,
     "customerCurrency": "EUR",
     "customerCurrencySymbol": "€",
     "customerCountry":"FR",
     "discountedCustomerPriceInclTax":null,
     "discountedCustomerPriceExclTax":null,
     "discountPeriods":null,
     "offerUrl":"http:\/\/yourdomain.cleeng.com",
     "offerTitle":"3-Month subscription (recurring) to yourdomain",
     "offerDescription":null,
     "active":true,
     "createdAt":1550501673,
     "updatedAt":1562593646,
     "applicableTaxRate":1.80,
     "geoRestrictionEnabled":false,
     "geoRestrictionType":null,
     "geoRestrictionCountries":[],
     "socialCommissionRate":0,
     "averageRating":4,
     "contentType":null,
     "period":"3months",
     "freePeriods":0,
     "freeDays":0,
     "expiresAt":null,
     "accessToTags":[
        "tagB"
     ],
     "videoId":null,
     "contentExternalId":null,
     "contentExternalData":null,
     "contentAgeRestriction":null,
     "geoBlocked": false
  },
  "id":"1",
  "jsonrpc":"2.0"
}

PHP Example

<?php
    $offerId = 'S388954091_UA';
    $ipAddress = '109.123.123.42';
    $couponCode = 'couponCode';

    $cleengApi = new Cleeng_Api();

    $offerDetails = $cleengApi->getOfferDetails($offerId, $ipAddress, $couponCode);
?>