InPlayer API (2.0.0)

Download OpenAPI specification:Download

INTRODUCTION

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.

INPLAYER API

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).

DOCS TERMINOLOGY

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.

API ENVIRONMENTS

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.

ERRORS

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.

V2

All operations related to items/assets

Create item

Enables the merchant to create an item.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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:

  • 1 - Paid ("name")
  • 2 - Code ("id")
  • 3 - Auth ("auth")
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)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 33,
  • "merchant_id": 21,
  • "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
  • "active": true,
  • "title": "Foo bar",
  • "access_control_type": {
    },
  • "item_type": {
    },
  • "age_restriction": {
    },
  • "metahash": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "template_id": 1,
  • "is_giftable": true,
  • "gift_metadata": {
    }
}

Delete item

Enables the merchant to delete a given item.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/{id} \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Item not found"
}

Update item

Updates a given asset.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Request Body schema: application/x-www-form-urlencoded
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:

  • 1 - Paid ("name")
  • 2 - Code ("id")
  • 3 - Auth ("auth")
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)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 33,
  • "merchant_id": 21,
  • "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
  • "active": true,
  • "title": "Foo bar",
  • "access_control_type": {
    },
  • "item_type": {
    },
  • "age_restriction": {
    },
  • "metahash": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "template_id": 1,
  • "is_giftable": true,
  • "gift_metadata": {
    }
}

Patch item

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Request Body schema: application/x-www-form-urlencoded
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:

  • 1 = Paid ("name")
  • 2 = Code ("id")
  • 3 = Auth ("auth")
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)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 33,
  • "merchant_id": 21,
  • "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
  • "active": true,
  • "title": "Foo bar",
  • "access_control_type": {
    },
  • "item_type": {
    },
  • "age_restriction": {
    },
  • "metahash": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "template_id": 1,
  • "is_giftable": true,
  • "gift_metadata": {
    }
}

Get access fees

Lists the various fees for a specific asset.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

query Parameters
expand[voucher]
integer

Voucher ID

Responses

Request samples

curl https://services.inplayer.com/v2/items/{id}/access-fees?expand[voucher]=14

Response samples

Content type
application/json
[
  • {
    }
]

Post access fee

Creates access fee for a specific asset

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

query Parameters
expand[voucher]
integer

Voucher ID

Request Body schema: application/x-www-form-urlencoded
One of
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)

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "id": 44,
  • "merchant_id": 21,
  • "amount": 5,
  • "currency": "USD",
  • "description": "5.00$ for 1 hour access",
  • "item": {
    },
  • "access_type": {
    },
  • "trial_period": {
    },
  • "setup_fee": {
    },
  • "geo_restriction": {
    },
  • "seasonal_fee": {
    },
  • "expires_at": 1531482438,
  • "starts_at": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "external_fees": {
    }
}

Get access fee

Fetches an access fee by the given ID

path Parameters
id
required
integer

Item id

fee_id
required
integer

Fee id

Responses

Request samples

curl https://services.inplayer.com/v2/items/{id}/access-fees/{fee_id}

Response samples

Content type
application/json
{
  • "id": 44,
  • "merchant_id": 21,
  • "amount": 5,
  • "currency": "USD",
  • "description": "5.00$ for 1 hour access",
  • "item": {
    },
  • "access_type": {
    },
  • "trial_period": {
    },
  • "setup_fee": {
    },
  • "geo_restriction": {
    },
  • "seasonal_fee": {
    },
  • "expires_at": 1531482438,
  • "starts_at": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "external_fees": {
    }
}

Delete access fee

Deletes an access fee by a given ID

Authorizations:
bearerAuth
path Parameters
id
required
integer

Item id

fee_id
required
integer

Fee id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/{id}/access-fees/{fee_id} \
  -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "Invalid auth token"
}

Put access fee

Update access fee for a specific asset

Authorizations:
bearerAuth
path Parameters
id
required
integer

