Creating a user profile
Request
To create a new user profile, send a POST request to:
https://<host>:<port>/userprofiles/v1/user/userprofiles
Headers
token
– request authentication tokenx-correlation-id
– identifier for logging, to correlate messages across a call flow
Mandatory arguments
name
– the profile name
Optional arguments
childProfile
– whether this is a child profile (true
) or not (false
)pinPromptRequired
– whether the client application should prompt for the parental PIN before allowing access to content/resources (true
orfalse
). That is, if this is true and ratings threshold is set, if the user attempts to access content with a rating equal to or greater than the threshold, they must be prompted for the parental PIN.
(Note that it is the client that interprets whether the threshold is a “greater than” or a “greater than or equal to” value, as the client is responsible for deciding when to prompt for the parental PIN.)preferredAudioLanguage
– the preferred audio language for this user profilepreferredSubtitleLanguage
– the preferred subtitle language for this user profileratingsThresholds
– the ratings threshold(s) for the user profile. This is an array, each member of which consists of the following parameters:ratingsBody
– the abbreviated name of the ratings bodyratingsThreshold
– the ratings threshold for this ratings body. When this profile is in used, content with an age rating greater than or equal to the specified threshold will be filtered out on the platform side and not sent to the client (except for EPG events, which will be displayed in the EPG but which cannot be viewed).
(Note that it is the client that interprets whether the threshold is a “greater than” or a “greater than or equal to” value, as the client is responsible for deciding when to prompt for the parental PIN.)
iconName
– the name of the icon (from Image Metadata Service) to be displayed for this profile (see Getting all the available user profile icons)additionalProperties
– additional properties. This is an array of key-value pairs, each consisting of two parameters:name
– the property’s namevalue
– the property’s value
Response
A successful request returns an HTTP 201 status with the ID of the new profile.
A bad request returns an HTTP 400 status.
An unauthorised request returns an HTTP 401 status.
A forbidden request returns an HTTP 403 status.
An invalid request returns an HTTP 404 status.
Example
A successful request returns a payload that looks like this:
{
"_id": "string"
}