OpenTV ENTera & OpenTV Platform Documentation
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2

Update a product

Request

To update a product, send a PUT request to:

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

The payload should contain the details of the product that are to be updated.

Mandatory fields

  • type – must be set to the original value when it was created

Example

A request with this payload updates the name of the specified product:

JSON
{
    "type": "transactional",
    "purchasablePeriod":{
        "start":"2018-01-01T00:00:00Z",
        "end":"2020-01-01T00:00:00Z"
    },
    "nominalPrice": {
        "amount": 50,
        "currency": "EUR"
    }
}

Response

A successful request returns an HTTP 202 status and a link to the updated 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.