listPassOffers()


Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
criteriaobject No description
-active booleanBy default you get list of active offers. To get inactive offers, set this field to false.
-associateEmail stringSet an email address of the associate, to get the list of offers created by associate.
offset integer From which offer you want to get results. Helpful in pagination.
limit integer Number of results you want to retrieve. E.g. if you want to display 10 offers per page, and you are on third, just set limit to 10 and offset to 20.

- required parameter


Request:

[
    {
        "method": "listPassOffers",
        "params": {
            "publisherToken": "Xlrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
            "criteria": {
                "active": true,
                "associateEmail": ""
            },
            "offset": "0",
            "limit": "2"
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "items": [
                {
                    "id": "P580476507_US",
                    "publisherEmail": "publisher@email.com",
                    "title": "hockey and football",
                    "description": "Get access to all hockey and football articles",
                    "url": "http:\/\/test.com\/page_with_content",
                    "currency": "USD",
                    "country": "US",
                    "period": "week",
                    "active": true,
                    "price": 15,
                    "createdAt": 1353067309,
                    "updatedAt": 1353067309,
                    "accessToTags": [
                        "hockey",
                        "football"
                    ]
                },
                {
                    "id": "P580476508_US",
                    "publisherEmail": "publisher@email.com",
                    "title": "basketball and tennis",
                    "description": "Get access to all basketball and tennis articles",
                    "url": "http:\/\/test.com\/page_with_content",
                    "currency": "USD",
                    "country": "US",
                    "period": "week",
                    "active": true,
                    "price": 25,
                    "createdAt": 1353067309,
                    "updatedAt": 1353067309,
                    "accessToTags": [
                        "basketball",
                        "tennis"
                    ]
                }
            ],
            "totalItemCount": 3
        },
        "id": "1",
        "error": null,
        "jsonrpc": "2.0"
    }
]

Example:

<?php
                            
    $cleengApi = new Cleeng_Api();
    $cleengApi->setPublisherToken('TeurE3xRXcFtF7gSbhYCXx_qC1IrvnDWGejDv114-OE0cdZ9');

    $offerList = $cleengApi->listPassOffers(array(), 0, 5);
    
?>

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

Back to Pass Offers


We use cookies to ensure that we provide you the best service and website experience. Read our Cookie policy for more details.