createVodOffer

This method lets you create a VOD offer via Cleeng API.

Parameters

NameTypeDescription
publisherToken*stringYou can find your publisher token at api-keys page.
offerData*objectAll data describing new offer.
-pricefloatOffer price (in publisher's currency), value between 0.14 and 99.99
-titlestringTitle of the offer, up to 70 chars.
-urlstringUrl to your content.
-description*stringAdditional offer description, up to 110 chars
-videoId*stringUnique identifier of your video asset
-playerCode*stringPlayer's embed code
-playerCodeHead*stringPlayer's head code
-rentalPeriod*stringRental period
-runtime*stringVideo duration time
-videoQuality*stringVideo quality, e.g. 4k
-backgroundImageUrl*stringUrl to background image
-eventAssociation*arrayArray of offer Id of live events which access should be transferred on this VOD
-tags*arrayTags attached to offer
-geoRestrictionEnabled*boolSet "true" to enable geo-restriction on this offer
-geoRestrictionType*stringChoose type of geo-restriction: whitelist / blacklist
-geoRestrictionCountries*arrayBased on geoRestrictionType, set the array of whitelisted/blacklisted countries.

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": "createVodOffer",
    "params": {
      "publisherToken": "OchFjivBxu8SAD21ZOdYVEkLJXz8UTex7EhkCbBY22Qwwespl",
      "offerData": {
        "price": "21.00",
        "title": "Test Vod",
        "url": "testvod.cleeng.com",
        "description": "test vod offer",
        "playerCode": "<iframe>playercode<\/iframe>",
        "runtime": "3600",
        "videoQuality": "4k",
        "eventAssociation": [

        ],
        "tags": [
          "vod",
          "sport"
        ],
        "geoRestrictionCountries": [

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

Response

{
    "result": {
      "vod": {
        "id": "A376123349_PL",
        "title": "Test Vod",
        "description": "test vod offer",
        "url": "testvod.cleeng.com",
        "price": "17.0731",
        "videoId": null,
        "rentalPeriod": 0,
        "publisherEmail": "[email protected]",
        "playerCode": "playercode",
        "playerCodeHead": "",
        "streamingPlatform": null,
        "runtime": "3600",
        "videoQuality": "4k",
        "backgroundImageUrl": {
          "small": null,
          "medium": null,
          "large": null
        },
        "eventAssociation": [

        ],
        "geoRestrictionEnabled": false,
        "geoRestrictionType": null,
        "geoRestrictionCountries": [

        ],
        "membershipOnly": false,
        "createdAt": 1514897470,
        "updatedAt": 1514897470,
        "tags": [
          "sport",
          "vod"
        ]
      }
    },
    "id": "1",
    "jsonrpc": "2.0"
}