Profile: promo-card

Profile Schema

An promo-card document is a derivative of the card profile. It specifies a free-form callout content item intended to contain promotional content.

The promo-card profile is intended to be used as a “type” profile.

Structure

The promo-card profile specifies the following attributes:

Name Type Required? Explanation
emphasisLevel string Yes low, medium, or high
cardStyle string Yes A string indicating the rendering style of this card; see the “Card Style” section below
title string No The title to display when rendering this card
attentionLabel string No An extra label displayed alongside the card; common values are BREAKING or EXCLUSIVE
teaser string No A short description of the content represented by the card
isHighPriority boolean No Flag representing whether the card should be visually highlighted for priority
displaySize string No the relative size to display the promo card on a webpage
eyebrowText string No String representing a text eyebrow line for a card
eyebrowLink object No Link object representing an external linking eyebrow line for a card. MUST have an href attribute that starts with http or https, and MUST NOT have rels
brandings Link[] No A set of links to organization(s) that should be used to brand this content; see “Brandings” below

Card Style

The cardStyle indicates the recommended rendering style of this card. Allowed values are listed below; values not on this list will be rejected by CDS.

  • AggSpiceRack
  • AudioCallToAction
  • BestsellerList
  • BookExcerpt
  • BookWithCover
  • BookWithoutCover
  • CallToAction
  • FeaturedPodcastEpisode
  • InsetTwoColumn
  • MediaPromo
  • MusicAggPromo
  • MusicAggPromoWithBlurb
  • MusicPromo
  • MusicSpike
  • Playlist
  • PodcastCard
  • PodcastEpisodeCard
  • ProgramPodcastDirItem
  • ProgramSegment
  • SimpleNoDate
  • Simple
  • Standard
  • VideoPlaylist

Brandings

Similar to the brandings array defined by the publishable profile, the promo-card profile allows its content to be branded using a set of organization links. The brandings array is subject to the following constraints:

  • If present, brandings must contain one or more links
  • Links in brandings must start with http or https
  • Links in brandings cannot have rels

Example promo-card document

{
  "id": "12345",
  "profiles": [
    {
      "href": "/v1/profiles/promo-card",
      "rels": [
        "type"
      ]
    },
    {
      "href": "/v1/profiles/document"
    }
  ],

  "title": "12 Spider-Man catches that caught our breath",
  "cardStyle": "VideoPlaylist",
  "emphasisLevel": "medium",
  "attentionLabel": "VIDEO",
  "teaser": "See listener-submitted videos of New York's own hero protecting citizens",
  "eyebrowText": "News",
  "brandings": [
    {
      "href": "https://organization.api.npr.org/v4/services/s1"
    }
  ]
}

© 2024 npr