List locations
const url = 'https://safe-api.safetyradar.com/v2/locations';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://safe-api.safetyradar.com/v2/locations \ --header 'Authorization: Bearer <token>'Get all locations for the organization.
Not paginated: the response is up to 10,000 locations in one data array, and the endpoint takes no page or limit.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”List of locations
object
object
Names of the resource tags on the location, sorted. Single-location responses (GET by id, POST) also carry tags as { id, name } objects; tagNames is the same set as plain names.
Example
{ "data": [ { "status": "active", "type": "equipment", "tagNames": [ "Region North" ] } ]}Invalid request: a parameter or the body failed validation (validation_error), or the body is not valid JSON (invalid_json)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unauthorized
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Rate limit exceeded (rate_limit_exceeded)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unexpected server error (internal_error)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}
