> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jitra.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Read Geofences

> Returns all polygon Geofences available to the authenticated Organization.



## OpenAPI

````yaml openapi.json GET /geofences
openapi: 3.0.3
info:
  title: Jitra Public API
  version: 1.0.0
  description: >-
    Read-only integration API for organization fleet data: tracked objects, live
    and historical positions, geofences, routes, and sites.


    ## Authentication

    All endpoints except the health ping require an organization API key. Send
    it with either:

    - `x-api-key: <api_key>`

    - `Authorization: Bearer <api_key>`


    Missing, invalid, or expired keys return HTTP `401`.


    ## Versioning

    URI versioning is enabled. The current version is `v1`. The global prefix is
    `public`, so every resource lives under `/public/v1`.


    ## Rate limits

    Requests are throttled per organization:

    - Window: 10 seconds

    - Limit: 10 requests per window


    Exceeding the throttle returns HTTP `429`.


    Position endpoints also enforce a daily per-object API usage quota from the
    organization subscription (`INTEGRATION_API_DAILY`). When the quota is
    exhausted the API returns HTTP `400` with `errorCode` `PUBLIC.400_005`.
    Inactive or suspended subscriptions return HTTP `403` with `errorCode`
    `SUBSCRIPTION.403_002`.


    ## Response envelope

    Successful JSON responses use:

    ```json

    { "statusCode": 200, "result": {} }

    ```

    `result` is an object or an array depending on the endpoint.


    Error responses use:

    ```json

    {
      "statusCode": 400,
      "errorCode": "PUBLIC.400_001",
      "message": "Validation error message",
      "timestamp": "2026-05-17T01:00:00.000Z"
    }

    ```


    Datetime values are ISO 8601 UTC timestamps.
  contact:
    name: Jitra
    url: https://jitra.app
servers:
  - url: https://api.jitra.app/public/v1
    description: Production
  - url: '{scheme}://{host}:{port}/public/v1'
    description: Local or custom environment
    variables:
      scheme:
        default: http
        enum:
          - http
          - https
      host:
        default: localhost
      port:
        default: '3000'
        description: Value of PUBLIC_APP_PORT
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Health
    description: Service availability check. Does not require an API key.
  - name: Objects
    description: >-
      Tracked vehicles/assets (objects) belonging to the authenticated
      organization, including catalog, detail snapshot, and historical
      positions.
  - name: Positions
    description: Latest realtime GPS positions for one or more objects.
  - name: Geofences
    description: Geographic zones defined as polygons for the authenticated organization.
  - name: Routes
    description: >-
      Planned routes with waypoints and geometry for the authenticated
      organization.
  - name: Sites
    description: Point-of-interest sites with radius for the authenticated organization.
paths:
  /geofences:
    get:
      tags:
        - Geofences
      summary: List geofences
      description: >-
        Returns all geofences for the authenticated organization, including
        polygon coordinates. Use this to load geofence layers on maps or
        geofence selection lists.
      operationId: listGeofences
      responses:
        '200':
          description: Geofence list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeofenceListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    GeofenceListResponse:
      type: object
      required:
        - statusCode
        - result
      properties:
        statusCode:
          type: integer
          example: 200
        result:
          type: array
          items:
            $ref: '#/components/schemas/GeofencePublic'
    GeofencePublic:
      type: object
      description: Geofence polygon belonging to the organization.
      properties:
        id:
          type: integer
          description: Geofence ID.
          example: 12
        name:
          type: string
          description: Geofence name.
          example: Warehouse Zone
        description:
          type: string
          description: Geofence description.
          example: Main operational area
        color:
          type: string
          description: Display color (hex).
          example: '#00AAFF'
        coordinates:
          type: array
          description: Polygon vertices as `[longitude, latitude]` pairs.
          items:
            $ref: '#/components/schemas/CoordinatePair'
        created_at:
          type: string
          format: date-time
          description: Record creation timestamp.
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp.
    ErrorResponse:
      type: object
      description: Standard public API error envelope.
      required:
        - statusCode
        - errorCode
        - message
        - timestamp
      properties:
        statusCode:
          type: integer
          description: HTTP status code.
          example: 400
        errorCode:
          type: string
          description: >-
            Machine-readable error code. Public-specific codes use the
            `PUBLIC.*` prefix. Uncoded HTTP exceptions default to `ERR999`.
          example: PUBLIC.400_001
        message:
          type: string
          description: Localized human-readable message.
          example: Enter From Time, because is required.
        timestamp:
          type: string
          format: date-time
          description: Error time in ISO 8601 UTC.
    CoordinatePair:
      type: array
      description: Geographic coordinate as `[longitude, latitude]`.
      minItems: 2
      maxItems: 2
      items:
        type: number
      example:
        - 106.8
        - -6.2
  responses:
    Unauthorized:
      description: API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 401
            errorCode: ERR999
            message: Unauthorized
            timestamp: '2026-05-17T01:00:00.000Z'
    TooManyRequests:
      description: Organization exceeded 10 requests in a 10-second window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 429
            errorCode: ERR999
            message: 'ThrottlerException: Too Many Requests'
            timestamp: '2026-05-17T01:00:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Organization API key issued from Jitra (Organization → API Key).
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Same organization API key sent as `Authorization: Bearer <api_key>`.'

````