Skip to content

PUSH WALLET

Sending

To send push-notifications from Cardsmobile application it is required to:

  • Receive sender's ID and Push WALLET API access. To do this, you need to contact the technical support.
  • Call POST /wallet/messages, sending message parameters in the request body with the authorization data in the header.

Request parameters

Parameter Data type Description
from string Approved sender's ID.
to string Phone number in international format, according to E.164 standard.
payload PushPayload Message content settings.
callbackUrl
(optional)
string

The URL to which the system will send notifications about message status changes.

Any valid URL with the HTTP or HTTPS scheme.

callbackData
(optional)
object

An object with the data which will be specified in the callback with the message status.

Any "key" array:
{ "key1": "value1", "key2": "value2" }

scheduledTime
(optional)
string Scheduled message sending time in UTC.
mergeKey
(optional)
string Key for combining request and response.
validity
(optional)
integer Notification lifetime in seconds.

PushPayload

Parameter Data type Description
title string Message heading. Maximum length - 50 characters
message string Message text. Maximum length - 2048 characters
image string Image URL. Maximum length - 512 characters
deeplink Deeplink Parameters for switching to the Cardsmobile application.
Parameter Data type Description
target string

Points out the screen to go to after clicking on the notification.

card - the screen of the issued card.
campaign - the specific promotion for the issued card.
campaigns - list of all promotions on the issued card.

campaignId string

Specific promotion ID to go to.

Required if "target": "campaign".
Maximum length is 512 characters.

Request example

{
  "from": "Company",
  "payload": {
      "deeplink": {
      "campaignId": "q123456",
      "target": "campaign"
    },
    "image": "http://ya.ru/image234323.jpg",
    "message": "Buy all you want!",
    "title": "Sales and discounts"
  },
  "to": "74886035511"
}

Response parameters

Parameter Data type Description
code string

Shows the result of notification processing.

1. OK - processed successfully.
2. REJECTED - an error has occurred while processing the notification.

result string Message ID. To be given with "code": "OK" only.
reasons array An array of the errors that occurred while processing the message. To be given with "code": "REJECTED" only.
reasons.key string Message with error description.
mergeKey string Key to combine request and response.

Response examples

{
  "result": [
    {
      "code": "OK",
      "result": 3670367897656669056,
      "mergeKey": "key"
    }
  ]
}
{
  "result": [
    {
      "code": "REJECTED",
      "result": null,
      "reasons": [
        {
          "key": "invalid.image.url"
        }
      ],
      "mergeKey": "key"
    }
  ]
}