Show TOC

Notification Data Sent Through HTTP HeadersLocate this document in the navigation structure

Notification data can be sent by the back end as generic HTTP headers or as device platform-specific HTTP headers.

The notification URL is:
  • On-Premise
    http[s]://<host:port>/Notification/<registration ID>
  • Cloud
    https://<HMC base URL>/Notification/<registration ID>
  • URL mentioned here is deprecated and may be removed in a future release. SAP recommends you to use URLs provided in Notification Data Sent Using Push API section.
  • Applications built on platform and later should adopt the header format X-SMP-XXX. To maintain backward compatibility, applications built in earlier versions can continue to use the header format X-SUP-XXX. However, X-SUP-XXX headers will be removed in future releases.
  • Generic header

    The generic HTTP header is used in the HTTP request to send any notification type such as APNS, GCM, BlackBerry, or WNS.

    Header format for notification data in platform and later:

  • APNS-specific headers

    Use these APNS-specific HTTP headers to send APNS notifications via mobile platform:

    Header Structure (SAP Mobile Platform and later) Consists of
    <X-SMP-APNS-ALERT> A JSON document. You can use this header or other individual headers listed in this table.
    <X-SMP-APNS-ALERT-BODY> Text of the alert message.
    <X-SMP-APNS-ALERT-ACTION-LOC-KEY> If a string is specified, this header shows an alert with two buttons: Close and View. iOS uses the string as a key to get a localized string for the correct button title instead of View. If the value is null, the system shows an alert. Click OK to dismiss the alert.
    <X-SMP-APNS-ALERT-LOC-KEY> Key to an alert-message string in a Localizable.strings file for the current localization.
    <X-SMP-APNS-ALERT-LOC-ARGS> Variable string values to appear in place of the format specifiers in loc-key.
    <X-SMP-APNS-ALERT-LAUNCH-IMAGE> File name of an image file in the application bundle. It may include the extension. Used as the launch image when you tap the action button or move the action slider. If this property is not specified, the system uses on of the following:
    • The previous snapshot
    • The image identified by the UILaunchImageFile key in the Info.plist file of the application
    • The Default.png.
    <X-SMP-APNS-BADGE> Number that appears as the badge on the application icon.
    <X-SMP-APNS-SOUND> Name of the sound file in the application bundle.
    <X-SMP-APNS-DATA> Custom payload data values. These values must use the JSON-structured and primitive types, such as dictionary (object), array, string, number, and boolean.
  • GCM-specific headers

    Use these GCM-specific HTTP headers to send GCM notifications:

    Header Structure (SAP Mobile Platform and later) Consists of
    <X-SMP-GCM-COLLAPSEKEY > An arbitrary string (such as "Updates Available") that collapses a group of like messages when the device is offline, so that only the last message is sent to the client.
    <X-SMP-GCM-DATA> Payload data, expressed as parameters prefixed with data and suffixed as the key.
    <X-SMP-GCM-DELAYWHILEIDLE> (Optional) Represented as 1 or true for true, any other value for false, which is the default value.
    <X-SMP-GCM-TIMETOLIVE> Number of seconds that the message remains available on GCM storage if the device is offline.