Developer Docs
To get message information, make a request to this URL:
GET https://api.bsg.world/rest/stat/file/id/{file_key}/format/{file_format} |
Parameter | Required | Type | Description |
file_key | Yes | integer | The name of the file is returned in the Request to download statistics method. |
file_format | Yes | integer | Valid options: json, xml, csv (only available when the message_type parameter is selected) |
{
"error": 0,
[
{
"message_ID": 1529112192,
"message_type": "sms",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "testsms",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered",
"body": "testing message"
},
{
"similar data for another message_ID
}
]
}
{
"error": 0,
[
{
"message_ID": 1529112192,
"message_type": "sms",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "testsms",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered",
"body": "testing message"
},
{
"message_ID": 1529112192,
"message_type": "hlr",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "HLR",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered"
"body": {
"Country_name": "Ukraine"
"Brand": "Kyivstar"
"Operator": "Kyivstar GSM JSC"
"MCC": 255
"MNC": 03
"Status": "Active"
"IMSI": 255039900000000
"Ported": 1
"Roaming": 0
}
}
]
}
In the case of message_type Viber, the response may include alternative SMS data. The data is the same as for a regular SMS report.
{
"error": 0,
"message_data": [
{
"message_ID": 1529112192,
"message_type": "sms",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "testsms",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered",
"body": "testing message"
},
{
"message_ID": 1529112193,
"message_type": "hlr",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "HLR",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered",
"body": {
"Country_name": "Ukraine",
"Brand": "Kyivstar",
"Operator": "Kyivstar GSM JSC",
"MCC": "255",
"MNC": "03",
"Status": "Active",
"IMSI": 255039900000000,
"Ported": 1,
"Roaming": 0
}
},
{
"message_ID": 1529112194,
"message_type": "viber",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "testsms",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "not-viber-user",
"body": "testing message",
"img": "https: //site.com/image.png",
"Caption": "BUY!",
"Action": "https: //site.com/buy.html",
"alternativeSMS": {
"message_ID": 1529112195,
"message_type": "sms",
"msisdn": 380505142320,
"Country_name": "Ukraine",
"brand_name": "Vodafone - VF Ukraine JSC",
"mcc": "255",
"mnc": "01",
"originator": "testsms",
"price": "0.0000000 EUR",
"Incoming date": "2020-10-22 17: 28: 45",
"Sending date": "2020-10-22 17: 28: 45",
"DLR Date": "2020-10-22 17: 28: 45",
"Status": "Delivered",
"body": "testing message for Viber undeliv"
}
}
]
}