Location

Get Location List

This API retrieves a list of locations, including the location ID, location name, organization ID, coordinates, and timezone. You can also filter the results by specifying an organization ID.

Endpoint: GET /locations

Query Parameters:

Example Request:

GET /locations?organization_id=1&offset=0&limit=10

Example Response:

[
    {
      "id": 1,
      "name": "Location 1",
      "timezone": "America/New_York",
      "organization_id": 1,
      "coordinates": {
        "latitude": 40.712776,
        "longitude": -74.005974
      }
    },
    {
      "id": 2,
      "name": "Location 2",
      "timezone": "America/Los_Angeles",
      "organization_id": 1
      "coordinates": {
        "latitude": 37.774929,
        "longitude": -122.419418
      }
    }
]

Response Fields:


Get Location Details

This API retrieves the details of a specific location by location ID, including location name, organization ID, coordinates, timezone.

Endpoint: GET /locations/:location_id

Path Parameters:

Example Request:

GET /locations/1

Example Response:

{
  "id": 1,
  "name": "Location 1",
  "timezone": "America/New_York",
  "organization_id": 1,
  "coordinates": {
    "latitude": 40.712776,
    "longitude": -74.005974
  }  
}

Response Fields: