Toshl Developer

List locations

Get all entry locations.

GET /entries/locations

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
since
optional
string

Return all locations that were modified since timestamp.

Format: date-time
from
optional
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
optional
string

Used to define date range, in YYYY-MM-DD format. To filter by date both from and to must be set.

Format: date
type
optional
string

Entry types to return

Possible values: expense, income
accounts
optional
string

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

categories
optional
string

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

!categories
optional
string

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

tags
optional
string

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

!tags
optional
string

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

latitude
optional
number

Latitude used to search Foursquare api for nearby locations. If used both latitude and longitude must be set.

longitude
optional
number

Longitude used to search Foursquare api for nearby locations. If used both latitude and longitude must be set.

near
optional
string

Used to search near a specific location (eg. Chicago, IL). If used longitude and latitude are ignored.

radius
optional
number

Limit results to venues within this many meters of the specified location. Can only be used together with longitude and latitude.

search
optional
string

Used to search locations.

include_unused
optional
boolean

Include unused locations.

* denotes required field/parameter.

Request

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

Response

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

[
  {
    "id": "42",
    "venue_id": "4c3a5ad83849c92880e0c2b1",
    "name": "Blue Marble Ice Cream",
    "address": "Brooklyn Bridge Park - Pier 1, Brooklyn",
    "latitude": 40.70136599888968,
    "longitude": -73.99794101715088,
    "expenses": {
      "sum": 45,
      "count": 3
    },
    "incomes": {
      "sum": 1200,
      "count": 1
    },
    "modified": "2012-09-04T13:55:15Z"
  }
]