Skip to main content
Skip table of contents

Media cards

Overview

A media card is an aggregation of most of the information that a client application needs to be able to present a single-page view of the content.

This page explains how to retrieve media card information for content and explains how to interpret the metadata that is returned in order to display it on the screen in the most appropriate way.

Here is how the VOD media card API response maps to what is displayed (here using the ION VOD media card view as an example):

mediacard.drawio.png

Media card types

There are different endpoints for media cards for different types of content – live programmes (events), VOD, series, and recordings.

Each of these has different content that allows them to each be presented in the most appropriate way in a client application.

In each media card type, there are variations depending on the type of content. For example:

  • An episode of a series has additional metadata that is not relevant for a movie (whether they are VOD or live)

  • For a live programme that is a sporting event, there is additional metadata that is not relevant to an episode of a series.

Images

Though a media card response usually includes links to relevant images, you are recommended to use ImageService to get images at the appropriate sizes, aspect ratios, and so on.

Requests

There are four different endpoints for the different types of content.

EPG (live)

To retrieve the media card information for a broadcast event, send a GET request to:

BASH
https://<host>:<port>/metadata/v1/epg/{id}/mediacard

VOD

To retrieve the media card information for a VOD content item, send a GET request to:

BASH
https://<host>:<port>/metadata/v1/vod/{id}/mediacard

Series

To retrieve the media card information for a series, send a GET request to:

BASH
https://<host>:<port>/metadata/v1/series/{id}/mediacard

Recordings

To retrieve the media card information for recording, send a GET request to:

BASH
https://<host>:<port>/metadata/v1/recording/{id}/mediacard

Headers

  • Authorization – bearer access token

  • Cache-Control – caching rules for clients and web proxies

  • Content-Encoding – the compression level of the response

Mandatory arguments

  • id – the identifier of the content/event/series/recording that the media card is for

Other arguments

All these arguments are query parameters:

  • fields – a list of field names to return in the response

  • deviceType – the type of the device making the query (e.g., Android) to ensure that irrelevant results are filtered out

  • Accept-Language – the language (locale) of the response data

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

An unsuccessful request returns an HTTP 401 status.

The recommendations portion of the response is driven by a related recommendation based on the content. Certain parts of the response can be turned on or off through back-end configuration.

Interpreting the response

The following table lists the sections and fields that are returned in the response.

Some sections are dependent on the type for content. This is indicated in the Scope section of the table.

Note that Scope section only includes the most common contentTypes – episode/tvshow and movie.

Some blocks and fields are only relevant for other types. For example, the sportingEvent section is only present for sport-related content (sports, match, and race).

Field

Description

Scope

vod

epg

recording

series

tvshow

movie

episode

movie

episode

movie

id

The ID of the content

For live (epg), this is the same as the eventId.

For vod, this is the same as the contentId.

contentLinkId

contentLinkId provides the link between an event and the editorial content that it corresponds to.

When an editorial content is created from an event (for catch-up or recording), this value is copied to the editorial content’s contentLinkId field.

For deep linking, this specifies the ID of the same editorial content from a different content provider.

If this field has a value, and if other playout variants are available for the same content, these will be available in linkedContent (see below).

This is only relevant in deployments that use the one-to-one event/editorial content model (the default for new deployments)

See Selecting an event-to-editorial-content mapping model.

type

The content type – one of programme, catchup, vod, series, recording

Title

The title of the content

Description

The content description

image

A link to the media card image

broadcast

The broadcast start and end times (epoch time) and the duration (in minutes)

Actors

The actors

Categories

The categories that the content belongs to

Ratings

The parental rating(s) for the content. There can be multiple ratings, one per rating body.

eventId

The ID of the broadcast event

contentId

The content ID

isStartOver

Whether start-over is enabled for the content/event

isCatchUp

Whether catch-up is enabled for the content/event

isLTCU

Whether long-term catch-up (LTCU) is enabled for the content/event

isSTCU

Whether short-term catch-up (STCU) is enabled for the content/event

isNPVR

Whether NPVR (recording) is enabled for the content/event

channel

Details of the channel on which the event is broadcast

products

Details of the product(s) that the content belongs to.

This allows you to display the different ways that the user can purchase the content.

episodeNumber

The episode number within the season

Episode

The episode name

Year

The year of release

period

The validity period of the account’s entitlement to consume the content

SeasonNumber

For episodes, the number of the season that the episode belongs to

(null)

(null)

(null)

duration

The duration of the content in minutes

contentType

The content type – one of movie, trailer, tvshow, episode, sports, match, race, highlight, music, podcast, news, link, SHORT_FORM, or unknown

media

Links to the playback manifests

series

Information about the available seasons and episodes for the series that the episode belongs to.

(null)

(null)

sportingEvent

If the event is a sporting event, details of the event (tournament, match time period, details of home and away teams, round, status, and so on

csaiAdCueTimes

The time slots when ads are to be inserted into the content (if any)

links

Deep links, that is, links to content from other providers (e.g., Disney+ or Netflix)

Audio

Language(s) in which audio tracks are available

AudioMode

The audio mode

Subtitles

Language(s) in which subtitles are available

cast

Information about cast and crew members.

This is an array that includes some of all of the following:

  • The id of the person. This can be used in a call to ImageService to get an image of the person.

  • One or more roles for the person (e.g., actor and executive producer)

  • images for the person
    These may or may not be available, and even if they are available, they may not be a suitable size. So you are recommended to request images from ImageService instead.

  • externalIds – the ID(s) of the person in external provider systems (e.g., Gracenote)

  • The role type (cast or persona)

  • The person's name

  • The person’s bio

  • The person’s dateOfBirth

  • For each role, one or more of the following:

    • An id

    • The role name (e.g. Actor, Narrator, or the name of the character)

    • The billingOrder

    • images
      Again, you are recommended to request images from ImageService.

linkedContent

If contentLinkId (see above) has a value, and if other playout variants are available for the same content, these will be available here.

guardTimeStart

Buffer added to the start of the recording (in seconds)

guardTimeEnd

Buffer added to the end of the recording (in seconds)

favourite

If the content has been favourited by the user, details of the favourite

bookmark

If the content has been bookmarked by the user (that is, the user started watching the content, but stopped part way through), details of the bookmark

recordings

Any recording the user has made of this content

recommendations

Any recommendations associated with this content

See also

For full details of this API, see Content Discovery Facade API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.