Retrieve Balance History
Returns a paginated list of balance history objects related to the current authenticated account. The list is sorted, with the most recent entries appearing first by default.
Parameters
| Parameter | Type | Description |
|---|---|---|
sort_field | enum optional | Field you want to sort by. Possible values: amount, causer_type. |
sort_order | string optional | Sorting order, can either be asc or desc. |
limit | integer optional | Limit query result (when working with pagination). |
filters | array optional | An array of filter criteria where each entry has the following keys. |
filters[].field | enum | Field you want to filter by. Possible values: id, amount, causer_type. |
filters[].value | string | The value to compare by. |
filters[].operator | string | Comparison operator (=: default, !=, >, <, =>, <=, is, is_not, in). |
Returns
Returns a paginated collection of balance history objects. If no entries are found, returns an empty collection.
Request
Endpoint: https://api.youcanpay.com/account/balance-historyMethod: GET
bash
$ curl --location --request GET 'https://api.youcanpay.com/account/balance-history' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'Response
json
{
"data": [
{
"id": "70a5e31c-8b00-4fbd-bc0c-1736c6e5304a",
"account_id": "4ad60bd6-52fa-46cc-ab67-e729fd166922",
"display_amount": "-5,00 MAD",
"causer_type": 3,
"causer_id": "0ff1ca3b-4e50-4056-88d4-b0f822c38376",
"causer_type_text": "transfer"
},
{...}
],
"meta": {...}
}