getPassOffer()

Get information about pass offer. Read more about all types of offers in Tutorial 2 - Creating Offers.

Parameters:

Name Type Description
offerId string Pass offer id.
- required parameter

Request:

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

Response:

    [
    {
    "result": {
    "id": "P123123123_US",
    "publisherEmail": "publisher@email.com",
    "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"
    }
    ]

Example:

<?php
    $offerId = 'P123123123_US';

    $cleengApi = new Cleeng_Api();

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

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

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

Back to Pass Offers