Toshl Developer

Locations

Locations endpoint returns a list where user spends her money. If latitude and longitude are specified Foursquare API is queried for nearby locations and locations are returned based on best match.

If longitude and latitude are not specified the locations are returned ordered by expense count.

Resource representation

{
  "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"
}

Properties

id
readonly
string

Location id.

venue_id
readonly
string

Foursquare venue id.

chain_id
readonly
string

Foursquare chain id. Can be used to group locations by chain.

name
readonly
string

Location name.

Max length: 255
address
readonly
string

Location address.

Max length: 255
city
readonly
string

Location city.

Max length: 100
latitude
readonly
number

Location latitude.

longitude
readonly
number

Location longitude.

expenses
readonly
object

Expenses entered at this location.

sum
readonly
number

Location expense sum

Minimum: >= 0
Maximum: < 1000000000000000
count
readonly
integer

Location expense count.

Minimum: >= 0
incomes
readonly
object

Incomes entered at this location.

sum
readonly
number

Location income sum

Minimum: >= 0
Maximum: < 1000000000000000
count
readonly
integer

Location income count.

Minimum: >= 0
visits
readonly
integer

Number of times the user has entered an entry at this location.

Minimum: >= 0
amount
readonly
number

Amount sum spent at this location.

Minimum: >= 0
Maximum: < 1000000000000000
modified
readonly
string

Specifies when the location was last modified.

used
readonly
boolean

Is location used on entries.

* denotes required field/parameter.