Developer Docs

Table of contents

Request to download statistics

Request URL

GET https://api.bsg.world/rest/stat/create

Request body

1. One of the following mandatory parameters is passed:

  • message_id – set to “message_id”. If this value is set, all subsequent fields are ignored, even if data is specified there. Array. 300 values in an array maximum. If an empty array is specified, or if there is a parameter, but the key is not an array, then the parameter is ignored.

OR a time span:

  • time_in_from — date and time when messages were received on the platform.
  • time_in_to — date and time when messages were received on the platform.

2. Optional parameters are passed:

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 the following values: sms, hlr, viber.
time_sent_fromTime of sending messages from the platform “from”.
time_sent_toThe time when messages were sent from the platform “until”.
country_namestringThe name of the country to 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 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 clients who have connected short links.
sl_clicks_compComparison operator with the number of clicks value. Can take values: “<”, “>”, “=”. The field is available only to clients who have connected short links.
sl_clicks_countThe value to compare. The upper character limit is 999999. The field is available only to clients who have connected short links.

Response Example

Response in the case of successful request:

{
"error":0,
"key": {}
}

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.