listVodOffers

This method lets you list all of your VOD offers meeting the requirements given in the API request. Offers are presented in descending order based on the creation date.

📘

You can try that method by clicking here

Parameters

NameTypeDescription
publisherToken*stringYou can find your publisher token at api-keys page.
criteriaobject
-activebooleanBy default you get list of active offers. To get inactive offers, set this field to false.
offset*integerFrom which offer you want to get results. Helpful in pagination.
limit* integerNumber 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.

Result Parameters

NameTypeDescription
idstringID of the offer
titlestringOffer name
descriptionstringOffer description
urlstringLink to the offer
pricestringOffers price
videoIdstringUnique identifier of your video asset
rentalPeriodstringRental period
publisherEmailstringContact email to the publisher
playerCodestringPlayer's embed code
playerCodeHeadstringPlayer's head code
streamingPlatformstringStreaming platform, e.g. YouTube
runtimestringVideo duration time
videoQualitystringVideo quality, e.g. 4k
backgroungImageUrlarrayArray of urls to backgroung image in different sizes
-smallstring
-mediumstring
-largestring
eventAssociationarrayArray of associated events
geoRestrictionEnabledboolean'true' if the offer is georesctricted
geoRestrictionTypestringChoose type of geo-restriction: whitelist / blacklist
geoRestrictionCountriesarrayBased on geoRestrictionType, set the array of whitelisted/blacklisted countries
membershipOnlybooleanIf 'true', the offer can be only accessed by a subscription and cannot be purchased directly
createdAtintegerUnix timestamp
updatedAtintegerUnix timestamp
tagsarrayArray of Offers tags

API Request/Response

Request

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

Response

{
    "result": {
      "items": [
        {
          "id": "A758341234_PA",
          "title": "Some title",
          "description": "Some description",
          "url": "http:\/\/domain.com",
          "price": "23.0000",
          "videoId": null,
          "rentalPeriod": "0",
          "publisherEmail": "[email protected]",
          "playerCode": "<iframe>some code</iframe>",
          "playerCodeHead": "",
          "streamingPlatform": "Other",
          "runtime": "2:22:00",
          "videoQuality": "4k",
          "backgroundImageUrl": {
            "small": null,
            "medium": null,
            "large": null
          },
          "eventAssociation": [
            
          ],
          "geoRestrictionEnabled": false,
          "geoRestrictionType": null,
          "geoRestrictionCountries": [
            
          ],
          "membershipOnly": false,
          "createdAt": 1510832617,
          "updatedAt": 1512467702,
          "tags": [
            
          ]
        },
        {
          "id": "A351625432_PA",
          "title": "Some title",
          "description": "Some description",
          "url": "http:\/\/domain.com",
          "price": "0.0000",
          "videoId": null,
          "rentalPeriod": "0",
          "publisherEmail": "[email protected]",
          "playerCode": "<iframe>some code</iframe>",
          "playerCodeHead": "",
          "streamingPlatform": "Other",
          "runtime": "",
          "videoQuality": "4k",
          "backgroundImageUrl": {
            "small": null,
            "medium": null,
            "large": null
          },
          "eventAssociation": [
            
          ],
          "geoRestrictionEnabled": false,
          "geoRestrictionType": null,
          "geoRestrictionCountries": [
            
          ],
          "membershipOnly": false,
          "createdAt": 1508409805,
          "updatedAt": 1508409807,
          "tags": [
            
          ]
        }
      ],
      "totalItemCount": 2
    },
    "id": "1",
    "jsonrpc": "2.0"
}

PHP Example

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

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