Geofences
Read Geofences
Returns all geofences that belong to the authenticated organization.
Endpoint
GET
/geofences
When to Use
Use this endpoint when loading geofence layers for map views or geofence selection 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/geofences \
--header 'x-api-key: <api_key>'
Example Response
Successful response (200 OK):
{
"statusCode": 200,
"result": [
{
"id": 12,
"name": "Warehouse Zone",
"description": "Main operational area",
"color": "#00AAFF",
"coordinates": [
[106.8, -6.2],
[106.81, -6.2],
[106.81, -6.21],
[106.8, -6.21]
],
"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.
| Field | Type | Description |
|---|---|---|
id | number | Geofence ID. |
name | string | Geofence name. |
description | string | Geofence description. |
color | string | Display color (hex or configured color value). |
coordinates | array of coordinate pairs | Polygon points where each item is [longitude, latitude]. |
created_at | string (ISO 8601 datetime) | Record creation timestamp. |
updated_at | string (ISO 8601 datetime) | Last update timestamp. |
Error Responses
Main Error Responses
| HTTP Status | Example errorCode | When It Happens |
|---|---|---|
| 401 | ERR999 | API key is missing, invalid, or expired. |
| 400 | PUBLIC.400_xxx | The request format or parameter values are invalid. |
Other Error Responses
| HTTP Status | errorCode | When It Happens |
|---|---|---|
| 429 | ERR999 | Too many requests for the current organization throttle window. |
Notes
Coordinates are returned as stored geofence polygon points.