Item id

fee_id
required
integer

Fee id

Request Body schema: application/x-www-form-urlencoded
One of
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)

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "id": 44,
  • "merchant_id": 21,
  • "amount": 5,
  • "currency": "USD",
  • "description": "5.00$ for 1 hour access",
  • "item": {
    },
  • "access_type": {
    },
  • "trial_period": {
    },
  • "setup_fee": {
    },
  • "geo_restriction": {
    },
  • "seasonal_fee": {
    },
  • "expires_at": 1531482438,
  • "starts_at": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "external_fees": {
    }
}

Patch access fee

Creates or updates access fees for a specific asset

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
country_iso
string

MK

restriction_type
string

blacklist|whitelist

Array of objects

Object holding details about the access fees

Responses

Request samples

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'

Response samples

Content type
application/json
[
  • {
    }
]

Get donations for item

Returns donations for the given item as well as the donation options.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Responses

Request samples

curl https://services.inplayer.com/v2/items/{id}/donations

Response samples

Content type
application/json
{
  • "donations": {
    },
  • "donation_options": {
    }
}

Add donation for item

Create donation for the given item.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Request Body schema: application/x-www-form-urlencoded
amount
required
integer

10

currency
required
string

EUR

description
required
string

Donate 10EUR

Responses

Request samples

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' \

Response samples

Content type
application/json
{
  • "id": 1,
  • "item_id": 2,
  • "amount": 1100,
  • "float_amount": 11,
  • "currency": "EUR",
  • "description": "Donate 11EUR",
  • "created_at": 1543238500,
  • "updated_at": 1543238500
}

Get donations for item for Merchant user

Returns donations for the given item as well as the donation options for the Merchant user.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique item ID

Responses

Request samples

curl https://services.inplayer.com/v2/items/{id}/donations/merchant

Response samples

Content type
application/json
{
  • "donations": {
    },
  • "donation_options": {
    }
}

Edit donation options for item

Edits donation options for the given item.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique Item ID

Request Body schema: application/x-www-form-urlencoded
custom_price_enabled
bool

true

Responses

Request samples

curl -X PATCH https://services.inplayer.com/v2/items/{id}/donations/options \
    -H "Authorization:Bearer <token>" \
    -d 'custom_price_enabled=1' \

Response samples

Content type
application/json
{
  • "id": 1,
  • "item_id": 2,
  • "custom_price_enabled": 1,
  • "created_at": 1543238500,
  • "updated_at": 1543238500
}

PUT Event Details

Update Event Details for a specific asset

Authorizations:
bearerAuth
path Parameters
id
required
integer

Unique Item ID

Request Body schema: application/x-www-form-urlencoded
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

Responses

Request samples

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'

Response samples

Content type
application/json
{
  • "id": 1,
  • "item_id": 4,
  • "merchant_id": 21,
  • "event_name": "Test Event",
  • "event_description": "Sample Description",
  • "content_category": "Sport",
  • "webpage": "http://test.com",
  • "event_date": 1531482438,
  • "replay_available": true,
  • "expected_viewership": 1000,
  • "is_advertised": false,
  • "industry": "Sports"
}

Delete donation

Deletes donation for the given item and id.

Authorizations:
bearerAuth
path Parameters
item_id
required
integer

Unique Item ID

id
required
integer

Unique Donation ID

Responses

Request samples

curl https://services.inplayer.com/v2/items/{item_id}/donations/{id}
    -H "Authorization:Bearer <token>" \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted donation."
}

Edit donation for item

Edits donation for the given item.

Authorizations:
bearerAuth
path Parameters
item_id
required
integer

Unique Item ID

id
required
integer

Unique Donation ID

Request Body schema: application/x-www-form-urlencoded
amount
integer

10

currency
string

EUR

description
string

Donate 10EUR

Responses

Request samples

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' \

Response samples

