Push Notifications

This service handles sending push notifications, registering/updating device push notifications preferences.

Register device for push notifications

Please see Add a Device

Update push token

Please see Update a Device

Update push notifications preferences

PUT HTTPS /v1/push/{appName}/devices/{id}/groups
Name Required Values Description
AUTHORIZATION Y Bearer {token} Used to attach access token for API call

Body

Name Required Values Description
CONTENT-TYPE Y application/json Used to alert the rest service to the presence of a json body

Path Parameters

Name Required Description Type
appName Y Desired app name (e.g nflmobile) String
id Y Unique device identifier String

Body Fields

Name Required Description Type
groups Y Groups the device is subscribed to. (e.g breakingNews) list
Available Groups

Please note that in the client, the user must have the option to explicitly disable or enable subscriptions to any of the groups below.

Name Description
breakingNews breaking news
tuneInAlertDraft tune in alert draft
tuneInAlertLiveGame tune in alert for live games
tuneInAlertLiveProgramming tune in alert for live programming
teamAlertScoringPlays_[teamabbr] team alert for scoring plays e.g: teamAlertScoringPlays_CHI
teamAlertNews_[teamabbr] team alert news e.g: teamAlertNews_WAS
teamAlertGameStart_[teamabbr] team alert for game start e.g: teamAlertGameStart_NYJ
teamAlertGameEnd_[teamabbr] team alert for final score e.g: teamAlertGameEnd_NYJ
trendingNews trending news
teamAlertInjury_[teamabbr] team alert for injuries
relationalAlertGameDiff_[teamabbr] game points differential for a game
relationalAlertGameOvertime[teamabbr] game going to overtime
closeGameVzw all verizon users, triggered by any game going to overtime or point diff

Request JSON

{
   "groups":[
     "breakingNews"
   ]
}

Response Status Code

Code Description Body
202 Accepted No body
400 Bad Request No body

Payload

Before implementing push notifications on the client make sure you familiarize yourself with the different platform specific payloads.

The following mobile platforms are supported for push notifications:

Generic

Schema

The schema below is essentially adapted to the different mobile platforms. It is designed with extensibility in mind. Virtually, infinite combinations of deep-linking behaviors can be added. Platform specific schema are outlined further below.

Note: Some fields inside the payload are not always required, therefore they can be null/absent. Please handle the notification accordingly. In all cases message will always be provided, by default display the message and link to the app home screen.

Notification:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Notification payload",
  "title": "notification",
  "extras": {
    "type": "object",
    "description": "Additional payload information necessary for the client to process the push",
    "title": "extras",
    "properties": {
      "type": {
        "type": "string",
        "required": true,
        "description": "Type uniquely identifies the deep-linking behavior and nature of the notification",
        "title": "type"
      },
      "more": {
        "type": "object",
        "description": "Placeholder for extra parameters defined by the type",
        "title": "more",
        "additionalProperties": true
      }
    }
  },
  "properties": {
    "message": {
      "type": "string",
      "required": true,
      "title": "message"
    },
    "extras": {
      "type": "object",
      "$ref": "#/extras",
      "title": "extras"
    }
  }
}

Extras:

{
 "$schema": "http://json-schema.org/draft-04/schema#",
 "type": "object",
 "description": "Additional payload information necessary for the client to process the push",
 "title": "extras",
 "properties": {
   "type": {
     "type": "string",
     "required": true,
     "description": "Type uniquely identifies the deep-linking behavior and nature of the notification",
     "title": "type"
   },
   "more": {
     "type": "object",
     "description": "Placeholder for extra parameters defined by the type",
     "title": "more",
     "additionalProperties": true
   }
 }
}

Each type defines a unique behavior defined by NFL business rules. See below for an exhaustive list of possible types.

type value Required parameters in more Description
breakingNews articleId links to an article
trendingNews N/A links to the Stories screen
teamAlertGameStart gameId game details screen for that matchup
teamAlertGameEnd gameId game details screen for that matchup
teamAlertScoringPlay gameId game details screen for that matchup
teamAlertNews articleId links to an article
teamAlertInjury injuryId links to injury report
tuneInAlertLiveGame gameId game details screen for that matchup/matchup live stream
tuneInAlertLiveProgramming gameId links to livestream
relationalAlertGameDiff gameId links to livestream
relationalAlertGameOvertime gameId game details screen for that matchup

Example

The example below represents a breaking news linking to an article.

{
  "message": "Breaking News: Da ain't gentle",
  "extras": {
    "type": "breakingNews",
    "more": {
      "articleId": "0ap130309444221"
    }
  }
}

iOS

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "iOS Notification payload",
  "title": "ios notification",
  "properties": {
    "aps": {
      "type": "object",
      "properties": {
        "alert": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string"
            }
          },
          "required": ["body"]
        }
      },
      "required": ["alert"],
      "title": "aps"
    },
    "extras": {
      "type": "object",
      "$ref": "#/extras",
      "title": "extras"
    }
  },
  "required": ["aps"]
}

Example

The example below represents a breaking news linking to an article.

{  
   "aps": {
     "alert": {
       "body": "Breaking News: Da ain't gentle"
     }
   },
   "extras":{  
      "type":"breakingNews",
      "more":{  
         "articleId":"0ap130309444221"
      }
   }
}

Android

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Android Notification payload",
  "title": "Android notification",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "title": "message"
        },
        "extras": {
          "type": "object",
          "$ref": "#/extras",
          "title": "extras"
        }
      },
      "required": ["message"]
    },
    "notification": {
      "type": "object",
      "properties": {
        "title": {
          "title": "title",
          "type": "string"
        }
      },
      "required": ["title"]
    }
  },
  "required": ["data", "notification"]
}

Example

The example below represents a breaking news linking to an article.

{  
   "data": {
     "message":"Breaking News: Da ain't gentle",
     "extras": {  
        "type":"breakingNews",
        "more": {  
         "articleId":"0ap130309444221"
        }
     }
   },
   "notification": {
     "title": "Breaking News: Da ain't gentle"
   }
}

Windows 8+ & windows Phone 8.1+

Schema

Toast

The schema follows the WNS Microsoft documentation for Toast The additional deep-linking logic is embedded into the launch parameter. The launch value is the Extras object serialized in XML.

Example

Toast
<toast launch="&lt;Extras>&lt;type>gameStart&lt;/type>&lt;more>&lt;key>value&lt;/key>&lt;/more>&lt;/Extras>">
    <visual addImageQuery="false">
        <binding template="ToastText02" addImageQuery="false">
            <text>test message</text>
            <image/>
        </binding>
    </visual>
</toast>