Toshl Developer

Add location

Create a new location. If venue id not given, Foursquare location is also created

Some related data is updated asynchronously. Clients can set an additional query parameter immediate_update which dictates that those values should be updated immediately in current request. Such a request may take longer to complete.

Clients can set an additional GET parameter next which dictates to which url the client should get redirected after the create process.

POST /entries/locations

Required scope:

Parameters

venue_id
optional
string

Foursquare venue id.

name
required
string

Location name

address
optional
string

Location address. Required if venue_id not available

latitude
required
number

Latitude.

longitude
required
number

Longitude.

Request

$ curl https://api.toshl.com/entries/locations/checkin \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"name": "Blue Marble Ice Cream", "latitude": 40.70136599888968, "longitude": -73.99794101715088}'

Response

HTTP/1.1 201 Created
Location: https://api.toshl.com/entries/locations/43