CardsMobile#
CardsMobile message type applies only to the “Wallet“ application.
In CardsMobile messages, it is possible to transmit a title, text, and optionally, an image.
Message Sending#
1 {
2 "login": "Login",
3 "password": "Password",
4 "destAddr": "79211234567",
5 "message": {
6 "type": "CARDSMOBILE",
7 "data": {
8 "text": "Hello, world!",
9 "title": "Super Title!",
10 "serviceNumber": "0000",
11 "ttl": 3600,
12 "ttlUnit": "SECONDS",
13 "content": {
14 "contentUrl": "http://ya.ru/123.jpg"
15 },
16 "target": "campaign",
17 "campaignId": "123",
18 "pushType": "PROMO"
19 }
20 }
21 }
Parameter |
Required |
Data type |
Description |
|---|---|---|---|
login |
yes |
string |
Partner’s name in the system. |
password |
yes |
string |
Partner’s password in the system. |
extraParam |
no |
string |
Additional parameters passed as
More details
The comma character cannot be included in the parameter name,
but it can be included in its value — in this case it must be doubled
Example: the string
|
useTimeDiff |
no |
boolean |
Taking into account the time zone when starting messaging. More details
If
If
Default value: |
scheduleInfo |
no |
object |
Messaging schedule. More detailsIf not specified, it is sent immediately upon receipt of the request. |
scheduleInfo/
timeBegin
|
no |
string |
Start time. More details
Example |
scheduleInfo/
timeEnd
|
no |
string |
End time. More details
Example |
scheduleInfo/
weekdaysSchedule
|
no |
string |
Messaging days. More details
Specified by numbers from If there are no restrictions on days of the week, this parameter can be empty or not delivered in the request. |
scheduleInfo/
deadline
|
no |
string |
End date of the messaging. More details
Example: |
id |
no |
string |
Partner-side unique ID. More detailsThis parameter is required to control re-sending and duplication. The control service is enabled separately. The Partner may recall the Service Provider (the request to send a message) with the same ID several times. In this case the message will be sent to the subscriber only once (upon the first request). In response to requests, the Service Provider will return the same message ID in the Service Provider’s system to the Partner (the same as for the first request). The Service Provider optionally returns this ID to the Partner, if available in the message delivery report. |
destAddr |
no |
string |
Subscriber’s phone number. More detailsIt contains the country code, operator code and phone number.
For the Russian Federation, the code can be
Examples: |
message |
yes |
object |
Parameters of a message being sent. |
message/type |
yes |
enum |
Message type. More details
The value of |
message/data |
yes |
object |
Parameters of the data being sent. |
message/data/ttl |
yes |
integer |
Message lifetime. More detailsAcceptable range in seconds: from 30 to 86400. Note If If |
message/data/
ttlUnit
|
no |
enum |
Unit of measurement of the message delivery period. More details
It is transmitted only with Possible values are:
|
message/data/
serviceNumber
|
yes |
string |
Service name from which the message is being sent. More detailsThis parameter is optional for messages with the CardsMobile type. If this parameter is not sent in the request, the value is taken from the integration settings.
Also, if there is no value for this parameter in the settings,
the service name |
message/data/
text
|
yes |
string |
Text of the message being sent. More detailsNumber of characters is no more than 150. |
message/data/
title
|
yes |
string |
Header for the text message. More detailsNumber of characters is no more than 50. |
message/data/
target
|
no |
enum |
Text constant for the CardsMobile messages. More detailsDefines the screen of the application to which the transition should be made when clicking on the message. Possible values are:
Default value: |
message/data/
campaignId
|
yes |
string |
Text identifier of the promotion for the transition. More details
If The promotion ID is indicated in the partner's system or in the partner's Personal Account in the «Wallet for Business». Number of characters is no more than 128. |
message/data/
pushType
|
no |
enum |
Text constant for CardsMobile messages. More detailsIt determines the traffic type assigned to the message by the partner. Possible values are:
|
message/data/
content
|
no |
object |
Parameters for sending images. |
message/data/
content/
contentCategory
|
no |
enum |
Content category by the contentUrl link. More details
Possible value is: |
message/data/
content/contentUrl
|
no |
string |
URL of the image. More detailsThe maximum length of links is 512 characters. Image requirements:
|
registeredDelivery |
no |
integer |
Requirement for delivery reports. More detailsPossible values are:
|
notifyUrl |
no |
string |
Hostname of the incoming API to recieve the delivery report (see Delivery Status Service). More detailsThis parameter is optional in the request, but if sent you should consider the following:
If any of the specified conditions are not met, an error will be generated and the request will not be executed. |
Response to the Request#
After sending a message, the Service Provider returns a response synchronously. In case of successful sending, the Service Provider returns 200 OK HTTP code.
Response upon Successful Sending#
1 {
2 "mtNum": "7390612217"
3 "id": "8770599"
4 }
Parameter |
Data type |
Description |
|---|---|---|
mtNum |
string |
Sending chain ID assigned by the Service Provider platform. |
id |
string |
Partner-side unique ID. Available, if it was included when sending. |
Sending Errors#
For results with errors, a response HTTP code will differ from 200 (see Error Codes).
1 {
2 "error": {
3 "code": 1,
4 "description": "Service is unavailable"
5 }
6 }
Parameter |
Data type |
Description |
|---|---|---|
error |
object |
Error information. |
error/code |
int |
Error code. |
error/description |
string |
A brief description of the error. |
extendedDescription |
string |
Detailed description of the error (optional parameter). |
Error Codes#
Code |
Description |
HTTP-code |
|---|---|---|
1 |
Service is unavailable |
503 |
2 |
Invalid IP-address |
403 |
3 |
Too many connections |
429 |
4 |
Invalid request |
400 |
5 |
Invalid login |
401 |
6 |
Invalid password |
401 |
7 |
serviceNumber is not defined |
400 |
8 |
destAddr is not correct |
406 |
9 |
Message type is not correct |
406 |
10 |
Prohibited sending duplicates |
409 |
11 |
Invalid TTL |
406 |
100 |
100 |
500 |
CardsMobile Delivery Statuses#
To receive CardsMobile message statuses, you need to set up the Delivery Status Service.
Delivery Error Codes#
Delivery error codes for each message type are provided in the corresponding tab of the Description of Error Codes (parameter status=5) section.