Content type
application/json
{
  • "id": 1,
  • "item_id": 2,
  • "amount": 1100,
  • "float_amount": 11,
  • "currency": "EUR",
  • "description": "Donate 11EUR",
  • "created_at": 1543238500,
  • "updated_at": 1543238500
}

Get item details

Returns details about the item type, title, state, when and how it was purchased etc.

path Parameters
id
required
integer

Unique item ID

merchant_uuid
required
string <uuid>

Merchant's universal unique identifier

Responses

Request samples

curl https://services.inplayer.com/v2/items/{merchant_uuid}/{id}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "item_type": {
    },
  • "age_restriction": {
    },
  • "metahash": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "template_id": 1,
  • "is_giftable": true,
  • "gift_metadata": {
    }
}

Delete livelike chatroom

Deactivate livelike chatroom

path Parameters
item_id
required
integer

Item id

chatroom_id
required
integer

chatroom id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/livelike/{item_id}/{chatroom_id} \
  -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 200
}

Creating livelike chatroom

Creates livelike chatroom

Request Body schema: application/x-www-form-urlencoded
item_id
required
int
title
string

title (Optional)

content_filter
string
Enum: "none" "filtered"

none (default)

Responses

Request samples

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=?

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully created livelike chatroom."
}

Updating livelike chatroom

Updates livelike chatroom

Request Body schema: application/x-www-form-urlencoded
item_id
required
int
title
required
string
content_filter
string
Enum: "none" "filtered"

none (default)

Responses

Request samples

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=?

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully updated livelike account."
}

Get livelike chatrooms

Returns all the livelikechatrooms

Responses

Request samples

curl https://services.inplayer.com/v2/items/livelike/chatrooms \
  -H 'authorization: Bearer Access-Token'

Response samples

Content type
application/json
{
  • "Total": 21,
  • "page": 2,
  • "size": 0,
  • "collection": [
    ]
}

Patch assets in package

Updates the assets in package

Authorizations:
bearerAuth
query Parameters
id
required
integer

Package ID

Request Body schema: application/x-www-form-urlencoded
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

Responses

Request samples

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' \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully updated package item"
}

Post asset template

Enables the merchant to create an asset template.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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:

  • 1 - Paid ("name")
  • 2 - Code ("id")
  • 3 - Auth ("auth")
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)

Responses

Request samples

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"

Response samples

Content type
application/json
[
  • {
    }
]

Get templates

Lists the all the templates for specific user.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/items/templates \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
[
  • {
    }
]

Delete template

Enables the merchant to delete a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id} \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Incorrect template id"
}

Patch template

Updates a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Request Body schema: application/x-www-form-urlencoded
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:

  • 1 - Paid ("name")
  • 2 - Code ("id")
  • 3 - Auth ("auth")
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)

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "id": 1,
  • "merchant_id": 21,
  • "name": "Template name example",
  • "access_control_type": {
    },
  • "template_id": 1,
  • "preview_text": "Template description example",
  • "item_type": {
    },
  • "event_type": "live",
  • "event_details": {
    },
  • "restrictions": [
    ],
  • "prices": [
    ],
  • "metadata": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438
}

Get template

Gets template by specific template id.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/items/templates/{template_id} \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "id": 1,
  • "merchant_id": 21,
  • "name": "Template name example",
  • "access_control_type": {
    },
  • "template_id": 1,
  • "preview_text": "Template description example",
  • "item_type": {
    },
  • "event_type": "live",
  • "event_details": {
    },
  • "restrictions": [
    ],
  • "prices": [
    ],
  • "metadata": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438
}

Put template event details

Enables the merchant to replaces event details for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Request Body schema: application/x-www-form-urlencoded
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

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "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
}

Get template event details

Enables the merchant to get a given template event details.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/items/templates/{template_id}/event_details \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "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
}

Delete template metadata

Enables the merchant to delete metadata by keys for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

required
Array of objects

Unique meta key names for deletion

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/metadata?keys[]=meta_name \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted template metadata"
}

