Get customer's SMS statistics data
Fetch SMS statistics based on customer's sent SMS, filtrated by given parameters.
Statistics accumulates SMS and groups them based on given grouping parameters, collecting statistics data for time periods and/or countries. By default, grouping is done by date.
Returns data with pagination.
For SMS statistics, time period parameters filter by SMS created_at field, not by statistics date itself, so it can be used with country grouping.
Query Parameters
Determines, which countries should be included in the statistics. Accepts a list of country names. If the list is empty, this filtration will be ignored.
Determines what data should be used for statistics grouping. In provided an empty list, by default the date grouping will be used.
Optional field. Determines the size of time periods for date grouping. If date grouping is selected, and no value is provided for interval, by default the day interval will be used.
"hour" | "day" | "week" | "month"It is also possible to determine countries for filtration by their MCC codes. Accepts a list of integers. If the list is empty, this filtration will be ignored.
Pagination parameters. Accepts page number. Pagination starts on page=1. If parameter is not provided, the default value of 1 will be set.
Pagination parameter. Accepts the size of page for pagination. Minimal page size is 1. If parameter is not provided, the default value of 10 will be set.
Time period filter, determines the end of the period. Accepts string with time either as UNIX timestamp, or in format 2006-01-02T15:04:05Z07:00.
Time period filter, determines the start of the period. Accepts string with time either as UNIX timestamp, or in format 2006-01-02T15:04:05Z07:00.
Optional parameter. Allows to filter out only statistic entities with total price greater than provided value.
0 <= valueOptional parameter. Allows to filter out only statistic entities with total price less than provided value.
0 <= valueOrdering parameter. Defines by which field the data will be sorted. If parameter is not provided, will be used entity's default ordering. To use entity's default sorting, pass _default as value.
"country" | "date" | "sent" | "count" | "delivered" | "not_delivered" | "expired" | "pending" | "total_price" | "sent_to_delivered" | "delivery_rate_percent"Ordering parameter. Defines the order of sorting (asc or desc). If parameter is not provided, will be used entity's default ordering.
"asc" | "desc"Header Parameters
Your API token
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://dev-refactor-api-e.voipenv.uk/api/v1/sms/statistics" \ -H "Authorization: string"{
"data": [
{
"count": 0,
"country": "string",
"date": "string",
"delivered": 0,
"delivery_rate_percent": 0,
"expired": 0,
"mcc": 0,
"not_delivered": 0,
"pending": 0,
"total_price": 0
}
],
"page": 0,
"page_size": 0,
"total": 0,
"total_pages": 0
}{
"code": 0,
"error_details": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"message": "string",
"request_id": "string",
"status": "error"
}{
"code": 0,
"error_details": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"message": "string",
"request_id": "string",
"status": "error"
}{
"code": 0,
"error_details": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"message": "string",
"request_id": "string",
"status": "error"
}