getSingleOffer()

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

Parameters:

Name Type Description
offerId string Type id of an offer you whant to get information about.
- required parameter

Request:

    {
    "method": "getSingleOffer",
    "params": {
    "offerId": "A582647327_NL"
    },
    "jsonrpc": "2.0",
    "id": 1
    }

Response:

    {
    "result": {
    "id": "A582647327_NL",
    "publisherEmail": "theteam@cleeng.com",
    "url": "http:\/\/your-site.url",
    "title": "Monetize your content",
    "description": "Great article how you can monetize your content using Cleeng",
    "currency": "EUR",
    "contentExternalId": "",
    "contentExternalData": "",
    "averageRating": 4,
    "active": false,
    "createdAt": 1353067309,
    "updatedAt": 1353067309,
    "price": 12,
    "tags": [

    ]
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }

Example:

<?php
    $offerId = 'A582647327_NL';

    $cleengApi = new Cleeng_Api();

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

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

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

Back to Single Offers