PUT Update a location
Update a specific location
You can update any of the params in a location by calling this endpoint. Only the params you send are changed. A successful update returns 204 No Content with an empty body.
Endpoint
PUT https://api.timekit.io/v2/locations/:id
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
name |
body | string | name of the location | ||
description |
body | string | description of the given location | ||
latitude |
body | float | latitude of the location | ||
longitude |
body | float | longitude of the location | ||
projects |
body | array_string | list of project ids for this location. Replaces the existing list (see the warning above) | ||
meta |
body | object | false | key value pair meta you want to attach to this location. Replaces the existing meta | |
id |
path | string |
Request examples
curlcurl --request PUT \
--url https://api.timekit.io/v2/locations/9632b315-7400-4059-8aed-1e3a1960355f?include=projects \
--header 'Content-Type: application/json' \
--user :test_api_key_nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW \
--data '{
"name": "Toronto",
"description": "Whatever works best for you!!",
"latitude": 42.50798000,
"longitude": 1.52480000,
"projects": ["1e1ea71e-5908-45d0-8099-bf7afadc59dd"],
"meta": {
"city": "Toronto"
}
}'