Post template price

Enables the merchant to add a price for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Request Body schema: application/x-www-form-urlencoded
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_set_id and country_iso` can be set for a price at any given moment)

country_iso
string

The country restriction correlated to the type (only one of country_set_id and country_iso` can be set for a price at any given moment)

type
string

type of restriction concerning the country_iso

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

Responses

Request samples

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" \

Response samples

Content type
application/json
{
  • "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
}

Put template price

Enables the merchant to replace a price for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

price_id
required
integer

Unique price ID

Request Body schema: application/x-www-form-urlencoded
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_set_id and country_iso` can be set for a price at any given moment)

country_iso
string

The country restriction correlated to the type (only one of country_set_id and country_iso` can be set for a price at any given moment)

type
string

type of restriction concerning the country_iso

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

Responses

Request samples

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" \

Response samples

Content type
application/json
{
  • "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
}

Delete template price

Enables the merchant to delete a given template price.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

price_id
required
integer

Unique price ID

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/prices/{price_id} \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted template price"
}

Post template restrictions

Enables the merchant to add multiple restrictions for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Request Body schema: application/x-www-form-urlencoded
Array of objects

Object containing information about the restriction created

Responses

Request samples

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 \

Response samples

Content type
application/json
[
  • {
    }
]

Put template restrictions

Enables the merchant to replace existing restrictions with new ones for a given template.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

Request Body schema: application/x-www-form-urlencoded
Array of objects

Object containing information about the restriction created

Responses

Request samples

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 \

Response samples

Content type
application/json
[
  • {
    }
]

Delete template restriction

Enables the merchant to delete a given template restriction.

Authorizations:
bearerAuth
path Parameters
template_id
required
integer

Unique template ID

restriction_id
required
integer

Unique restriction ID

Responses

Request samples

curl -X DELETE https://services.inplayer.com/v2/items/templates/{template_id}/restrictions/{restriction_id} \
    -H 'Authorization=Bearer <token>' \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted template restriction"
}

List specific ivs channel

query Parameters
arn
required
any

arn is query parameter that shows which specific channel is being listed

Responses

Request samples

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"

Response samples

Content type
application/json
{}

Delete ivs channel

query Parameters
arn
required
any

arn is query parameter that shows which specific channel is being listed

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted ivs channel."
}

Create ivs channel

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
latency_mode
required
string
Enum: "Normal" "Low"
name
required
string
type
required
string
Enum: "Standard" "Basic"
authorized
required
boolean

Responses

Request samples

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

Response samples

Content type
application/json
{}

Update ivs channel

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
latency_mode
required
string
Enum: "Normal" "Low"
name
required
string
type
required
string
Enum: "Standard" "Basic"
arn
required
string

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "authorized": true,
  • "arn": "arn:aws:ivs:us-east-1:841063901603:channel/J1rcDERHVm6B",
  • "name": "Colby",
  • "latency_mode": "Low",
  • "type": "Standard"
}

List all ivs channel

Responses

Request samples

curl -X https://services.inplayer.com/v2/ovps/ivs/channel?arn={{arn}} \
    -H 'Authorization=Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

V1

All operations related to items/assets

Get access fees

Returns a collection of fees for a specific asset

path Parameters
id
required
integer

Item id

Responses

Request samples

curl https://services.inplayer.com/items/{id}/access-fees

Response samples

Content type
application/json
[
  • {
    }
]

Get item access

This endpoint checks and retrieves a viewer's entitlement to an asset

Authorizations:
bearerAuth
path Parameters
id
required
integer

Item id

query Parameters
viewer_id
integer

ID of the viewer in case when customer token is used

Responses

Request samples

   curl https://services.inplayer.com/items/{id}/access \
        -H "Authorization:Bearer <token>"

Response samples

Content type
application/json
{
  • "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": {
    }
}

Revoke item access

This endpoint revokes a viewer's entitlement to an asset. Only merchants are authorized to make this call.

