Overview
The format of the message that is received by a client and how the client is expected to handle it depend on the type of message.
In general, all messages share the same top-level format:
{
"notification": {
"body": "<notification_body>",
"title": "<notification_title>"
},
"data": {
"body": "<data_body>",
"title": "<data_title>",
"referenceType": "{NOTIFICATION_UPDATE|ENTITLEMENT_UPDATE|EPG_UPDATE|EAS_UPDATE}"
}
}
The message is delivered as stringified JSON, and is shown here as regular JSON for readability.
Client actions
The client should:
-
Check the value of
data.referenceTypeand act accordingly.
See the following pages for each type:-
NOTIFICATION_UPDATE– Message format – general notifications -
EAS_UPDATE– Message format – Emergency Alert System (EAS) -
ENTITLEMENT_UPDATE– Message format – entitlement changes -
EPG_UPDATE– Message format – EPG update -
NOTIFICATION,ALERT, orPROMOTION– Message format – general notifications, alerts, and promotions
-
-
Check for the presence of a
notificationsection:-
If it is present, the client should immediately display the notification to the user, using the specified
titleandbody. -
If there is no
notificationsection, the client should store the notification so that the user can view it when they choose to (for example, in an inbox).
-
In some cases, if the message includes a notification section and is received while the client application is not open, the system shows the notification and the message never makes it to the client.
Message schema
EAS updates are not listed here – see Message format – Emergency Alert System (EAS).
Although any fields can be used in the data section, NAGRAVISION recommends that the following fields be used.
Note that these fields rely on the client application being updated to make use of them.
If you use ION as your client application, it does not yet recognise these fields.
|
Field name |
Description |
EPG update |
Entitlement |
Notification (general/OpCon) |
Notification |
Alert |
Promotion |
||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Valid in context |
Value |
Valid in context |
Value |
Valid in context |
Value |
Valid in context |
Value |
Valid in context |
Value |
Valid in context |
Value |
||
|
|
Tells the client what type of message this is |
|
|
|
|
|
|
|
|
|
(Requires clearing by the user.) |
|
|
|
|
Specifies the user profile that the message intended for. The client should only show the message to the specified user profile. If a different user profile is in use, the client should save the message and show it when the target user profile is next used. |
|
|
|
|
|
|
|
User profile ID |
|
User profile ID |
|
User profile ID |
|
|
The message title |
|
|
|
String |
|
String |
|
String Title, short description |
|
String Title, short description |
|
String Title, short description |
|
|
The message contents |
|
|
|
|
|
|
|
String (optional) |
|
String (optional) |
|
String (optional) |
|
|
The entitlement update reference |
|
String |
|
|
|
|
|
|
|
|
|
|
|
|
The action associated with the message If this field has a value, the client must provide a way for the user to trigger the action. |
|
|
|
|
|
|
|
Allowed values:
|
|
Allowed values:
|
|
Allowed values:
|
|
|
The event name |
|
String |
|
|
|
|
|
|
|
|
|
|
|
|
The priority of the message Except for EPG updates, values and how they are used are determined by the operator. For example, the client could use this to decide when to show the message (for example, immediately or only once the user finishes watching the current content). |
|
|
|
|
|
|
|
String |
|
String |
|
String |
|
|
The start date/time of the updated event |
|
Date/time |
|
|
|
|
|
|
|
|
|
|
|
|
The end date/time of the updated event |
|
Date/time |
|
|
|
|
|
|
|
|
|
|
|
|
The amount of time that the message should be displayed on the screen Required if message is of |
|
|
|
|
|
|
|
Time in seconds |
|
Time in seconds |
|
Time in seconds |
|
|
The message body |
|
|
|
JSON – see Message format – entitlement changes |
|
String – simple text message |
|
Fields in |
|
Fields in |
|
Fields in |
|
|
The ID of the product to be opened if the user clicks on the message Required if |
|
|
|
|
|
|
|
Product ID |
|
Product ID |
|
Product ID |
|
|
The ID of the channel to be navigated to is the user clicks on the message Required if data.action is
|
|
|
|
|
|
|
|
Channel ID |
|
Channel ID |
|
Channel ID |
|
|
The ID of the content to be opened if the user clicks on the message Required if |
|
|
|
|
|
|
|
Content ID |
|
Content ID |
|
Content ID |
|
|
The ID of the event to be opened if the user clicks on the message Required if |
|
|
|
|
|
|
|
Event ID |
|
Event ID |
|
Event ID |
|
|
The URL of the app to be opened if the user clicks on the message Required if |
|
|
|
|
|
|
|
App URL |
|
App URL |
|
App URL |
|
|
The ID of the pack product to be opened if the user clicks on the message Required if |
|
|
|
|
|
|
|
Pack ID |
|
Pack ID |
|
Pack ID |
|
|
The ID of the account for which entitlements are being update |
|
|
|
Account ID |
|
|
|
|
|
|
|
|
|
|
The ID of the device for which entitlements are being update |
|
|
|
Device ID |
|
|
|
|
|
|
|
|
|
|
The status of the entitlement that has changed |
|
|
|
String |
|
|
|
|
|
|
|
|
|
|
The date/time that the entitlement is valid from |
|
|
|
Date/time |
|
|
|
|
|
|
|
|
|
|
The date/time that the message is valid until |
|
|
|
Date/time |
|
|
|
|
|
|
|
|
|
|
The URL of an image to be displayed in the message window Optional – to be shown in message window if provided. |
|
|
|
|
|
|
|
URL |
|
URL |
|
URL |
|
|
The URL of a video to be displayed in the message window Optional – expected to be a playable video not in content catalogue. |
|
|
|
|
|
|
|
URL |
|
URL |
|
URL |