delivery SMS JSON
Description
Delivery status
Usage
All requests has to be sent to URLs below.
In case of success, HTTP response code 200 is returned and message body contains response. In case of error, HTTP response error code is returned.
In case of success, HTTP response code 200 is returned and message body contains response. In case of error, HTTP response error code is returned.
Request
POST https://api.bsms.viamobile.sk/json/delivery
Request body
{
"username": "test",
"password": "test",
"deliveries":
[
{"id": 123},
{"id": 124},
{"id": 125}
]
}
Parameter | Required | Type | Description |
---|---|---|---|
username |
required | string(32) | user login |
password |
required | string(32) | user password |
id |
required | int64 | unique ID of sent MT SMS |
Response
{
"response":
{
"status": 200,
"delivery":
[
{
"id": 123,
"received": "2014-02-01 22:59:00",
"status": "delivered",
"operator": 23101,
"price": 0.03,
"parts": 1
},
{
"id": 124,
"received": "2014-02-01 22:59:00",
"status": "undeliverable",
"operator": 0,
"price": null,
"parts": 1
},
{
"id": 125,
"received": "2014-02-01 22:59:00",
"status": "waiting",
"operator": 23102,
"price": 0.06,
"parts": 2
}
]
}
}
Parameter | Type | Description |
---|---|---|
id |
int64 | unique ID of sent MT SMS |
received | timestamp | delivery report timestamp |
status | string(50) | delivered - message delivered, undeliverable - message not delivered, waiting - waiting for status, expired - message not delivered/expired |
operator | int32 | Operator code - 23101 Orange SK, 23102 Telekom SK, 23103 4rka SK, 23106 O2 SK, 23000 CZ, 0 others |
price | decimal | Message price (Message can be divided into several multipart SMSs). null, if price not configured. |
parts | int32 | Count of multipart SMSs. |
Error response
{
"response":
{
"status": 401,
"code": 1000,
"description": "Unauthorized"
}
}
Error codes
HTTP Code | Code | Description | Info |
---|---|---|---|
401 | 1000 | Unauthorized | unknown username or password |
500 | unknown error | unknown error - please contact Viamobile |