Authorizations:
bearerAuth
path Parameters
id
required
integer

Item id

query Parameters
viewer_id
integer

ID of the viewer in case when customer token is used

Request Body schema: application/x-www-form-urlencoded
consumer_id
required
integer

Viewer's ID

Responses

Request samples

curl -X DELETE https://services.inplayer.com/items/{id}/access \
    -H "Authorization:Bearer <token>"
    -d consumer_id=34

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Failed to remove item access"
}

Get item details

path Parameters
id
required
integer

Item id

merchant_uuid
required
string <uuid>

Merchant's uuid

Responses

Request samples

curl https://services.inplayer.com/{merchant_uuid}/{id}

Response samples

Content type
application/json
{
  • "id": 33,
  • "merchant_id": 21,
  • "merchant_uuid": "e5ac2013-8d10-42ba-abb5-291c5201cea8",
  • "is_active": true,
  • "title": "Foo bar",
  • "access_control_type": {
    },
  • "item_type": {
    },
  • "age_restriction": {
    },
  • "metadata": [],
  • "metahash": {
    },
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "template_id": 1
}

Get Access Types

Get all access types

Authorizations:
bearerAuth

Responses

Request samples

curl -v GET  https://services.inplayer.com/items/access-types \
  -H 'Authorization: Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

Grant access to an item

Creates an entitlement for a specific item for a customer.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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": {
    }
}

Get Access Codes List

Returns an access codes list for the merchant's customers.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes?code=CODE01 \
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "total": 1599,
  • "page": 1,
  • "limit": 10,
  • "collection": [
    ]
}

Update Session Timestamp

Updates the timestamp of the Access Code Session

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
browser_fingerprint
required
string

The Browser Fingerprint

code_id
required
integer <int64>

The ID of the Access Code

Responses

Request samples

curl -X PATCH https://services.inplayer.com/items/access/codes \
  -H "Authorization: Bearer <token>" \
  -d code_id=2 \
  -d browser_fingerprint=h342342hah52rka \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully updated session timestamp."
}

Get Access Code Details

Returns an Access Code response with the details and all active sessions for the code.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/{code_uuid}
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "access_code": {
    },
  • "active_sessions": [
    ]
}

Update Access Code

Updates Access Code

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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.

Responses

Request samples

curl -X PATCH https://services.inplayer.com/items/access/codes/{code_uuid} \
  -H "Authorization: Bearer <token>" \
  -d type=private \
  -d concurrent_sessions=2 \

Response samples

Content type
application/json
{
  • "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
}

Delete Access Code Session

Deletes an active session for given code and fingerprint. This is handler for end users without authorization

Responses

Request samples

curl -X DELETE https://services.inplayer.com/items/access/codes/{code_uuid}/{fingerprint} \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted session."
}

Delete Access Code Session (Merchant)

Deletes an active session for given code and fingerprint. This is the Merchant delete route

Authorizations:
bearerAuth

Responses

Request samples

curl -X DELETE https://services.inplayer.com/items/access/codes/{code_uuid}/{fingerprint}/merchant \
    -H "Authorization:Bearer <token>"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully deleted session."
}

Get Access Code Sessions

Returns list of active sessions if the code type is private.

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/{code_uuid}/sessions \
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "active_sessions": [
    ]
}

Bulk Session Termination

Deletes all sessions for the given Item

Authorizations:
bearerAuth

Responses

Request samples

curl -X DELETE https://services.inplayer.com/items/access/codes/{item_id}/bulk \
    -H "Authorization:Bearer <token>"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully executed bulk session termination"
}

Bulk Update Access Code

Updates list of Access Codes in bulk

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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.

Responses

Request samples

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 \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully executed bulk code update"
}

Download Error File

Downloads an access codes error file.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/bulk/failed/download/{file_name}
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{}

List Bulk Access Codes Error Files

