getPassOffer

❗️

Deprecated

JSON-RPC getPassOffer method is deprecated.

Get information about pass offer. Read more about all types of offers here.

Parameters

NameTypeDescription
offerId*stringPass offer id.

API Request/Response

Request

{
  "method":"getPassOffer",
  "params":{
    "offerId":"P739699603_US"
  },
  "jsonrpc":"2.0",
  "id":1
}

Response

{
  "result":{
    "id":"P123123123_US",
    "publisherEmail":"[email protected]",
    "title":"Get access to every article about finance for whole month!",
    "description":"Whole month you have unlimited access to every article about finance.",
    "url":"http://mywebsite.com/articles/about/finance",
    "currency":"USD",
    "country":"US",
    "active":"1",
    "createdAt":1359121305,
    "updatedAt":1359121305,
    "price":13,
    "applicableTaxRate":"0.19",
    "period":"month",
    "accessToTags":[
      "finance"
    ]
  },
  "id":"1",
  "error":null,
  "jsonrpc":"2.0"
}

PHP Example

<?php
    $offerId = 'P123123123_US';

    $cleengApi = new Cleeng_Api();

    $offerDetails = $cleengApi->getPassOffer($offerId);

    echo $offerDetails->title; //print the offer title

?>