Get total spending with filtration
This endpoint allows you to get total spending value by transaction history (so it ignores spending for calls and sms).
Endpoint supports filtration, so you can specify which transactions you want to be considered.
As this endpoint calculates spending data, transactions with types incoming_transfer and deposit are ignored. Also, only transaction with status done are considered.
Query Parameters
Optional parameter. Allows to filter out transactions with amount greater than given value.
0 <= valueOptional parameter. Allows to filter out transactions with amount less than given value.
0 <= valueTime 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 that allows to search transactions by comment value. The search operation is partial.
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.
"_default" | "id" | "status" | "type" | "amount" | "balance_after" | "comment" | "created_at"Ordering parameter. Defines the order of sorting (asc or desc). If parameter is not provided, will be used entity's default ordering.
"asc" | "desc"Accepts a list of transaction statuses to filter by. If the list is empty – this filter will be ignored.
"undefined" | "pending" | "done" | "rejected" | "refunded"Accepts a list of transaction types to filter by. If the list is empty – this filter will be ignored.
Header Parameters
Your API token
Response Body
application/json
application/json
application/json
curl -X GET "https://dev-refactor-api-e.voipenv.uk/api/v1/payments/transactions/total" \ -H "Authorization: string"{
"code": 0,
"data": {
"total_spending": 0
},
"error_details": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"message": "string",
"request_id": "string",
"status": "ok"
}{
"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"
}