OpenTV ENTera & OpenTV Platform Documentation

Message formats

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:

JSON
{
  "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:

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

data.referenceType

Tells the client what type of message this is

check mark

EPG_UPDATE

check mark


ENTITLEMENT_UPDATE

check mark

NOTIFICATION_UPDATE

check mark

NOTIFICATION

check mark

ALERT

(Requires clearing by the user.)

check mark

PROMOTION

data.userProfile

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.

cross mark


cross mark


cross mark


check mark

User profile ID

check mark

User profile ID

check mark

User profile ID

data.title

The message title

cross mark


check mark

String

check mark

String

check mark

String

Title, short description

check mark

String

Title, short description

check mark

String

Title, short description

data.message

The message contents

cross mark


cross mark


cross mark


check mark

String (optional)

check mark

String (optional)

check mark

String (optional)

data.reference

The entitlement update reference

check mark

String

cross mark


cross mark


cross mark


cross mark


cross mark


data.action

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.

check mark

REFRESH

cross mark


cross mark


check mark

Allowed values:

  • OPEN_CONTENT

  • OPEN_PRODUCT – open a product (i.e., a promotion to purchase)

  • OPEN_APP

  • OPEN_PACK

check mark

Allowed values:

  • OPEN_CONTENT

  • OPEN_PRODUCT – open a product (i.e., a promotion to purchase)

  • OPEN_APP

  • OPEN_PACK

check mark

Allowed values:

  • OPEN_CONTENT

  • OPEN_PRODUCT – open a product (i.e., a promotion to purchase)

  • OPEN_APP

  • OPEN_PACK

data.name

The event name

check mark

String

cross mark


cross mark


cross mark


cross mark


cross mark


data.priority

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).

check mark

HIGH

cross mark


cross mark


check mark

String

check mark

String

check mark

String

data.start

The start date/time of the updated event

check mark

Date/time

cross mark


cross mark


cross mark


cross mark


cross mark


data.end

The end date/time of the updated event

check mark

Date/time

cross mark


cross mark


cross mark


cross mark


cross mark


data.displayTime

The amount of time that the message should be displayed on the screen

Required if message is of referenceType NOTIFICATION or PROMOTION to indicate how long the message should remain on the screen.

cross mark


cross mark


cross mark


check mark


Time in seconds

check mark

Time in seconds

check mark

Time in seconds

data.body

The message body

cross mark


check mark

JSON – see Message format – entitlement changes

check mark

String – simple text message

check mark

Fields in body depend on the message type and action.

check mark

Fields in body depend on the message type and action.

check mark

Fields in body depend on the message type and action.

data.body.productId

The ID of the product to be opened if the user clicks on the message

Required if data.action is OPEN_PRODUCT.

cross mark


check mark


cross mark


check mark

Product ID

check mark

Product ID

check mark

Product ID

data.body.channelId

The ID of the channel to be navigated to is the user clicks on the message

Required if data.action is OPEN_CONTENT and relates to a channel


cross mark


cross mark


cross mark


check mark


Channel ID

check mark

Channel ID

check mark

Channel ID

data.body.contentId

The ID of the content to be opened if the user clicks on the message

Required if data.action is OPEN_CONTENT and relates to VOD or event (editorial ID).

cross mark


cross mark


cross mark


check mark

Content ID

check mark

Content ID

check mark

Content ID

data.body.eventId

The ID of the event to be opened if the user clicks on the message

Required if data.action is OPEN_CONTENT and relates to a BTV event (instead of content ID).

cross mark


cross mark


cross mark


check mark

Event ID

check mark

Event ID

check mark

Event ID

data.body.appUrl

The URL of the app to be opened if the user clicks on the message

Required if data.action is OPEN_APP.

cross mark


cross mark


cross mark


check mark

App URL

check mark

App URL

check mark

App URL

data.body.packId

The ID of the pack product to be opened if the user clicks on the message

Required if data.action is OPEN_PACK.

cross mark


cross mark


cross mark


check mark

Pack ID

check mark

Pack ID

check mark

Pack ID

data.body.accountid

The ID of the account for which entitlements are being update

cross mark


check mark

Account ID

cross mark


cross mark


cross mark


cross mark


data.body.deviceId

The ID of the device for which entitlements are being update

cross mark


check mark

Device ID

cross mark


cross mark


cross mark


cross mark


data.body.status

The status of the entitlement that has changed

cross mark


check mark

String

cross mark


cross mark


cross mark


cross mark


data.body.validFrom

The date/time that the entitlement is valid from

cross mark


check mark

Date/time

cross mark


cross mark


cross mark


cross mark


data.body.expiryDate

The date/time that the message is valid until

cross mark


check mark

Date/time

cross mark


cross mark


cross mark


cross mark


data.body.imageUrl

The URL of an image to be displayed in the message window

Optional – to be shown in message window if provided.

cross mark


cross mark


cross mark


check mark


URL

check mark

URL

check mark

URL

data.body.videoUrl

The URL of a video to be displayed in the message window

Optional – expected to be a playable video not in content catalogue.

cross mark


cross mark


cross mark


check mark


URL

check mark

URL

check mark

URL

See also

Managing messaging