Update Location settings
PUT
/api/v1/location
const url = 'https://example.com/api/v1/location';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true,"position":{"latitude":1,"longitude":1},"record_places_on_logs":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/location \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "position": { "latitude": 1, "longitude": 1 }, "record_places_on_logs": true }'Set Location on or off and choose whether Log entries record matching Saved places. You can also set a position. Turning Location off clears the stored position. The response returns the saved settings. Route: /api/v1/location. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Media typeapplication/json
object
enabled
required
boolean
position
record_places_on_logs
required
boolean
timezone
The confirmed User zone used when a request has no zone header.
string | null
Examplegenerated
{ "enabled": true, "position": { "approximate": true, "latitude": 1, "longitude": 1 }, "record_places_on_logs": true, "timezone": "example"}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}