apiId. If your account has a list of allowed IP addresses, the call must come from one of them.campaigns holds one entry for each channel.providerType is Whatsapp, Viber or SMS. Use each at most once.cascadingPriorityLevel sets the order: the lowest number is tried first. If SMS is one of the channels, it must be the last.Whatsapp and Viber need templateId, the id of one of your approved templates, and senderId. Give the values of a WhatsApp template's variables in whatsAppTemplateParams.SMS needs message, senderId and ratePlanId (from POST /api/RatePlans).campaignContacts, or name saved contact lists in contactListIds, or both. phoneNumber is + followed by digits, for example +37491234567. One wrong number refuses the whole request.failed.scheduleDate out to send now: sending starts within a few minutes. To send later, give scheduleDate as local clock time together with timezone (the UTC offset in hours) and timezoneId; all three are needed.data[0].ids holds one campaign id for each channel, in the order they are tried. Use an id to read the result of that channel: POST /api/partners/viber-data-records/list for Viber, GET /api/partners/whatsapp-campaigns for WhatsApp, POST /api/partners/SmsDataRecords for SMS (filter campaignId).SMS provider type must be last option in cascading campaign, Cascading campaigns provider types must be different, Rate plan is required, Not valid contacts provided, Invalid phone number or Timezone and Timezone ID is required. Nothing is sent.curl --location 'https://api.veloconnect.me/api/partners/campaigns/cascading' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "Order ready",
"campaignContacts": [
{
"phoneNumber": "+37491234567",
"firstName": "Anna",
"lastName": "Petrosyan"
},
{
"phoneNumber": "+37499123456",
"firstName": "Davit",
"lastName": "Sargsyan"
}
],
"campaigns": [
{
"providerType": "Whatsapp",
"cascadingPriorityLevel": 1,
"communicationType": "Trasnsactional",
"templateId": 318,
"senderId": 57,
"whatsAppTemplateParams": {
"name": "Example LLC",
"date": "9 October at 10:30"
}
},
{
"providerType": "Viber",
"cascadingPriorityLevel": 2,
"communicationType": "Trasnsactional",
"templateId": 214,
"senderId": 61
},
{
"providerType": "SMS",
"cascadingPriorityLevel": 3,
"communicationType": "Trasnsactional",
"message": "Your order is ready for pickup. MyBrand",
"senderId": 124,
"ratePlanId": 18
}
]
}'{
"data": [
{
"succeeded": true,
"ids": [
20431,
20432,
20433
],
"strIds": null,
"errors": null
}
]
}