Create a new season
POST /seasons
POST /content/v1/seasons/
This call allows you to create or update a season.
The contentId is the unique identifier which needs to be used for further interaction with this specific season via the API. Internally, the contentId is mapped to the External reference of the season.
The contentId is not specified in the URL, instead it can be specified in the body of the call. WHATS’ON checks if the contentId exists and if so, it updates the season with that contentId (i.e. external reference). If it doesn't exist, a new season will be created. The contentId will be returned as part of the response.
POST /seasons/
{
"contentId": "EP1234",
"title": "Pilot",
"duration": "00:23:00",
...
}
If no contentId is specified in the body, a unique contentId will be generated for the newly created season and returned as part of the response.
If a template is specified in the URL, the season will be created from a product prototype created in WHATS'ON.
The available fields are specified in the provided Swagger file.
All the drop-down lists in the call are mapped using the API reference property on the drop-down value. See the Drop-downs page for more information.
If the contentId is also part of the body and that contentId is not equal to the contentId in the path, WHATS'ON will try to retrieve the season by matching the contractId specified in the URL and then update it with the contentId specified in the body. This makes it possible to update the contentId of a season via the API.
The product code value will be ignored in following cases:
-
WHATS'ON is configured to automatically calculate the product code.
The content already exists and the product code is read-only.
Request
Following fields can be specified in the URL:
template(optional) This parameter can be used to create a season from a template. This parameter matches the API reference of the product prototype in WHATS'ON.
To create a season, following fields are required in the body:
seasonIdtitleduration
To update a season, following fields are required in the body:
contentId
You can find more information about the body structure and fields in the provided Swagger file.
All the drop-down lists in the call are mapped using the API reference property on the drop-down value. See the Drop-downs page for more information.