OTPStatistics

Export customer's SMS statistics to CSV file

Download customer's SMS statistics in CSV file. The endpoint supports filtration like GET /api/v1/sms/statistics, also the default values of grouping and interval fields are the same as in GET /api/v1/sms/statistics.

GET
/api/v1/sms/statistics/csv

Query Parameters

countries?array<string>

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.

group_by?array<>

Determines what data should be used for statistics grouping. In provided an empty list, by default the date grouping will be used.

interval?string

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.

Value in"hour" | "day" | "week" | "month"
mcc?array<integer>

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.

period_end?string

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.

period_start?string

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.

price_from?number

Optional parameter. Allows to filter out only statistic entities with total price greater than provided value.

Range0 <= value
price_to?number

Optional parameter. Allows to filter out only statistic entities with total price less than provided value.

Range0 <= value
sort_by?string

Ordering 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.

Value in"country" | "date" | "sent" | "count" | "delivered" | "not_delivered" | "expired" | "pending" | "total_price" | "sent_to_delivered" | "delivery_rate_percent"
sort_order?string

Ordering parameter. Defines the order of sorting (asc or desc). If parameter is not provided, will be used entity's default ordering.

Value in"asc" | "desc"

Header Parameters

Authorization*string

Your API token

Response Body

text/csv

text/csv

text/csv

text/csv

curl -X GET "https://dev-refactor-api-e.voipenv.uk/api/v1/sms/statistics/csv" \  -H "Authorization: string"
"string"
{
  "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"
}
Form Call To Action

Contact us

You can always send us a message or email. Weʼd be happy to help you out.