Skip to main content
Skip table of contents

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:

CODE
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:

    • 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 format

      • end – validity period end date in ISO 8601 format

    • A productRef block that specifies the product to which entities are being linked. This block contains:

      • Either:

        • id – the ID of the product, or

        • Both providerId and providerResourceId

    • A marketableRef that specifies the entity being linked to the product. This block contains:

      • Either:

        • id – the ID of the entity, or

        • Both providerId and providerResourceId

      •  type – the entity type. It must be one of the following:

        • technicalChannel 

        • node 

        • event 

        • editorialContent

        • editorialChannel 

        • contentGroup 

The specified validity period(s) is not enforced. The validity periods on the product and on individual editorials and technicals determine the visibility of individual items.

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:

CODE
{
    "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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.