Get summary
Get summary for desired from
- to
timespan.
GET /me/summary
Required scope:
- entries:r
- budgets:r
- accounts:r
Parameters
from * required string
|
Used to define date range, in YYYY-MM-DD format. To filter by date both from and to must be set. Format:date |
to * required string
|
Used to define date range, in YYYY-MM-DD format. To filter by date both from and to must be set. Format:date |
currency optional string
|
Currency the returned amounts are to be calculated in. Regex:[A-Z0-9_]{2,10} |
accounts optional string
|
A comma separated list of account ids. Used to filter summary information to the specificied accounts. |
categories optional string
|
A comma separated list of category ids. When used only information about entries in the specified categories will be returned. |
!categories optional string
|
A comma separated list of category ids. When used only information about entries not in the specified categories will be returned. |
tags optional string
|
A comma separated list of tag ids. When used only information about entries with the specified tags will be returned. |
!tags optional string
|
A comma separated list of tag ids. When used only information about entries without the specified tags will be returned. |
locations optional string
|
A comma separated list of location ids. If used only information for entries entered at the specified locations are returned. |
!locations optional string
|
A comma separated list of location ids. If used only information for entries not entered at the specified locations are returned. |
search optional string
|
Used for search. |
* denotes required field/parameter.
Request
$ curl https://api.toshl.com/me/summary?from=2014-01-01&to=2014-01-31 \ -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl"
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"from": "2014-01-01",
"to": "2014-01-31",
"expenses": {
"sum": 1540,
"count": 23,
"daily_median": 50.4
},
"incomes": {
"sum": 2300,
"count": 1,
"daily_median": 2000
},
"budget": {
"id": "42",
"amount": 1540,
"limit": 1800
},
"left": 260
}