Sites

Read Sites

Returns all sites with location and radius information.

Endpoint

GET /sites

When to Use

Use this endpoint when loading site markers, geospatial references, or destination lists.

Authentication

This endpoint requires an API key. Send either x-api-key: <api_key> or Authorization: Bearer <api_key>.
Requests are rate-limited per organization.

Example Request

curl --request GET \
  --url https://api.jitra.app/public/v1/sites \
  --header 'x-api-key: <api_key>'

Example Response

Successful response (200 OK):

{
  "statusCode": 200,
  "result": [
    {
      "id": 44,
      "name": "Main Depot",
      "description": "Primary depot area",
      "latitude": -6.2,
      "longitude": 106.8,
      "radius": 120,
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-01-10T00:00:00.000Z"
    }
  ]
}

Response Fields

All fields below are taken from each object inside result.

FieldTypeDescription
idnumberSite ID.
namestringSite name.
descriptionstringSite description.
latitudenumberSite latitude.
longitudenumberSite longitude.
radiusnumberSite radius value.
created_atstring (ISO 8601 datetime)Record creation timestamp.
updated_atstring (ISO 8601 datetime)Last update timestamp.

Error Responses

Main Error Responses

HTTP StatusExample errorCodeWhen It Happens
401ERR999API key is missing, invalid, or expired.
400PUBLIC.400_xxxThe request format or parameter values are invalid.

Other Error Responses

HTTP StatuserrorCodeWhen It Happens
429ERR999Too many requests for the current organization throttle window.

Notes

radius is returned as stored by the site service.