OpenTV ENTera & OpenTV Platform Documentation

Creating product links

To create one or more product links (that is, to associate one or more entities (editorial contents, editorial channels, content groups, etc.) to one or more products), send a PUT request to:

https://<host>:<port>/metadata/content/v1/productLinks

  • Content-Type: application/json

All of the following arguments are part of the request body:

  • productLinkSet block containing one or more blocks, each of which represents one product like, and that contains the following:A validityPeriodSet that specifies one or more validity periods for the product link. This block contains one or more blocks that contain:start – validity period start date in ISO 8601 formatend – validity period end date in ISO 8601 formatA productRef block that specifies the product to which entities are being linked. This block contains:Either:id – the ID of the product, orBoth providerId and providerResourceIdA marketableRef that specifies the entity being linked to the product. This block contains:Either:id – the ID of the product, orBoth providerId and providerResourceId type – the entity type. It must be one of the following:technicalChannel node event editorialContent editorialChannel contentGroup 

The following parameter can be specified within a block within productLinkSet (that is, as a sibling element to productRef, marketableRef, and so on):

  • published – a flag (true or false) that allows you to indicate whether the resources should be published (displayed) to the end user or not.

A PUT request with this payload links the specified editorial content to the specified product:

{
    "productLinkSet": [
        {
            "validityPeriodSet": [{
                "start": "2020-06-10T00:00:00Z",
                "end": "2025-07-01T00:00:00Z"
            }],
            "productRef": {
                "id": "PROD19666667-F-SUB-SD"
            },
            "marketableRef": {
                "type": "editorialContent",
                "id": "9462470"
            }
        }
    ]
}

A successful request returns an HTTP 200 status. The response body contains the URIs of the created product links.

A bad request returns an HTTP 400 status.

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