To main content
Переслать с SMS
Создает новый объект сообщения. Notificore пересылает созданные объекты сообщений с каждым запросом. По запросу может быть введено до 50 телефонов.
ПРИМЕЧАНИЕ: тело SMS должно быть добавлено в хэш опций Viber.
Параметры
ПараметрВидОписание
originatorstringThe sender of the SMS message.
textstringThe body of the SMS message.
ЗНАЧЕНИЯ
PUT (POST) https://api.notificore.ru/rest/viber/create
ВОЗВРАТ
Возвращает объект сообщения, если запрос был успешным. Если запрос не удался, возвращается отчет об ошибке.
Пример запроса
{ “tariff”:”0″,
    “validity”:”1″,
    “messages”:[
    {
    “to”:[
    {
    “msisdn”:”380972920000″,
    “reference”:”ext_id_19″
    }
    ],
    “text”:”My Viber messages is shinier than your SMS messages”,
    “alpha_name”:”Notificore”,
    “is_promotional”:false,
    “options”:{
    “viber”:{
    “img”:”http://mysite.com/logo.png”,
    “caption”:”See Details”,
    “action”:”http://mysite.com/”,
    “alt_route”: {
    “originator”:”Notificore”,
    “text”: “SMS message will be received if you not a VIBER user.”
    }
    }
    }
    }
    ]
    }
Пример ответа
{ “result”:[
    {
    “error”:0,
    “errorDescription”:”No errors”,
    “reference”:”ext_id_19″,
    “id”:”217″,
    “price”:0.23,
    “currency”:”EUR”
    }
    ],
    “currency”:”EUR”,
    “total_price”:0.23
    }
В случае ошибки
{ “result”:[
    {
    “error”:43,
    “errorDescription”:”External ID already exists”,
    “reference”:”ext_id_19″
    }
    ]
    }
Посмотреть статус

Получает информацию о существующем сообщении. Это может быть отправленное или полученное сообщение. Вам необходимо указать ID сообщения, который вернулся при создании или получении.

ПараметрВидОписание
idintAn unique random ID which is created on the Notificore platform and is returned upon creation of the object.
referencestringA client reference
Атрибуты
АтрибутВидОписание
idintAn unique random ID which is created on the Notificore platform and is returned upon creation of the object.
msisdnstringThe telephone number.
referencestringA client reference.
time_indatetimeThe date and time of the creation of the message
time_sentdatetimeThe scheduled date and time of the message.
time_drdatetimeThe date and time of the creation of the message.
statusstringPossible values: scheduled, sent, delivered, read, expired, undeliverable, rejected, unknown.
alt_routehashA hash with SMS message info
channelstringAllways SMS
idintAn unique random ID which is created on the Notificore platform and is returned upon creation of the object.
statusstringPossible values: scheduled, sent, delivered, read, expired, undeliverable, rejected, unknown.
Значение
GET https://api.notificore.ru/rest/viber/{id}
Пример ответа
{ “error”:0,
    “errorDescription”:”No errors”,
    “id”:”470093225″,
    “msisdn”:”380972920000″,
    “reference”:”ext_id_19″,
    “time_in”:”2017-01-17 09:20:02″,
    “time_sent”:”2017-01-17 09:20:02″,
    “time_dr”:”2017-01-17 09:20:02″,
    “status”:”undeliverable”,
    “price”:0.00,
    “currency”:”EUR”,
    “alt_route”:[{
    “channel”: “sms”,
    “id”: “470094225”,
    “status”: “delivered”,
    “price”=>”0.023”
    }]
    }
В случае ошибки:
{ “error”: 40,
    “errorDescription”:”Message not found”
    }