Developer Docs

Table of contents

Get message information

Request URL

GET https://api.bsg.world/rest/stat/file/id/{file_key}/format/{file_format}

Request parameters

ParameterRequiredTypeDescription
file_keyYesintegerThe name of the file is returned in the Request to download statistics method.
file_formatYesintegerValid options: json, xml, csv (only available when the message_type parameter is selected)

Example of a response in case of a successful request

SMS messages only:

{
    "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
        }
    ]
}

One of the messages is HLR:

{
    "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"
            }
        }
    ]
}

We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you’re agreeing to the collection of data as described in our Website Data Collection Policy.