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 user has a Foursquare account hooked up to Toshl, the returned locations are tailored to the user.

If longitude and latitude are not specified the locations are returned ordered by amount spent.

In order for the user to check-in or add a new location, the user must have Foursquare hooked up with Toshl. If your try to checkin/add a location a user whitout a valid hook a 403 Forbidden error is returned along with an error message.

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.

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.

transient_created
readonly
string

Specifies when the transient data was created in UTC time.

transient_valid_till
readonly
string

Specifies till when the transient data is valid in user’s timezone.

used
readonly
boolean

Is location used on entries.

* denotes required field/parameter.