OpenTV ENTera & OpenTV Platform Documentation

Create a product

Request

To create a product, send a POST request to:

Bash
http://<server>:<port>/cpm/commercial/v1/products

Headers

  • Content-Type: application/json

Mandatory fields

  • type (one of transactional , subscription, capability, or ppv)

  • name

  • providerId

  • providerResourceId

Example

A request with this payload creates the specified product:

JSON
{
    "type": "transactional",
    "name": "NAME_01",
    "providerId": "PROVIDER_ID_001",
    "providerResourceId": "PROVIDER_RESOURCE_ID_001"
}

Response

A successful request returns an HTTP 201 status and a link to the newly created product.

A bad request returns an HTTP 400 status.




Example

A successful request returns a payload that looks like this:

JSON
{
    "self": "/commercial/v1/products/PROVIDER_ID_001_PROVIDER_RESOURCE_ID_001"
}

See also

For full details of this API, see Content and Product Manager (CPM) API documentation: commercial v1.