SET API · Analytics
Counts and amounts by state
GET/v1/analytics/states
Counts and amounts per type, state and currency for the window, with each row's direction. Types: deposit, cash_out_payment, conversion_payment, card_payment, wallet_withdrawal, payout and refund.
Query parameters
sincestring- A UTC date,
YYYY-MM-DD: the first day counted. With neithersincenoruntil, the window is the last 30 days ending tomorrow at 00:00 UTC. untilstring- A UTC date,
YYYY-MM-DD, exclusive. It must be aftersinceand at most 366 days later.
Notes
- Needs the
readscope (403 scope_missingwithout it). Any account type; no deployment switch. - A window longer than 366 days answers
400 window_too_long; a malformed date, or anuntilthat is not aftersince, answers400 window_invalid. - Rows are sorted by type, state and currency.
- It takes no
intervalorgroupBy. - The example was made with a sandbox key on a platform account.
- This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
400 window_invalid400 window_too_long403 scope_missing