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

Name

Type

Description

publisherToken*

string

You can find your publisher token at api-keys page.

criteria

object

-active

boolean

By default you get list of active offers. To get inactive offers, set this field to false.

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.

Result 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

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);
    
?>