Download OpenAPI specification:Download
InPlayer equips you to run a detailed subscription business model, to build and grow your consumer base, and drive significant revenues. Our paywall supports recurring payments and billing cycles, consumer acquisition, subscriber lifecycle management, and provides you with consumer retention CRM tools.
Once you create an InPlayer Merchant Account, you are entitled to using our InPlayer dashboard for publishing, managing, and selling your premium content. Moreover, you can always integrate with our APIs for a full custom integration.
The InPlayer API follows the REST architectural style and uses standard HTTP response codes to indicate success requests (2xx) or API errors (4xx, 5xx). Each of the InPlayer Core Resources (Accounts & Authentication, Asset & Access, Payments & Subscriptions, Vouchers & Promotions, Branding, Restrictions & Rules, Reporting, Analytics, and Features) has their own URL and each of the operations involved (POST
, PUT
, PATCH
, GET
, and DELETE
) carries a specific meaning like creating, updating, fetching, deleting data, and much more.
All API requests should contain Content-Type:application/x-www-form-urlencoded header. The responses are always returned in JSON object(s), both for the successful requests and the failed attempts (errors).
The following section defines the domain language used across our platform. Proceed reading to introduce yourself to the terms employed for each of our Core Resources before you start working on your custom integration.
Items/Assets and Item Types
Term | Explanation |
---|---|
items | The digital Assets that Merchants can protect and sell. Asset is an Item with applied pricing and access options. |
item_type | The type of the digital content that can be created in the InPlayer platform. According to the type of the premium content, we distinguish between a few item types. Currently, we support HTML/Text (where you can store HTML code or any IFRAME code), video, file, and RSS type of asset. |
content | The content of the Item is the premium content that you can store and protect. Once the Customer has access to the Item, they can view the content. |
metadata | An unlimited key-value store containing additional info of the Item concerned. |
Access Types
Term | Explanation |
---|---|
access_type | The supported types of granting access in the system (pay-per-view and subscription). |
period | The period of the access entitlement that consumers get after purchasing the asset. |
Access Fees
Term | Explanation |
---|---|
access_fee | The applied access_type and price to an Item. |
Items Packages
Term | Explanation |
---|---|
package | The Packages are a collection of multiple Items (a group of Items). You can set up a Package Access Fee as an additional pricing option for Items that are part of a given Package. Once the Customer buys the Package Access Fee, they will have access to every Item that belongs to that Package. |
To make the API as explorable as possible, we have two different environments for production related and testing purposes. There is no switch for changing between modes, so just refer to the URL you need.
InPlayer uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with InPlayer's servers.
Not all errors map cleanly onto HTTP response codes, however. For instance, when a request is valid but does not complete successfully (e.g. if asset access is not found), we return a 402 error code.
List of status codes
Status code | Explanation |
---|---|
200 | OK Everything worked as expected. |
201 | Created The resource has been created. |
202 | Accepted The request has been accepted for processing, but the processing has not been completed. |
204 | No Content The server has fulfilled the request but does not need to return an entity-body. |
400 | Bad Request The request was unacceptable, often due to omission of a required parameter. |
401 | Unauthorized No valid access token has been provided. |
402 | Request Failed The parameters were valid but the request failed. |
404 | Not Found The requested resource does not exist. |
409 | Conflict The request conflicts with another request. |
429 | Too Many Requests Too many requests have been sent to the API in a short amount of time. We recommend using exponential backoff for your requests. |
500, 502, 503, 504 | Server Errors Something went wrong on InPlayer's end. |
Enables the merchant to create an item.
item_type required | string Enum: "package" "html_asset" "ooyala_asset" "brightcove_asset" "cloudfront_asset" "dacast_asset" "sportradar_asset" "panopto_asset" "qbrick_asset" "kaltura_asset" "jw" "wowza_asset" "wistia_asset" "livestream_asset" "streamamg_asset" "template_id" One of the asset types (HTML/Text, Video, File or RSS ) |
title | string The title of the item |
access_control_type_id required | integer <int64> Shows the access control type ID carrying one of the enlisted values:
|
Array of objects Object containing additional information about the item | |
external_asset_id | string The external asset identifier set by the hosting platform or OVP provider |
template_id | int Template id for asset |
event_type | string The event type of the asset (live, vod, other) |
curl -X POST https://services.inplayer.com/v2/items \ -H 'Authorization:Bearer <token>' \ -d item_type=inplayer_asset \ -d title="Foo bar" \ -d metadata[foo]=bar \ -d external_asset_id=eaeEa521edAx \ -d access_control_type_id=3 \ -d event_type=live
{- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
Enables the merchant to delete a given item.
id required | integer Unique item ID |
curl -X DELETE https://services.inplayer.com/v2/items/{id} \ -H 'Authorization:Bearer <token>'
{- "code": 400,
- "message": "Item not found"
}
Updates a given asset.
id required | integer Unique item ID |
item_type required | string Enum: "package" "html_asset" "ooyala_asset" "brightcove_asset" "cloudfront_asset" "dacast_asset" "sportradar_asset" "panopto_asset" "qbrick_asset" "kaltura_asset" "jw" "wowza_asset" "wistia_asset" "livestream_asset" "streamamg_asset" "template_id" One of the asset types (HTML/Text, Video, File or RSS ) |
content | string The item's content |
title | string The title of the item |
access_control_type_id required | integer <int64> Shows the access control type ID carrying one of the enlisted values:
|
Array of objects Object containing additional information about the item | |
external_asset_id | string The external asset identifier set by the hosting platform or OVP provider |
template_id | integer The template id of the item |
is_giftable | boolean If the asset is of a giftable type |
gift_description | string Description data for the gift (requires if is_giftable to be true) |
event_type | string The event type of the asset (live, vod, other) |
curl -X PUT https://services.inplayer.com/v2/items/{id} \ -H "Authorization:Bearer <token>" \ -d title="Foo bar" \ -d metadata[foo]=bar -d external_asset_id=eaeEa521edAx -d is_giftable=true \ -d gift_description="Gift description" \ -d access_control_type_id=3 -d event_type=vod
{- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
id required | integer Unique item ID |
item_type | string Enum: "package" "html_asset" "ooyala_asset" "brightcove_asset" "cloudfront_asset" "dacast_asset" "sportradar_asset" "panopto_asset" "qbrick_asset" "kaltura_asset" "jw" "wowza_asset" "wistia_asset" "livestream_asset" "streamamg_asset" One of the asset types (HTML/Text, Video, File or RSS ) |
content | string The item's content |
title | string The title of the item |
access_control_type_id | integer <int64> Shows the access control type ID carrying one of the enlisted values:
|
Array of objects Object containing additional information about the item | |
external_asset_id | string The external asset identifier set by the hosting platform or OVP provider |
is_giftable | boolean If the asset is of a giftable type |
gift_description | string Description data for the gift (required if is_giftable is true) |
event_type | string The event type of the asset (live, vod, other) |
curl -X PATCH https://services.inplayer.com/v2/items/{id} \ -H "Authorization:Bearer <token>" \ -d title="Foo bar" \ -d metadata[foo]=bar -d external_asset_id=eaeEa521edAx -d is_giftable=true \ -d gift_description="Gift description" -d event_type=live
{- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
Lists the various fees for a specific asset.
id required | integer Unique item ID |
expand[voucher] | integer Voucher ID |
curl https://services.inplayer.com/v2/items/{id}/access-fees?expand[voucher]=14
[- {
- "voucher_rule": {
- "id": 8926,
- "rule_type": "access-fees",
- "value": 8115,
- "voucher": {
- "id": 14,
- "name": "50% discount",
- "discount": 50,
- "rebill_discount": 50,
- "start_date": "2018-08-23T00:00:00.000Z",
- "end_date": "2018-09-30T00:00:00.000Z",
- "code": "F00B4R!@",
- "usage_limit": 10,
- "usage_counter": 10,
- "discount_period": "once",
- "discount_duration": 5
}
}, - "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}, - "access_type": {
- "account_id": 44,
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "trial_period": {
- "id": 44,
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "setup_fee": {
- "id": 44,
- "fee_amount": 3,
- "description": "3.00$ setup fee",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "seasonal_fee": {
- "off_season_access": true,
- "current_price_amount": 4.2,
- "anchor_date": 1531482438
}, - "expires_at": 1531482438,
- "starts_at": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438,
- "external_fees": {
- "id": 44,
- "payment_provider_id": 12,
- "access_fee_id": 17,
- "external_id": 55,
- "merchant_id": 13
}
}
]
Creates access fee for a specific asset
id required | integer Unique item ID |
expand[voucher] | integer Voucher ID |
country_iso | string MK |
restriction_type | string blacklist|whitelist |
access_type_id required | integer a number denoting that the access type of interest is granted via the pay-per-view, subscription, or season alternative. Use the "id" parameter from https://docs.inplayer.com/api/assets/#tag/V1/operation/getAccessTypes. |
setup_fee_amount | integer 3 |
setup_fee_description | string 3.00$ setup fee |
trial_period_quantity | integer 2 |
trial_period_period | string hour |
trial_period_description | string 2 hour access |
amount required | number 5 |
currency required | string USD |
description required | string 5.00$ for 1 hour access |
starts_at | string 2019-11-12T11:45:26.371Z (RFC3339) |
expires_at | string 2019-11-12T11:45:26.371Z (RFC3339) |
curl -X POST https://services.inplayer.com/v2/items/{id}/access-fees \ -H "Authorization:Bearer <token>" \ -d 'access_type_id=1' \ -d 'amount=2' \ -d 'currency=EUR' \ -d 'description=Simple Access Fee' \ -d 'starts_at=2019-11-12T11:45:26.371Z' \ -d 'expires_at=2019-11-12T11:45:26.371Z' \ -d 'trial_period_description=Bla' \ -d 'trial_period_quantity=1' \ -d 'trial_period_period=week' \ -d 'setup_fee_amount=3' \ -d 'setup_fee_description=3.00$ setup fee' \ -d 'country_set_id=2'
{- "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}, - "access_type": {
- "account_id": 44,
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "trial_period": {
- "id": 44,
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "setup_fee": {
- "id": 44,
- "fee_amount": 3,
- "description": "3.00$ setup fee",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "seasonal_fee": {
- "off_season_access": true,
- "current_price_amount": 4.2,
- "anchor_date": 1531482438
}, - "expires_at": 1531482438,
- "starts_at": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438,
- "external_fees": {
- "id": 44,
- "payment_provider_id": 12,
- "access_fee_id": 17,
- "external_id": 55,
- "merchant_id": 13
}
}
Fetches an access fee by the given ID
id required | integer Item id |
fee_id required | integer Fee id |
curl https://services.inplayer.com/v2/items/{id}/access-fees/{fee_id}
{- "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}, - "access_type": {
- "account_id": 44,
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "trial_period": {
- "id": 44,
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "setup_fee": {
- "id": 44,
- "fee_amount": 3,
- "description": "3.00$ setup fee",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "seasonal_fee": {
- "off_season_access": true,
- "current_price_amount": 4.2,
- "anchor_date": 1531482438
}, - "expires_at": 1531482438,
- "starts_at": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438,
- "external_fees": {
- "id": 44,
- "payment_provider_id": 12,
- "access_fee_id": 17,
- "external_id": 55,
- "merchant_id": 13
}
}
Deletes an access fee by a given ID
id required | integer Item id |
fee_id required | integer Fee id |
curl -X DELETE https://services.inplayer.com/v2/items/{id}/access-fees/{fee_id} \ -H 'Authorization:Bearer <token>'
{- "code": 401,
- "message": "Invalid auth token"
}
Update access fee for a specific asset
id required | integer Item id |
fee_id required | integer Fee id |
country_iso | string MK |
restriction_type | string blacklist|whitelist |
access_type_id required | integer Access type id. Use the "id" parameter from https://docs.inplayer.com/api/assets/#tag/V1/operation/getAccessTypes. |
setup_fee_amount | integer 3 |
setup_fee_description | string 3.00$ setup fee |
trial_period_quantity | integer 2 |
trial_period_period | string hour |
trial_period_description | string 2 hour access |
amount required | number 5 |
currency required | string USD |
description required | string 5.00$ for 1 hour access |
starts_at | string 2019-11-12T11:45:26.371Z (RFC3339) |
expires_at | string 2019-11-12T11:45:26.371Z (RFC3339) |
curl -X PUT https://services.inplayer.com/v2/items/{id}/access-fees{fee_id} \ -H "Authorization:Bearer <token>" \ -d 'access_type_id=1' \ -d 'amount=2' \ -d 'currency=EUR' \ -d 'description=Simple Access Fee' \ -d 'starts_at=2019-11-12T11:45:26.371Z' \ -d 'expires_at=2019-11-12T11:45:26.371Z' \ -d 'trial_period_description=Bla' \ -d 'trial_period_quantity=1' \ -d 'trial_period_period=week' \ -d 'setup_fee_amount=3' \ -d 'setup_fee_description=3.00$ setup fee' \ -d 'country_set_id=2'
{- "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}, - "access_type": {
- "account_id": 44,
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "trial_period": {
- "id": 44,
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "setup_fee": {
- "id": 44,
- "fee_amount": 3,
- "description": "3.00$ setup fee",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "seasonal_fee": {
- "off_season_access": true,
- "current_price_amount": 4.2,
- "anchor_date": 1531482438
}, - "expires_at": 1531482438,
- "starts_at": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438,
- "external_fees": {
- "id": 44,
- "payment_provider_id": 12,
- "access_fee_id": 17,
- "external_id": 55,
- "merchant_id": 13
}
}
Creates or updates access fees for a specific asset
country_iso | string MK |
restriction_type | string blacklist|whitelist |
Array of objects Object holding details about the access fees |
curl -X PATCH https://services.inplayer.com/v2/items/{id}/access-fees/bulk \ -H "Authorization:Bearer <token>" \ -d 'access_fees[0][id]=0' \ -d 'access_fees[0][access_type_id]=1' \ -d 'access_fees[0][amount]=2' \ -d 'access_fees[0][currency]=EUR' \ -d 'access_fees[0][description]=Simple Access Fee' \ -d 'access_fees[0][starts_at]=2019-11-12T11:45:26.371Z' \ -d 'access_fees[0][expires_at]=2019-11-12T11:45:26.371Z' \ -d 'access_fees[0][trial_period_description]=Bla' \ -d 'access_fees[0][trial_period_quantity]=1' \ -d 'access_fees[0][trial_period_period]=week' \ -d 'access_fees[0][setup_fee_amount]=3' \ -d 'access_fees[0][setup_fee_description]=3.00$ setup fee' \ -d 'access_fees[0][restriction_type]=blacklist' \ -d 'access_fees[0][country_iso]=MK'
[- {
- "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}, - "access_type": {
- "account_id": 44,
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "trial_period": {
- "id": 44,
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "setup_fee": {
- "id": 44,
- "fee_amount": 3,
- "description": "3.00$ setup fee",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "seasonal_fee": {
- "off_season_access": true,
- "current_price_amount": 4.2,
- "anchor_date": 1531482438
}, - "expires_at": 1531482438,
- "starts_at": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438,
- "external_fees": {
- "id": 44,
- "payment_provider_id": 12,
- "access_fee_id": 17,
- "external_id": 55,
- "merchant_id": 13
}
}
]
Returns donations for the given item as well as the donation options.
id required | integer Unique item ID |
curl https://services.inplayer.com/v2/items/{id}/donations
{- "donations": {
- "id": 1,
- "item_id": 2,
- "amount": 1100,
- "float_amount": 11,
- "currency": "EUR",
- "description": "Donate 11EUR",
- "created_at": 1543238500,
- "updated_at": 1543238500
}, - "donation_options": {
- "id": 1,
- "item_id": 2,
- "custom_price_enabled": 1,
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
Create donation for the given item.
id required | integer Unique item ID |
amount required | integer 10 |
currency required | string EUR |
description required | string Donate 10EUR |
curl -X POST https://services.inplayer.com/v2/items/{id}/donations \ -H "Authorization:Bearer <token>" \ -d 'amount=11' \ -d 'currency=EUR' \ -d 'description=Donate 11EUR' \
{- "id": 1,
- "item_id": 2,
- "amount": 1100,
- "float_amount": 11,
- "currency": "EUR",
- "description": "Donate 11EUR",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
Returns donations for the given item as well as the donation options for the Merchant user.
id required | integer Unique item ID |
curl https://services.inplayer.com/v2/items/{id}/donations/merchant
{- "donations": {
- "id": 1,
- "item_id": 2,
- "amount": 1100,
- "float_amount": 11,
- "currency": "EUR",
- "description": "Donate 11EUR",
- "created_at": 1543238500,
- "updated_at": 1543238500
}, - "donation_options": {
- "id": 1,
- "item_id": 2,
- "custom_price_enabled": 1,
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
Edits donation options for the given item.
id required | integer Unique Item ID |
custom_price_enabled | bool true |
curl -X PATCH https://services.inplayer.com/v2/items/{id}/donations/options \ -H "Authorization:Bearer <token>" \ -d 'custom_price_enabled=1' \
{- "id": 1,
- "item_id": 2,
- "custom_price_enabled": 1,
- "created_at": 1543238500,
- "updated_at": 1543238500
}
Update Event Details for a specific asset
id required | integer Unique Item ID |
event_name required | string The event name |
event_description required | string The event's description |
content_category required | string The event's category of the content |
webpage required | string The web page of the event |
event_date required | string <RFC3339> |
replay_available required | boolean If replay is available (yes/no) |
expected_viewership required | integer <int64> The number of viewers expected |
is_advertised required | boolean If is advertised (yes/no) |
industry required | string The industry of the event |
curl -X PUT 'https://services.inplayer.com/v2/items/40770/event_details' \ -H 'Authorization: Bearer <token> \ -d 'event_name=TestEvent' \ -d 'content_category=Sport' \ -d 'web_page=test.com' \ -d 'event_date=2021-12-11 12:30:20' \ -d 'replay_available=1' \ -d 'expected_viewership=1000' \ -d 'is_advertised=0' \ -d 'industry=Sports' \ -d 'event_description=Test Event' \ -d 'start_date=2021-12-21 12:00:00'
{- "id": 1,
- "item_id": 4,
- "merchant_id": 21,
- "event_name": "Test Event",
- "event_description": "Sample Description",
- "content_category": "Sport",
- "event_date": 1531482438,
- "replay_available": true,
- "expected_viewership": 1000,
- "is_advertised": false,
- "industry": "Sports"
}
Deletes donation for the given item and id.
item_id required | integer Unique Item ID |
id required | integer Unique Donation ID |
curl https://services.inplayer.com/v2/items/{item_id}/donations/{id} -H "Authorization:Bearer <token>" \
{- "code": 200,
- "message": "Successfully deleted donation."
}
Edits donation for the given item.
item_id required | integer Unique Item ID |
id required | integer Unique Donation ID |
amount | integer 10 |
currency | string EUR |
description | string Donate 10EUR |
curl -X PATCH https://services.inplayer.com/v2/items/{item_id}/donations/{id} \ -H "Authorization:Bearer <token>" \ -d 'amount=11' \ -d 'currency=EUR' \ -d 'description=Donate 11EUR' \
{- "id": 1,
- "item_id": 2,
- "amount": 1100,
- "float_amount": 11,
- "currency": "EUR",
- "description": "Donate 11EUR",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
Returns details about the item type, title, state, when and how it was purchased etc.
id required | integer Unique item ID |
merchant_uuid required | string <uuid> Merchant's universal unique identifier |
curl https://services.inplayer.com/v2/items/{merchant_uuid}/{id}
{- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
Deactivate livelike chatroom
item_id required | integer Item id |
chatroom_id required | integer chatroom id |
curl -X DELETE https://services.inplayer.com/v2/items/livelike/{item_id}/{chatroom_id} \ -H 'Authorization:Bearer <token>'
{- "code": 200
}
Creates livelike chatroom
item_id required | int |
title | string title (Optional) |
content_filter | string Enum: "none" "filtered" none (default) |
curl -X POST https://services.inplayer.com/v2/items/livelike/chatrooms \ -H 'authorization: Bearer Access-Token' \ -H 'content-type: application/x-www-form-urlencoded' \ -d item_id=123 \ -d title="Foo Bar" \ -d content_filter=?
{- "code": 200,
- "message": "Successfully created livelike chatroom."
}
Updates livelike chatroom
item_id required | int |
title required | string |
content_filter | string Enum: "none" "filtered" none (default) |
curl -X PATCH https://services.inplayer.com/v2/items/livelike/chatrooms \ -H 'authorization: Bearer Access-Token' \ -H 'content-type: application/x-www-form-urlencoded' \ -d item_id=123 \ -d title="Foo Bar" \ -d content_filter=?
{- "code": 200,
- "message": "Successfully updated livelike account."
}
curl https://services.inplayer.com/v2/items/livelike/chatrooms \ -H 'authorization: Bearer Access-Token'
{- "Total": 21,
- "page": 2,
- "size": 0,
- "collection": [
- {
- "Id": 0,
- "Title": "string"
}
]
}
Updates the assets in package
id required | integer Package ID |
add_asset_ids | Array of arrays Array of item ids to be added |
remove_asset_ids | Array of arrays Array of item ids to be removed |
curl -X PATCH https://services.inplayer.com/v2/items/packages/{id}/bulk \ -H "Authorization:Bearer <token>" \ -d 'add_asset_ids[0]=0' \ -d 'add_asset_ids[1]=1' \ -d 'remove_asset_ids[2]=2' \
{- "code": 200,
- "message": "Successfully updated package item"
}
Enables the merchant to create an asset template.
name required | string The template's name |
item_type_name required | string Enum: "package" "html_asset" "ooyala_asset" "brightcove_asset" "cloudfront_asset" "dacast_asset" "sportradar_asset" "panopto_asset" "qbrick_asset" "kaltura_asset" "jw" "wowza_asset" "wistia_asset" "livestream_asset" "streamamg_asset" One of the asset types (HTML/Text, Video, File or RSS ) |
access_control_type_id required | integer <int64> Shows the access control type ID carrying one of the enlisted values:
|
preview_id | int The id of the preview template |
preview_type | string The notation of the preview |
Array of objects Object containing additional information about the item | |
event_type required | string Enum: "live" "vod" "other" The event type of the asset (live, vod, other) |
curl -X POST https://services.inplayer.com/v2/items/templates \ -H 'Authorization=Bearer <token>' \ -d name="template name" \ -d access_control_type_id=1 \ -d preview_type="preview template text" \ -d item_type_name="html_asset" \ -d metadata[meta_name]="value" \ -d event_type="live"
[- {
- "id": 1,
- "merchant_id": 21,
- "name": "Template name example",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "template_id": 1,
- "preview_text": "Template description example",
- "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "event_type": "live",
- "event_details": {
- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "restrictions": [
- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "prices": [
- {
- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438
}
]
curl -X GET https://services.inplayer.com/v2/items/templates \ -H 'Authorization=Bearer <token>' \
[- {
- "id": 1,
- "merchant_id": 21,
- "name": "Template name example",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "template_id": 1,
- "preview_text": "Template description example",
- "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "event_type": "live",
- "event_details": {
- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "restrictions": [
- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "prices": [
- {
- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438
}
]
Enables the merchant to delete a given template.
template_id required | integer Unique template ID |
curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id} \ -H 'Authorization=Bearer <token>' \
{- "code": 400,
- "message": "Incorrect template id"
}
Updates a given template.
template_id required | integer Unique template ID |
item_type_name | string Enum: "package" "html_asset" "ooyala_asset" "brightcove_asset" "cloudfront_asset" "dacast_asset" "sportradar_asset" "panopto_asset" "qbrick_asset" "kaltura_asset" "jw" "wowza_asset" "wistia_asset" "livestream_asset" "streamamg_asset" One of the asset types (HTML/Text, Video, File or RSS ) |
access_control_type_id | integer <int64> Shows the access control type ID carrying one of the enlisted values:
|
preview_id | int The id of the preview template |
preview_type | string The notation of the preview |
Array of objects Object containing additional information about the item | |
event_type | string Enum: "live" "vod" "other" The event type of the asset (live, vod, other) |
curl -X PATCH https://services.inplayer.com/v2/items/templates/{template_id} \ -H 'Authorization=Bearer <token>' \ -d name="template name" \ -d access_control_type_id=1 \ -d preview_type="preview template text" \ -d item_type_name="html_asset" \ -d metadata[meta_name]="value" \ -d event_type="other"
{- "id": 1,
- "merchant_id": 21,
- "name": "Template name example",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "template_id": 1,
- "preview_text": "Template description example",
- "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "event_type": "live",
- "event_details": {
- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "restrictions": [
- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "prices": [
- {
- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438
}
Gets template by specific template id.
template_id required | integer Unique template ID |
curl -X GET https://services.inplayer.com/v2/items/templates/{template_id} \ -H 'Authorization=Bearer <token>' \
{- "id": 1,
- "merchant_id": 21,
- "name": "Template name example",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "template_id": 1,
- "preview_text": "Template description example",
- "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "event_type": "live",
- "event_details": {
- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "restrictions": [
- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "prices": [
- {
- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438
}
Enables the merchant to replaces event details for a given template.
template_id required | integer Unique template ID |
event_name required | string name of the created event |
event_description | string description for the event |
content_category required | string Enum: "vod" "live" "other" type of the event |
web_page required | string webpage of the event |
replay_available required | boolean whether a replay is available for the event |
expected_viewership required | integer estimated expectation of viewers for the event |
is_advertised required | boolean whether the event should be advertised |
industry required | string Enum: "Business" "Education & Training" "Faith" "Fitness & Wellness" "Music & Entertainment" "Sports" industry type of the event |
event_sf_id | string id of an event sales force |
event_wp_id | string id of an event wordpress |
event_date required | string date time of the event |
curl -X PATCH https://services.inplayer.com/v2/items/templates/{template_id} \ -H 'Authorization=Bearer <token>' \ -d event_name="Event name" \ -d event_description="Event description" \ -d content_category="live" -d web_page="inplayer.com" -d replay_available=1 -d expected_viewership=234 -d is_advertised=1 -d industry="Business" -d event_sf_id="test sf id" -d event_wp_id="test wp id" -d event_date="2021-06-19T07:37:23.143265035Z"
{- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
Enables the merchant to get a given template event details.
template_id required | integer Unique template ID |
curl -X GET https://services.inplayer.com/v2/items/templates/{template_id}/event_details \ -H 'Authorization=Bearer <token>' \
{- "id": 1,
- "template_id": 44,
- "merchant_id": 21,
- "event_name": "Event name example",
- "event_description": "Event description example",
- "content_category": "live",
- "web_page": "inplayer.com",
- "replay_available": true,
- "expected_viewership": 12500,
- "is_advertised": true,
- "industry": "Business",
- "event_sf_id": "event sf id example",
- "event_wp_id": "eventwp id example",
- "event_date": "2019-11-12T11:45:26.371Z",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
Enables the merchant to delete metadata by keys for a given template.
template_id required | integer Unique template ID |
required | Array of objects Unique meta key names for deletion |
curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/metadata?keys[]=meta_name \ -H 'Authorization=Bearer <token>' \
{- "code": 200,
- "message": "Successfully deleted template metadata"
}
Enables the merchant to add a price for a given template.
template_id required | integer Unique template ID |
access_type_id required | integer a number denoting that the access type of interest is granted via the pay-per-view, subscription, or season alternative |
amount required | number amount of the currency set for the price |
currency required | string the currency for the price |
description required | string description of the price |
country_set_id | integer The id of the country set restriction (only one of |
country_iso | string The country restriction correlated to the type (only one of |
type | string type of restriction concerning the |
starts_at | string the starting time of the access fee created (RFC3339) |
expires_at | string the expiring time of the access fee created (RFC3339) |
free_trial_days | int Number of free trial days for the assets |
setup_fee_amount | number amount of the currency set for the initial setup payment |
setup_fee_description | string description of the setup fee price |
payment_provider_id | integer the id of the payment provider |
external_id | string the id of an external source |
curl -X POST https://services.inplayer.com/v2/items/templates/{template_id}/prices \ -H 'Authorization=Bearer <token>' \ -d access_type_id=3 \ -d amount=1.4 \ -d currency="EUR" \ -d preview_type="preview template text" \ -d description= "This is price description" \ -d country_set_id=2 \ -d type="whitelist" \ -d starts_at="2021-06-19T07:37:23.143265035Z" \ -d expires_at="2021-05-30T07:37:23.143265035Z" \ -d free_trial_days=2 \ -d setup_fee_amount=3.45 \ -d setup_fee_description="Setup fee description" \ -d payment_provider_id=5 \ -d external_id="externalid123" \
{- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
Enables the merchant to replace a price for a given template.
template_id required | integer Unique template ID |
price_id required | integer Unique price ID |
access_type_id required | integer a number denoting that the access type of interest is granted via the pay-per-view, subscription, or season alternative |
amount required | number amount of the currency set for the price |
currency required | string the currency for the price |
description required | string description of the price |
country_set_id | int The id of the country set restriction (only one of |
country_iso | string The country restriction correlated to the type (only one of |
type | string type of restriction concerning the |
starts_at | string the starting time of the access fee created (RFC3339) |
expires_at | string the expiring time of the access fee created (RFC3339) |
free_trial_days | int Number of free trial days for the assets |
setup_fee_amount | number amount of the currency set for the initial setup payment |
setup_fee_description | string description of the setup fee price |
payment_provider_id | int the id of the payment provider |
external_id | string the id of an external source |
curl -X PUT https://services.inplayer.com/v2/items/templates/{template_id}/prices/{price_id} \ -H 'Authorization=Bearer <token>' \ -d access_type_id=3 \ -d amount=1.4 \ -d currency="EUR" \ -d preview_type="preview template text" \ -d description= "This is price description" \ -d country_set_id=2 \ -d starts_at="2021-06-19T07:37:23.143265035Z" \ -d expires_at="2021-05-30T07:37:23.143265035Z" \ -d free_trial_days=2 \ -d setup_fee_amount=3.45 \ -d setup_fee_description="Setup fee description" \ -d payment_provider_id=5 \ -d external_id="externalid123" \
{- "id": 44,
- "template_id": 44,
- "access_type_id": 2,
- "amount": 3.25,
- "currency": "USD",
- "description": "3.25$ for 1 day access",
- "country_set_id": 3,
- "country_iso": "GB",
- "type": "whitelist",
- "starts_at": "2019-11-12T11:45:26.371Z",
- "expires_at": "2019-12-12T11:45:26.371Z",
- "free_trial_days": 5,
- "setup_fee_amount": 3.25,
- "setup_fee_description": "3.25$ for 1 day access",
- "payment_provider_id": 5,
- "external_id": "externalID1234",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
Enables the merchant to delete a given template price.
template_id required | integer Unique template ID |
price_id required | integer Unique price ID |
curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/prices/{price_id} \ -H 'Authorization=Bearer <token>' \
{- "code": 200,
- "message": "Successfully deleted template price"
}
Enables the merchant to add multiple restrictions for a given template.
template_id required | integer Unique template ID |
Array of objects Object containing information about the restriction created |
curl -X POST https://services.inplayer.com/v2/items/templates/{template_id}/restrictions \ -H 'Authorization=Bearer <token>' \ -d restriction[0][category]="domain" \ -d restriction[0][type]="whitelist" \ -d restriction[0][additional_data]="https://.domainWithPost.org" \ -d restriction[1][category]="age" \ -d restriction[1][additional_data]=12 \
[- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
Enables the merchant to replace existing restrictions with new ones for a given template.
template_id required | integer Unique template ID |
Array of objects Object containing information about the restriction created |
curl -X PUT https://services.inplayer.com/v2/items/templates/{template_id}/restrictions \ -H 'Authorization=Bearer <token>' \ -d restriction[0][category]="domain" \ -d restriction[0][type]="whitelist" \ -d restriction[0][additional_data]="https://.domainWithPost.org" \ -d restriction[1][category]="age" \ -d restriction[1][additional_data]=12 \
[- {
- "id": 44,
- "template_id": 44,
- "category": "domain",
- "additional_data": "inplayer.com",
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
Enables the merchant to delete a given template restriction.
template_id required | integer Unique template ID |
restriction_id required | integer Unique restriction ID |
curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/restrictions/{restriction_id} \ -H 'Authorization=Bearer <token>' \
{- "code": 200,
- "message": "Successfully deleted template restriction"
}
arn required | any arn is query parameter that shows which specific channel is being listed |
curl -X https://services.inplayer.com/v2/ovps/ivs/channel?arn={{arn}} \ -H 'Authorization=Bearer <token>' \ -d arn="arn:aws:ivs:us-east-1:841063901603:channel/J1rcDER"
{- "authorized": true,
- "arn": "arn:aws:ivs:us-east-1:841063901603:channel/J1rcDERHVm6B",
- "name": "Colby",
- "latency_mode": "Low",
- "type": "Standard",
}
arn required | any arn is query parameter that shows which specific channel is being listed |
curl -X DELETE https://services.inplayer.com/v2/ovps/ivs/channel?arn={{arn}} \ -H 'Authorization=Bearer <token>' \ -d arn="arn:aws:ivs:us-east-1:841063901603:channel/J1rcDER"
{- "code": 200,
- "message": "Successfully deleted ivs channel."
}
latency_mode required | string Enum: "Normal" "Low" |
name required | string |
type required | string Enum: "Standard" "Basic" |
authorized required | boolean |
curl -X POST https://services.inplayer.com/v2/ovps/ivs/ \ -H 'Authorization=Bearer <token>' \ -d latency_mode="LOW"\ -d name="channel_name" \ -d type="STANDARD" \ -d authorized=true
{- "authorized": true,
- "arn": "arn:aws:ivs:us-east-1:841063901603:channel/J1rcDERHVm6B",
- "name": "Colby",
- "latency_mode": "Low",
- "type": "Standard",
}
latency_mode required | string Enum: "Normal" "Low" |
name required | string |
type required | string Enum: "Standard" "Basic" |
arn required | string |
curl -X PUT https://services.inplayer.com/v2/ovps/ivs/ \ -H 'Authorization=Bearer <token>' \ -d latency_mode="LOW"\ -d name="channel_name" \ -d type="STANDARD" \ -d arn="arn:aws:ivs:us-east-1:841063901603:channel/J1rcDER"
{- "authorized": true,
- "arn": "arn:aws:ivs:us-east-1:841063901603:channel/J1rcDERHVm6B",
- "name": "Colby",
- "latency_mode": "Low",
- "type": "Standard"
}
curl -X https://services.inplayer.com/v2/ovps/ivs/channel?arn={{arn}} \ -H 'Authorization=Bearer <token>'
{- "collection": [
- {
- "authorized": true,
- "arn": "arn:aws:ivs:us-east-1:841063901603:channel/J1rcDERHVm6B",
- "name": "channelName",
- "latency_mode": "Normal"
}
]
}
Returns a collection of fees for a specific asset
id required | integer Item id |
curl https://services.inplayer.com/items/{id}/access-fees
[- {
- "id": 44,
- "merchant_id": 21,
- "amount": 5,
- "currency": "USD",
- "description": "5.00$ for 1 hour access",
- "access_type": {
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour"
}, - "trial_period": {
- "quantity": 2,
- "period": "hour",
- "description": "2 hour access"
}, - "setup_fee": {
- "fee_amount": 3,
- "description": "3.00$ setup fee"
}, - "item_type": "html_asset",
- "geo_restriction": {
- "id": 4,
- "country_iso": "US",
- "country_set_id": 4,
- "type": "blacklist",
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "starts_at": 1531482438,
- "expires_at": 1531482438
}
]
This endpoint checks and retrieves a viewer's entitlement to an asset
id required | integer Item id |
viewer_id | integer ID of the viewer in case when customer token is used |
curl https://services.inplayer.com/items/{id}/access \ -H "Authorization:Bearer <token>"
{- "id": 44,
- "account_id": 21,
- "customer_id": 33,
- "customer_uuid": "11a7ed90-65d3-4ee2-9d91-4e1409678576",
- "ip_address": "0.0.0.0",
- "country_code": "UK",
- "created_at": 1531482438,
- "expires_at": 1531482438,
- "starts_at": 1531482438,
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
}
This endpoint revokes a viewer's entitlement to an asset. Only merchants are authorized to make this call.
id required | integer Item id |
viewer_id | integer ID of the viewer in case when customer token is used |
consumer_id required | integer Viewer's ID |
curl -X DELETE https://services.inplayer.com/items/{id}/access \ -H "Authorization:Bearer <token>" -d consumer_id=34
{- "code": 400,
- "message": "Failed to remove item access"
}
id required | integer Item id |
merchant_uuid required | string <uuid> Merchant's uuid |
curl https://services.inplayer.com/{merchant_uuid}/{id}
{- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "is_active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metadata": [
- {
- "id": 220211,
- "name": "paywall_cover_photo",
}
], - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1
}
curl -v GET https://services.inplayer.com/items/access-types \ -H 'Authorization: Bearer <token>'
{- "collection": [
- {
- "id": 44,
- "name": "ppv",
- "quantity": 2,
- "period": "hour"
}
]
}
Creates an entitlement for a specific item for a customer.
access_fee_id required | integer Conditionally required The fee id by which we grant access (required if we don't send item_id and expires_at) |
consumer_id required | integer Customer id |
curl -X POST https://staging-v2.inplayer.com/items/access \ -H "Authorization:Bearer <token>" \ -d item_id=1 \ -d consumer_id=2 \ -d expires_at=2017-01-03
{- "id": 44,
- "account_id": 21,
- "customer_id": 33,
- "customer_uuid": "11a7ed90-65d3-4ee2-9d91-4e1409678576",
- "ip_address": "0.0.0.0",
- "country_code": "UK",
- "created_at": 1531482438,
- "expires_at": 1531482438,
- "starts_at": 1531482438,
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
}
Returns an access codes list for the merchant's customers.
curl https://services.inplayer.com/items/access/codes?code=CODE01 \ -H "Authorization: Bearer <token>" \
{- "total": 1599,
- "page": 1,
- "limit": 10,
- "collection": [
- {
- "id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "merchant_id": 101,
- "item_id": 202,
- "type": "private",
- "concurrent_sessions": 4,
- "usage_counter": 3,
- "start_date": 1531482438,
- "end_date": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
}
Updates the timestamp of the Access Code Session
browser_fingerprint required | string The Browser Fingerprint |
code_id required | integer <int64> The ID of the Access Code |
curl -X PATCH https://services.inplayer.com/items/access/codes \ -H "Authorization: Bearer <token>" \ -d code_id=2 \ -d browser_fingerprint=h342342hah52rka \
{- "code": 200,
- "message": "Successfully updated session timestamp."
}
Returns an Access Code response with the details and all active sessions for the code.
curl https://services.inplayer.com/items/access/codes/{code_uuid} -H "Authorization: Bearer <token>" \
{- "access_code": {
- "id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "merchant_id": 101,
- "item_id": 202,
- "type": "private",
- "concurrent_sessions": 4,
- "usage_counter": 3,
- "start_date": 1531482438,
- "end_date": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}, - "active_sessions": [
- {
- "id": 1,
- "code_id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "browser_fingerprint": "84d5d53a9adc08d0f506e6d763817699",
- "agent_info": "Device: desktop, Browser: Chrome : 89.0.4389.90, OS: Windows 10, IpAddress: 46.217.56.158",
- "last_used": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
}
Updates Access Code
type | string The type of the Access Code. Can be "private" or "public" |
concurrent_sessions | integer <int64> The number of sessions that can be used in cuncurrency of the same Access Code. |
start_date | integer <int64> Unix timestamp showing when the Access Code can be used from. |
end_date | integer <int64> Unix timestamp showing when the Access Code can be used to. |
curl -X PATCH https://services.inplayer.com/items/access/codes/{code_uuid} \ -H "Authorization: Bearer <token>" \ -d type=private \ -d concurrent_sessions=2 \
{- "id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "merchant_id": 101,
- "item_id": 202,
- "type": "private",
- "concurrent_sessions": 4,
- "usage_counter": 3,
- "start_date": 1531482438,
- "end_date": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
Deletes an active session for given code and fingerprint. This is handler for end users without authorization
curl -X DELETE https://services.inplayer.com/items/access/codes/{code_uuid}/{fingerprint} \
{- "code": 200,
- "message": "Successfully deleted session."
}
Deletes an active session for given code and fingerprint. This is the Merchant delete route
curl -X DELETE https://services.inplayer.com/items/access/codes/{code_uuid}/{fingerprint}/merchant \ -H "Authorization:Bearer <token>"
{- "code": 200,
- "message": "Successfully deleted session."
}
curl https://services.inplayer.com/items/access/codes/{code_uuid}/sessions \ -H "Authorization: Bearer <token>" \
{- "active_sessions": [
- {
- "id": 1,
- "code_id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "browser_fingerprint": "84d5d53a9adc08d0f506e6d763817699",
- "agent_info": "Device: desktop, Browser: Chrome : 89.0.4389.90, OS: Windows 10, IpAddress: 46.217.56.158",
- "last_used": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
}
curl -X DELETE https://services.inplayer.com/items/access/codes/{item_id}/bulk \ -H "Authorization:Bearer <token>"
{- "code": 200,
- "message": "Successfully executed bulk session termination"
}
Updates list of Access Codes in bulk
type | string The type of the Access Code. Can be "private" or "public" |
concurrent_sessions | integer <int64> The number of sessions that can be used in cuncurrency of the same Access Code. |
start_date | integer <int64> Unix timestamp showing when the Access Code can be used from. |
end_date | integer <int64> Unix timestamp showing when the Access Code can be used to. |
curl -X PATCH https://services.inplayer.com/items/access/codes/{code_id} \ -H "Authorization: Bearer <token>" \ -d type=private \ -d concurrent_sessions=2 \ -d start_date=2021-01-15 12:00:00 \
{- "code": 200,
- "message": "Successfully executed bulk code update"
}
curl https://services.inplayer.com/items/access/codes/bulk/failed/download/{file_name} -H "Authorization: Bearer <token>" \
{
}
Returns an access codes error files list.
curl https://services.inplayer.com/items/access/codes/bulk/failed/list -H "Authorization: Bearer <token>" \
[- {
- "name": "access_codes_2006-01-02_15-04-05.csv",
- "created_at": 1531482438
}
]
Creates an Access Code
code | string The Access Code |
item_id | integer <int64> ID of the Item that this Access Code can be used for. |
type | string The type of the Access Code. Can be "private" or "public" |
concurrent_sessions | integer <int64> The number of sessions that can be used in cuncurrency of the same Access Code. |
usage_counter | integer <int64> The total number of usages for the Access Code. |
start_date | integer <int64> Unix timestamp showing when the Access Code can be used from. |
end_date | integer <int64> Unix timestamp showing when the Access Code can be used to. |
curl -X POST https://services.inplayer.com/items/access/codes/create \ -H "Authorization: Bearer <token>" \ -d type=private \ -d concurrent_sessions=2 \ -d code=CODE01 \ -d item_id=2501 \ -d start_date=2021-01-15 12:00:00 \ -d end_date=2021-02-15 12:00:00
{- "access_code": {
- "id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "merchant_id": 101,
- "item_id": 202,
- "type": "private",
- "concurrent_sessions": 4,
- "usage_counter": 3,
- "start_date": 1531482438,
- "end_date": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
}
The code entry endpoint
browser_fingerprint required | string The Browser Fingerprint |
code required | integer <int64> The ID of the Access Code |
item_id required | integer <int64> The ID of the Item |
curl -X POST https://services.inplayer.com/items/access/codes/entry \ -H "Authorization: Bearer <token>" \ -d code=CODE01 \ -d item_id=2501 \ -d browser_fingerprint=h342342hah52rka \
{- "code_id": 23,
- "code": "CODE01",
- "browser_fingerprint": "84d5d53a9adc08d0f506e6d763817699",
- "item_id": 202,
- "type": "private",
- "content": "<href/>content link"
}
Returns an access codes list for the Item.
curl https://services.inplayer.com/items/access/codes/item/4923?limit=10 \ -H "Authorization: Bearer <token>" \
{- "total": 1599,
- "page": 1,
- "limit": 10,
- "collection": [
- {
- "id": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "code": "CODE01",
- "merchant_id": 101,
- "item_id": 202,
- "type": "private",
- "concurrent_sessions": 4,
- "usage_counter": 3,
- "start_date": 1531482438,
- "end_date": 1531482438,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
]
}
Returns signed url to be used for the bulk upload of access codes.
curl https://services.inplayer.com/items/access/codes/item/4923/signed-url -H "Authorization: Bearer <token>" \
{- "file_name": "access_codes_2006-01-02_15-04-05.csv",
- "method": "PUT",
- "headers": {
- "content-type": "text/csv; charset=utf-8"
}
}
Uploads access codes in bulk using a provided csv file. Returns bulk.access.codes.succeed notification on success
file_name required | string The name of the csv file |
merchant_uuid required | string The Merchant's UUID |
merchant_id required | integer <int64> The Merchant's ID |
curl -X POST https://services.inplayer.com/items/access/codes/item/4242/upload \ -H "Authorization: Bearer <token>" \ -d file_name=access_codes_2006-01-02_15-04-05.csv \ -d merchant_id=2501 \ -d merchant_uuid=528b1b80-5868-4abc-a9b6-4d3455d719c8 \
{- "code": 200,
- "message": "Bulk access codes in progress"
}
Returns an asset access list for the merchant's customers.
customerID | integer The specified account's id |
status required | string Specifies whether the records returned should be for 'active', 'inactive', or 'all' items |
type | string Denotes the type of a specified item access which can either be 'granted', 'purchased', 'revoked', 'full-discount' or 'access-voucher'. If none is specified, the response result will return access records for the all possible types of access. |
page | integer Pagination; the page currently in use |
size | integer Denotes the number of records per page to be listed |
search | string An array of key-value pairs within a request URL that searches the asset of interest. The process of searching can be narrowed down by specifying (a combination of) the Asset Title, Asset Type, Customer's Email, and Customer ID. E.g. https://staging-v2.inplayer.com/items/access/customers?page=0&size=15&search[]=consumer_email:user222@inplayer.com&search[]=item_title:Asset2&search[]=type:purchased&search[]=consumer_id:35814&status=active&order=createdAt&srkey=0.2256848162115539 |
curl https://services.inplayer.com/items/access/customers?status=all
{- "collection": [
- {
- "type": "revoked",
- "expires_at": 1531482438,
- "revoked": 1,
- "merchant_id": 23131,
- "customer_id": 33,
- "customer_email": "user@inplayer.com",
- "item_id": 44232,
- "item_title": "My New Asset",
- "item_access_id": 43543,
- "starts_at": 1531482438,
- "created_at": 1531482438
}
], - "total": 533
}
Creates an item entitlement for a specific customer which does not expire.
access_fee required | integer Access fee id |
curl https://services.inplayer.com/items/access/unlimited \ -H "Authorization: Bearer <token>" \ -d access_fee=12
{- "id": 44,
- "account_id": 21,
- "customer_id": 33,
- "customer_uuid": "11a7ed90-65d3-4ee2-9d91-4e1409678576",
- "ip_address": "0.0.0.0",
- "country_code": "UK",
- "created_at": 1531482438,
- "expires_at": 1531482438,
- "starts_at": 1531482438,
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
}
Creates an item and specifies price details.
item_id | integer The item's ID |
item_type required | string The name of the item type |
content required | string The item's content |
title required | string The title of the item |
access_control_type_id | integer Shows the access control type ID carrying one of the enlisted values:
|
Array of objects | |
Array of objects Object containing additional information about the item | |
external_asset_id | string The external asset identifier set by the hosting platform or OVP provider |
curl -X PATCH https://services.inplayer.com/items/asset \ -H "Authorization: Bearer <token>" \ -d item_type=html_asset \ -d title=Example-asset-title \ -d metadata[foo]=bar \ -d access_fees[0][id]=1 \ -d access_fees[0][access_type_id]=5 \ -d access_fees[0][amount]=11 \ -d access_fees[0][currency]=EUR \ -d access_fees[0][description]="Access fee 1 description" \ -d access_fees[1][id]=2 \ -d access_fees[1][access_type_id]=6 \ -d access_fees[1][amount]=7 \ -d access_fees[1][currency]=EUR \ -d access_fees[1][description]="Access fee 2 description" \ -d content="Hello world!" \ -d item_id=36624 \ -d external_asset_id=123
{- "id": 34
}
Returns the external asset of interest, specified by asset ID and type.
asset-type required | string Enum: "ooyala_asset" "piksel_asset" "wistia_asset" "livestream_asset" "laola_asset" "brightcove_asset" "jw" "kaltura_asset" "wowza_asset" "qbrick_asset" "dacast_asset" The name of the specific asset type |
external-asset-id required | int The external asset ID |
merchant_uuid | string Example: merchant_uuid=e5ac2013-8d10-42ba-abb5-291c5201cea8 the uuid from the account |
external_id | string Example: external_id=e5ac2013-8d10-42ba-abb5-291c5201cea8 In case of |
curl https://services.inplayer.com/items/assets/external/{asset-type}/{external-asset-id}
{- "id": 33,
- "external_asset_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "item_type_id": 21,
- "item_id": 21,
- "created_at": 1531482438,
- "updated_at": 1531482438
}
This endpoint extends an existing entitlement for an asset for a particular customer.
consumer_id required | integer Customer id |
item_id required | integer Item id |
expires_at required | string <date-time> |
curl https://services.inplayer.com/items/extend-access \ -H "Authorization: Bearer <token>" \ -d item_id=1 \ -d consumer_id=2 \ -d expires_at=2017-01-03
{- "id": 44,
- "account_id": 21,
- "customer_id": 33,
- "customer_uuid": "11a7ed90-65d3-4ee2-9d91-4e1409678576",
- "ip_address": "0.0.0.0",
- "country_code": "UK",
- "created_at": 1531482438,
- "expires_at": 1531482438,
- "starts_at": 1531482438,
- "item": {
- "content": "The asset's content as stringified JSON object",
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
}
Returns a collection of packages
is_active | string Filter packages by status |
curl https://services.inplayer.com/items/packages/a4c62b7-c7ds9-4a9a9-s85de9-1d28sa98
{- "total": 10,
- "page": 1,
- "offset": 0,
- "limit": 10,
- "collection": [
- {
- "id": 414141,
- "merchant_id": 2322,
- "is_active": true,
- "title": "The package title",
- "content": "The package content",
- "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "metadata": {
- "description": "The item description",
- "preview_image_name": "Main image",
- "thumbnail_image_name": "Main thumbnail image"
}, - "items": 156
}
]
}
Adds a new item to the specified package.
package_id required | integer Package ID |
item_id required | integer Item ID |
curl -X PUT 'https://services.inplayer.com/items/packages/{package_id}/item/{asset_id}' \ -H "Authorization: Bearer <token>"
{- "id": 43211
}
Returns a collection of items for a specific package
package_id required | integer Package ID |
search | Array of arrays Serach by title, id, merchant_id or merchant_uuid. e.g. ?search[]=title:exampleTitle |
curl https://services.inplayer.com/items/packages/{package_id}/items
{- "total": 1599,
- "page": 1,
- "offset": 0,
- "limit": 10,
- "collection": [
- {
- "id": 33,
- "merchant_id": 21,
- "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
- "active": true,
- "title": "Foo bar",
- "access_control_type": {
- "id": 4,
- "name": "Paid",
- "auth": true
}, - "item_type": {
- "id": 44,
- "name": "brightcove_asset",
- "content_type": "ovp",
- "host": "inplayer",
- "description": "OVP asset"
}, - "age_restriction": {
- "min_age": 18
}, - "metahash": {
- "property1": "string",
- "property2": "string"
}, - "created_at": 1531482438,
- "updated_at": 1531482438,
- "template_id": 1,
- "is_giftable": true,
- "gift_metadata": {
- "id": 4,
- "item_id": 4,
- "description": "Paid",
- "created_at": 1543238500,
- "updated_at": 1543238500
}
}
]
}
ovp required | string |
role_arn required | string |
private_key required | string |
curl -X POST https://services.inplayer.com/ovps/ivs/keys \ -H 'Authorization=Bearer <token>' \ -d ovp="ivs" \ -d role_arn="2zLOTvjR4YhdHm3G89DA8LQHMNY5yreKN4FY \ -d private_key="qtsc0uew"
{- "code": 200,
- "message": "Your keys were successfully created."
}