Returns an access codes error files list.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/bulk/failed/list
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
[
  • {
    }
]

Create Access Code

Creates an Access Code

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "access_code": {
    }
}

Entry Access Code

The code entry endpoint

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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

Responses

Request samples

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 \

Response samples

Content type
application/json
{
  • "code_id": 23,
  • "code": "CODE01",
  • "browser_fingerprint": "84d5d53a9adc08d0f506e6d763817699",
  • "item_id": 202,
  • "type": "private",
  • "content": "<href/>content link"
}

Get Access Codes For Item

Returns an access codes list for the Item.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/item/4923?limit=10 \
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "total": 1599,
  • "page": 1,
  • "limit": 10,
  • "collection": [
    ]
}

Get Signed URL For Bulk Upload

Returns signed url to be used for the bulk upload of access codes.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/items/access/codes/item/4923/signed-url
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "file_name": "access_codes_2006-01-02_15-04-05.csv",
  • "method": "PUT",
  • "headers": {
    }
}

Bulk Access Codes Upload

Uploads access codes in bulk using a provided csv file. Returns bulk.access.codes.succeed notification on success

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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

Responses

Request samples

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 \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Bulk access codes in progress"
}

Get Customer Access List

Returns an asset access list for the merchant's customers.

Authorizations:
bearerAuth
query Parameters
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

Responses

Request samples

curl https://services.inplayer.com/items/access/customers?status=all

Response samples

Content type
application/json
Example
{
  • "collection": [
    ],
  • "total": 533
}

Add unlimited access for an item

Creates an item entitlement for a specific customer which does not expire.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
access_fee
required
integer

Access fee id

Responses

Request samples

curl https://services.inplayer.com/items/access/unlimited \
    -H "Authorization: Bearer <token>" \
    -d access_fee=12

Response samples

Content type
application/json
{
  • "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": {
    }
}

Create an item with price

Creates an item and specifies price details.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
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:

  • 1 - Paid ("name")
  • 2 - Code ("id")
  • 3 - Auth ("auth")
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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 34
}

Get external asset by ID and type

Returns the external asset of interest, specified by asset ID and type.

path Parameters
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

query Parameters
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 cloudfront asset type, place the external_id ( url ) as query param, and put 0 as path parameter value for external-asset-id

Responses

Request samples

curl https://services.inplayer.com/items/assets/external/{asset-type}/{external-asset-id}

Response samples

Content type
application/json
{
  • "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
}

Extend access to an item

This endpoint extends an existing entitlement for an asset for a particular customer.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
consumer_id
required
integer

Customer id

item_id
required
integer

Item id

expires_at
required
string <date-time>

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "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": {
    }
}

Get Merchant's packages

Returns a collection of packages

path Parameters
is_active
string

Filter packages by status

Responses

Request samples

curl https://services.inplayer.com/items/packages/a4c62b7-c7ds9-4a9a9-s85de9-1d28sa98

Response samples

Content type
application/json
{}

Add item to package

Adds a new item to the specified package.

Authorizations:
bearerAuth
path Parameters
package_id
required
integer

Package ID

item_id
required
integer

Item ID

Responses

Request samples

curl -X PUT 'https://services.inplayer.com/items/packages/{package_id}/item/{asset_id}' \
     -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "id": 43211
}

Get package items

Returns a collection of items for a specific package

path Parameters
package_id
required
integer

Package ID

query Parameters
search
Array of arrays

Serach by title, id, merchant_id or merchant_uuid. e.g. ?search[]=title:exampleTitle

Responses

Request samples

curl https://services.inplayer.com/items/packages/{package_id}/items

Response samples

Content type
application/json
{
  • "total": 1599,
  • "page": 1,
  • "offset": 0,
  • "limit": 10,
  • "collection": [
    ]
}

Integrate with ivs

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
ovp
required
string
role_arn
required
string
private_key
required
string

Responses

Request samples

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"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Your keys were successfully created."
}