Create a new episode
POST /episodes
POST /content/v1/episodes/
This call allows you to create or update an episode.
The contentId is the unique identifier which needs to be used for further interaction with this specific episode via the API. Internally, the contentId is mapped to the external reference of the episode.
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 episode with that contentId (i.e. external reference). If it doesn't exist, a new episode will be created. The contentId will be returned as part of the response.
POST /episodes
{
"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 episode and returned as part of the response.
If a template is specified in the URL, the episode 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 episode by matching the contentId specified in the URL and then update it with the contentId specified in the body. This makes it possible to update the contentId of an episode 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.
It is not possible to update the seasonId of an episode. An episode can be linked to only 1 season during its lifetime.
Request
Following fields can be specified in the URL:
template(optional) This parameter can be used to create an episode from a template. This parameter matches the API reference of the product prototype in WHATS'ON.
To create an episode, following fields are required in the body:
seasonIdtitleduration
To update an episode, following fields are required in the body:
contentId
You can find more information about the body structure and fields in the provided Swagger file.