getRentalOffer()


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

Parameters:

Name Type Description
offerId string Set id of an offer you want to get info about.
videoId string Unique identifier of your video asset.

- required parameter


Request:

{
    "method": "getRentalOffer",
    "params": {
        "offerId": "R948468705_US"
    },
    "jsonrpc": "2.0",
    "id": 1
}

Response:

{
    "result": {
        "id": "R948468705_US",
        "publisherEmail": "publisher@email.com",
        "url": "http:\/\/test.com\/page_with_content",
        "title": "test",
        "description": "my first offer with Cleeng",
        "currency": "EUR",
        "videoId": "",
        "contentExternalId": "",
        "contentExternalData": "",
        "averageRating": 4,
        "active": true,
        "createdAt": 1353067309,
        "updatedAt": 1353067309,
        "price": 12,
        "tags": [
            "sport",
            "hockey"
        ],
        "period": "120"
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
}

Example:

<?php
                            
    $offerId = 'R582647327_NL';

    $cleengApi = new Cleeng_Api();

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

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

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

Back to Rental Offers