​Запрос на загрузку статистики
Подробная статистика сообщений
Загруженные данные хранятся на сервере в течение одного месяца с даты создания запроса. Один клиент может иметь только 5 запрошенных загрузок на сервере. Чтобы создать шестую, предыдущую необходимо удалить с помощью отдельного метода. В запросе на генерацию загрузки строка с null равна неопределенному параметру и наоборот.
Для загрузки статистики сделайте запрос по этому URL:
POST https://api.notificore.ru/rest/stat/create
Тело запросаПередается один из следующих обязательных параметров:
  • message_id – установлено значение "message_id". Если это значение установлено, все последующие поля игнорируются, даже если там указаны данные. Массив. Максимум 300 значений в массиве. Если указан пустой массив, или если есть параметр, но ключ не является массивом, то параметр игнорируется.
ИЛИ временной диапазон:
  • time_in_from – дата и время, когда сообщения были получены на платформе.
  • time_in_to – дата и время, когда сообщения были получены на платформе.
Передача необязательных параметров
ParameterTypeDescription
msisdnAn array of values to specify numbers. If an empty array is specified, or if there is a parameter, but the key is not an array, then the parameter is ignored.
originatorstringSender name.
source_typestringThe message source from where the message came to the platform. Can take one of the following values: api, web, smpp, xml, http, json.
message_typestringMessage type. Can take one of the following values: sms, hlr, viber.
time_sent_fromTime of sending messages from the platform “from”.
time_sent_toTime of sending messages from the platform “to”.
country_namestringThe name of the country for search.
operator_idIndication of the country operator, if the Country_name field is present. If an operator without a country is specified, it is ignored.
statusstringThe status of the messages to display. Can take one of the following values: Delivered, Rejected, Scheduled, Moderation, Accepted, Sending, Sent, Expired, Failed, Undelivered, Unknown, Read, not-viber-user.
sl_clicksIt is necessary to consider the number of clicks or not. The field is available only to the clients who have enabled Short URL service.
sl_clicks_compstringComparison operator with the clicks count value. Can take one of the following values: “<”, “>”, “=”. The field is available only to the clients who have enabled Short URL service.
sl_clicks_countThe value to compare. Upper character limit – 999999. The field is available only to the clients who have enabled Short URL service.
Если запрос успешен, вы получите ответ:
{
   "error":0,
   "key": {}
}