Toshl Developer

List daily entry sums

Get daily entry sums.

GET /entries/sums

Required scope:

Parameters

page
optional
integer

Page to display, used for pagination.

Minimum: >= 0
Default value: 0
per_page
optional
integer

Number of resource objects to return.

Minimum: >= 10
Maximum: =< 500
Default value: 200
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 *
required
string

Currency the sums are to be calculated in.

Regex: [A-Z0-9_]{2,10}
accounts
optional
string

A comma separated list of account ids. If used only sums for entries from the specified accounts are returned.

categories
optional
string

A comma separated list of category ids. If used only sums for entries in the specified categories are returned.

!categories
optional
string

A comma separated list of category ids. If used only sums for entries not in the specified categories are returned.

tags
optional
string

A comma separated list of tag ids. If used only sums for entries with the specified tags are returned.

!tags
optional
string

A comma separated list of tag ids. If used only sums for entries without the specified tags are returned.

locations
optional
string

A comma separated list of location ids. If used only sums for entries entered at the specified locations are returned.

!locations
optional
string

A comma separated list of location ids. If used sums for entries not entered at the specified locations are returned.

search
optional
string

Used to search entries.

since
optional
string

Return all sums that were modified since timestamp.

Format: date-time
range
optional
string

Sum range. If set sums will be calculated for the defined range (day, week, month).

Possible values: day, week, month
Default value: day
type
optional
string

Entry types to sum

Possible values: expense, income

* denotes required field/parameter.

Request

$ curl https://api.toshl.com/entries/sums \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl"

Response

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "day": "2013-01-02",
    "expenses": {
      "sum": 15.30,
      "count": 2,
    },
    "modified": "2012-09-04T13:55:15Z"
  }
]