Cascading Message Sending#
Cascading message sending is not available by default. To enable it, the Partner needs to contact his supervising manager.
The service supports the following types of cascading message:
FLASHINGCALL (VOICECODE);
PUSH;
SMS;
TELEGRAM;
TGCODE;
VIBER;
VK;
WHATSAPP.
When sending it can be any sequence of message types.
The message is resent in case of receiving a status indicating that the message was not successfully sent (if no DELIVERED or READ statuses of the state parameter are received).
Note
The default message lifetime is set when configuring the integration connection or transmitted in the ttl parameter when sending the message.
The lifetime for each message from the cascade chain is set separately.
Resending of the FLASHINGCALL (VOICECODE) type message is possible only for the DELIVERED status.
To receive reports on all types of messages when sending a cascading message chain you need to specify the value 1 in the registeredDelivery parameter.
Request Examples#
1 {
2 "login":"YOUR_LOGIN",
3 "password":"YOUR_PASSWORD",
4 "id":"8770631",
5 "destAddr":"Subscriber's_Number",
6 "message":{
7 "type":"PUSH",
8 "data":{
9 "title":"Push message header",
10 "text":"Notification text",
11 "serviceNumber":"SENDER'S_NAME",
12 "ttl":2
13 }
14 },
15 "cascadeChainLink": {
16 "state": "DELIVERED",
17 "message": {
18 "type": "SMS",
19 "data": {
20 "text": "Text of SMS to be resent",
21 "serviceNumber": "SMS_SENDER'S_NAME",
22 "ttl": 2
23 }
24 }
25 }
26 }
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "id": "8770100",
5 "destAddr": "Subscriber's_Number",
6 "message": {
7 "type": "VIBER",
8 "data": {
9 "instantContent": {
10 "type": "TEXT",
11 "data": {
12 "text": "VIBERMESS"
13 }
14 },
15 "serviceNumber": "SENDER'S_NAME",
16 "ttl": 1
17 }
18 },
19 "cascadeChainLink": {
20 "state": "READ",
21 "message": {
22 "type": "SMS",
23 "data": {
24 "text": "SMSMESS",
25 "serviceNumber": "SENDER'S_NAME",
26 "ttl": 1,
27 "ttlUnit": "HOURS"
28 }
29 }
30 }
31 }
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "destAddr": "Subscriber's_Number",
5 "message": {
6 "type": "FLASHINGCALL",
7 "data": {
8 "text": "1234",
9 "ttl": 1
10 }
11 },
12 "cascadeChainLink": {
13 "state": "DELIVERED",
14 "message": {
15 "type": "SMS",
16 "data": {
17 "text": "Text of SMS to be resent",
18 "serviceNumber": "SMS_SENDER'S_NAME",
19 "ttl": 2
20 }
21 }
22 }
23 }
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "useTimeDiff": true,
5 "id": "87706112",
6 "scheduleInfo": {
7 "timeBegin": "09:00",
8 "timeEnd": "21:00",
9 "weekdaysSchedule": "12345",
10 "deadline": "2024-12-31T16:29:30+0300"
11 },
12 "destAddr": "Subscriber's_Number",
13 "message": {
14 "type": "WHATSAPP",
15 "data": {
16 "instantContent": {
17 "type": "TEXT",
18 "data": {
19 "text": "WhatsApp message text"
20 }
21 },
22 "serviceNumber": "SENDER'S_NAME",
23 "ttl": 120,
24 "ttlUnit": "SECONDS"
25 }
26 },
27 "cascadeChainLink": {
28 "state": "DELIVERED",
29 "message": {
30 "type": "SMS",
31 "data": {
32 "text": "Text of SMS to be resent",
33 "serviceNumber": "SMS_SENDER'S_NAME",
34 "ttl": 10
35 }
36 }
37 }
38 }
A request for cascading message sending in a standard sending.
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "destAddr": "SUBSCRIBER'S_NUMBER",
5 "useTimeDiff": true,
6 "id": "superId",
7 "scheduleInfo":
8 {
9 "timeBegin": "10:00",
10 "timeEnd": "12:00",
11 "weekdaysSchedule": "123"
12 },
13 "message":
14 {
15 "type": "TELEGRAM",
16 "data":
17 {
18 "text": "Hello, world!",
19 "link": "https://docs.rapporto.ru/",
20 "serviceNumber": "SENDER'S_NAME",
21 "ttl": 3600,
22 "ttlUnit": "SECONDS"
23 }
24 },
25 "cascadeChainLink": {
26 "state": "DELIVERED",
27 "message": {
28 "type": "SMS",
29 "data": {
30 "text": "Hello, world! Follow link <https://docs.rapporto.ru>",
31 "serviceNumber": "SENDER'S_NAME",
32 "ttl": 1,
33 "ttlUnit": "MINUTES"
34 }
35 }
36 }
37 }
A request to send an authorization code to a subscriber via cascading message sending.
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "destAddr": "SUBSCRIBER'S_NUMBER",
5 "useTimeDiff": true,
6 "id": "superId",
7 "scheduleInfo": {
8 "timeBegin": "10:00",
9 "timeEnd": "12:00",
10 "weekdaysSchedule": "123"
11 },
12 "message": {
13 "type": "TGCODE",
14 "data": {
15 "text": "Your code: 12345.",
16 "serviceNumber": "SENDER'S_NAME",
17 "ttl": 120,
18 "ttlUnit": "SECONDS"
19 }
20 },
21 "cascadeChainLink": {
22 "state": "DELIVERED",
23 "message": {
24 "type": "SMS",
25 "data": {
26 "text": "Your code: 12345.",
27 "serviceNumber": "SENDER'S_NAME",
28 "ttl": 1,
29 "ttlUnit": "MINUTES"
30 }
31 }
32 }
33 }
1 {
2 "login": "YOUR_LOGIN",
3 "password": "YOUR_PASSWORD",
4 "useTimeDiff": false,
5 "id": "8770100",
6 "scheduleInfo": {
7 "timeBegin": "10:00",
8 "timeEnd": "21:00",
9 "weekdaysSchedule": "12345",
10 "deadline": "2029-12-31T16:29:30+0300"
11 },
12 "destAddr": "SENDER'S_NUMBER",
13 "message": {
14 "type": "VK",
15 "data": {
16 "text": "VK",
17 "serviceNumber": "SENDER'S_NAME",
18 "ttl": 1
19 }
20 },
21 "cascadeChainLink": {
22 "state": "DELIVERED",
23 "message": {
24 "type": "VIBER",
25 "data": {
26 "instantContent": {
27 "type": "TEXT",
28 "data": {
29 "text": "VIBER"
30 }
31 },
32 "serviceNumber": "SENDER'S_NAME",
33 "ttl": 1
34 }
35 },
36 "nextLink": {
37 "state": "DELIVERED",
38 "message": {
39 "type": "FLASHINGCALL",
40 "data": {
41 "text": "Your code is 2268",
42 "ttl": 1
43 }
44 },
45 "nextLink": {
46 "state": "DELIVERED",
47 "message": {
48 "type": "SMS",
49 "data": {
50 "text": "SMS",
51 "serviceNumber": "SENDER'S_NAME",
52 "ttl": 1
53 }
54 }
55 }
56 }
57 }
58 }
Request Parameters#
In order to send the chain of messages of various types, an additional block of CascadeChainLink parameters shall be transmitted in the request.
Parameter |
Required |
Type |
Description |
|---|---|---|---|
cascadeChainLink |
no |
object |
Cascading message parameters. |
{cascadeChainLink}
state
|
yes |
enum |
Status by which the message is resent. More detailsPossible values are:
|
{cascadeChainLink}
message
|
yes |
object |
Parameters of the message to be resent. More details
Similar to the |
{cascadeChainLink}
nextLink
|
no |
object |
Parameters of the next message to be resent in the chain. More details
Similar to the |