listVodOffers()


This method lets you list all of your VOD offers meeting the requirements given in the API request.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
criteriaobject
-active booleanBy default you get list of active offers. To get inactive offers, set this field to false.
offsetinteger From which offer you want to get results. Helpful in pagination.
limitinteger 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

Response Parameters:

Name Type Description
id string ID of the offer
title string Offer name
description string Offer description
url string Link to the offer
price string Offers price
videoId string Unique identifier of your video asset
rentalPeriod string Rental period
publisherEmail string Contact email to the publisher
playerCode string Player's embed code
playerCodeHead string Player's head code
streamingPlatform string Streaming platform, e.g. YouTube
runtime string Video duration time
videoQuality string Video quality, e.g. 4k
backgroungImageUrl array Array of urls to backgroung image in different sizes
-small string
-medium string
-large string
eventAssociation array Array of associated events
geoRestrictionEnabled boolean 'true' if the offer is georesctricted
geoRestrictionType string Choose type of geo-restriction: whitelist / blacklist
geoRestrictionCountries array Based on geoRestrictionType, set the array of whitelisted/blacklisted countries
membershipOnly boolean If 'true', the offer can be only accessed by a subscription and cannot be purchased directly
createdAt integer Unix timestamp
updatedAt integer Unix timestamp
tags array Array of Offers tags

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": "publisher@domain.com",
                    "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": "publisher@domain.com",
                    "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"
    }
]

Example:

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

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

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

Back to VOD Offers


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