Отправить сообщение
Создает новый объект сообщения. BSG присылает ID отправленных сообщений, после каждого оставленного запроса. Максиму 50 номер, обрабатываются за один запрос.
ОБЯЗАТЕЛЬНЫЕ ПАРАМЕТРЫ
The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. Required
The body of the SMS message. Required
The telephone number. Required
A client reference. Required
The array of recipients msisdn’s & reference’s. Required Set only for multiple message request («destination»: «phones»).
ДОПОЛНИТЕЛЬНЫЕ ПАРАМЕТРЫ
The amount of seconds that the message is valid.
Tariff code of a price grid.
ЗНАЧЕНИЯ
PUT (POST) https://app.bsg.hk/rest/sms/create
RETURNS
Returns a message object if the request was successful. If the request failed, an error object will be returned.
ПРИМЕР ЗАПРОСА(ОДНОСОСТАВНОЕ СООБЩЕНИЕ)
{ «destination»:»phone»,
«originator»:»alpha name»,
«body»:»message text»,
«msisdn»:»380972000000″,
«reference»:»ext_id_16″,
«validity»:»1″,
«tariff»:»0″
}
ПРИМЕР ОТВЕТА(ОДНОСОСТАВНОЕ СООБЩЕНИЕ)
{ «result»:{
«error»:0,
«errorDescription»:»No errors»,
«reference»:»ext_id_16″,
«id»:»213″,
«price»:0.23,
«currency»:»EUR»
}
}
ПРИМЕР ЗАПРОСА(МНОГОСОСТАВНОЕ СООБЩЕНИЕ)
{ «validity»:»1″,
«tariff»:»0″,
«destination»:»phones»,
«originator»:»alpha_name»,
«body»:»message text»,
«phones»:[
{
«msisdn»:»380972000000″,
«reference»:»ext_id_17″
},
{
«msisdn»:»380972000001″,
«reference»:»ext_id_18″
}
]
}
АТРИБУТЫ
An unique random ID which is created for multiple request.
ПРИМЕР ЗАПРОСА(МНОГОСОСТАВНОЕ СООБЩЕНИЕ)
{ «task_id»:»6″,
«result»:[
{
«error»:0,
«errorDescription»:»No errors»,
«reference»:»ext_id_17″,
«id»:»214″,
«price»:0.23,
«currency»:»EUR»
},
{
«error»:0,
«errorDescription»:»No errors»,
«reference»:»ext_id_18″,
«id»:»215″,
«price»:0.23,
«currency»:»EUR»
}
],
«total_price»:0.46,
«currency»:»EUR»
}