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 |
callbackData (optional) |
object | An object with the data which will be specified in the callback with the message status. Any |
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 (optional) |
string | Message heading. Maximum length - 50 characters |
message (optional) |
string | Message text. Maximum length - 2048 characters |
image (optional) |
string | Image URL. Maximum length - 512 characters |
deeplink (optional) |
Deeplink | Parameters for switching to the Cardsmobile application. |
Deeplink¶
Parameter | Data type | Description |
---|---|---|
target (optional) |
string | Points out the screen to go to after clicking on the notification.
|
campaignId (optional) |
string | Specific promotion ID to go to. Required if |
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. |
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"
}
]
}