Push Notification

Device

Register a device to receive push notifications. This call should also be used to update tags the device receives push notifications for. A complete list of all tags must always be provided. The device will be unsubscribed from all tags that are not included in the tag list.

The Push-Backend: FCM request header MUST be set for this request to succeed!

Registration and "matchday": When sending tags including one of the tags "matchday_on_the_way", "matchday_stadium" or "matchday_home" the device will be registered only to one of tthem and the other tags like "news" will be skipped for registration but stored in the backend. After the matchday has ended the device will be unregistered from "matchday_on_the_way", "matchday_stadium" or "matchday_home" and registered to the other tags. This means that devices will not receive pushes for "news" during a matchday if they are registered to a matchday tag.

post/notifications/devices

Request body

idstring required

Device token push notifications will be sent to.

type'gcm' | 'apns' | 'wns' required

Supported push providers types:

  • Google Cloud Messaging (gcm)
  • Apple Push Notification Service (apns)
  • Windows Push Notification Services (wns)
tagsstring[]

Tags the device receives push notifications for. Passing [] or null will reset the tags.

localestring

Locale of the object. 'de-DE', 'en-GB' or 'nl-NL'. This locale must be whitelisted for your club!

Example request

{
  "id": "APA91bHKFbbK7omJ02Mfo7oDn_nMXp5FYcp5uspy-Kggeuh84jyAgiHq7vpG25sMIqc4lLoCHli0KySStRWHLFDdt-wb8FlaO2cOYPAKlBbvSOcqhdZX1Bovh2Oh3oW_FEDxDYQpVA3a",
  "tags": [
    "hsv_match_goals",
    "hsv_match_highlights"
  ],
  "locale": "de-DE"
}

Response

OK

idstring required

Device token push notifications will be sent to.

type'gcm' | 'apns' | 'wns' required

Supported push providers types:

  • Google Cloud Messaging (gcm)
  • Apple Push Notification Service (apns)
  • Windows Push Notification Services (wns)
tagsstring[]

Tags the device receives push notifications for.

localestring

Locale of the object. 'de-DE', 'en-GB' or 'nl-NL'. This locale must be whitelisted for your club!

Example response

{
  "id": "APA91bHKFbbK7omJ02Mfo7oDn_nMXp5FYcp5uspy-Kggeuh84jyAgiHq7vpG25sMIqc4lLoCHli0KySStRWHLFDdt-wb8FlaO2cOYPAKlBbvSOcqhdZX1Bovh2Oh3oW_FEDxDYQpVA3a",
  "tags": [
    "hsv_match_goals",
    "hsv_match_highlights"
  ],
  "locale": "de-DE"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.