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

# List telemetry events

> Returns telemetry events scoped to the API key's org. Cursor-paginated on (event_date desc, id desc). For dense historical pulls, prefer narrow time ranges to keep latency low.



## OpenAPI

````yaml /openapi.json get /events
openapi: 3.1.0
info:
  title: United Logistics API
  version: 0.1.0
  description: >-
    Industry-grade public API for fleet, fuel, and toll operations. Every
    endpoint is scoped to the organization owning the API key. Authentication:
    bearer API key (`ulk_<prefix>_<secret>`). Rate limit: 60 requests/minute/key
    by default (override per key via the dashboard).
  contact:
    name: United Logistics Engineering
    email: sfuentes@assetmg.tech
servers:
  - url: https://app.unitedlogistics.com.do/api/v1
    description: Production
  - url: http://localhost:3000/api/v1
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /events:
    get:
      tags:
        - Events
      summary: List telemetry events
      description: >-
        Returns telemetry events scoped to the API key's org. Cursor-paginated
        on (event_date desc, id desc). For dense historical pulls, prefer narrow
        time ranges to keep latency low.
      parameters:
        - schema:
            type: string
            pattern: ^\d+$
            description: Page size, 1-500. Defaults to 100.
          required: false
          name: limit
          in: query
        - schema:
            type: string
            description: Opaque cursor returned by a previous call.
          required: false
          name: cursor
          in: query
        - schema:
            type: string
            pattern: ^\d+$
            description: >-
              Filter to events emitted by a specific vehicle (provider external
              id).
          required: false
          name: vehicle_external_id
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              ISO timestamp. Only events with `event_date >= start` are
              returned.
            example: '2026-05-01T00:00:00Z'
          required: false
          name: start
          in: query
        - schema:
            type: string
            format: date-time
            description: ISO timestamp. Only events with `event_date <= end` are returned.
            example: '2026-05-08T00:00:00Z'
          required: false
          name: end
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventListResponse'
              example:
                data:
                  - id: 987654321
                    provider: karma
                    org_id: d87f7281-ea19-45cd-b6fd-d8eb9e310da1
                    fleet_id: 42
                    vehicle_external_id: 11964
                    device_id: DEV-001
                    external_message_id: 55001234
                    event_date: '2026-05-15T14:32:10.000Z'
                    latitude: 18.4861
                    longitude: -69.9312
                    eid: 1
                    speed_kph: 62.5
                    heading_deg: 180
                    odometer_km: 45231.7
                    altitude_m: 35
                    engine_status: 1
                    ignition_status: 1
                    extra: null
                    inserted_at: '2026-05-15T14:35:00.000Z'
                pagination:
                  next_cursor: eyJldmVudF9kYXRlIjoi…
                  has_more: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
              example:
                error:
                  code: bad_request
                  message: limit must be an integer between 1 and 500.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
              example:
                error:
                  code: unauthorized
                  message: API key missing or invalid.
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
              example:
                error:
                  code: too_many_requests
                  message: Rate limit exceeded.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    EventListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Event'
        pagination:
          $ref: '#/components/schemas/PaginationCursor'
      required:
        - data
        - pagination
    ErrorObject:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: unauthorized
            message:
              type: string
              example: Missing Authorization header.
            details: {}
          required:
            - code
            - message
      required:
        - error
    Event:
      type: object
      properties:
        id:
          type: integer
        provider:
          $ref: '#/components/schemas/Provider'
        org_id:
          type: string
        fleet_id:
          type:
            - integer
            - 'null'
        vehicle_external_id:
          type: integer
          description: >-
            The provider's id for the vehicle that emitted this event. Pair with
            /api/v1/vehicles?include_inactive=true to resolve.
        device_id:
          type:
            - string
            - 'null'
        external_message_id:
          type:
            - integer
            - 'null'
          description: Provider message id. Stable per `fleet_id`.
        event_date:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        eid:
          type:
            - integer
            - 'null'
          description: Provider event-type code.
        speed_kph:
          type:
            - number
            - 'null'
        heading_deg:
          type:
            - number
            - 'null'
        odometer_km:
          type:
            - number
            - 'null'
        altitude_m:
          type:
            - number
            - 'null'
        engine_status:
          type:
            - number
            - 'null'
        ignition_status:
          type:
            - number
            - 'null'
        extra:
          type:
            - string
            - 'null'
        inserted_at:
          type: string
      required:
        - id
        - provider
        - org_id
        - fleet_id
        - vehicle_external_id
        - device_id
        - external_message_id
        - event_date
        - latitude
        - longitude
        - eid
        - speed_kph
        - heading_deg
        - odometer_km
        - altitude_m
        - engine_status
        - ignition_status
        - extra
        - inserted_at
    PaginationCursor:
      type: object
      properties:
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque cursor for the next page. Null when there are no more
            results.
          example: eyJpZCI6IjAxQUI...
        has_more:
          type: boolean
      required:
        - next_cursor
        - has_more
    Provider:
      anyOf:
        - type: string
          enum:
            - karma
            - internal
        - type: string
          pattern: ^[a-z][a-z0-9][a-z0-9_-]{0,62}$
      description: >-
        Registered: karma (Karma sync), internal (created in the app). Custom
        integrators use a stable lowercase slug.
      example: karma
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ulk_<prefix>_<secret>
      description: >-
        Authorization: Bearer ulk_<prefix>_<secret>. Cree la clave en
        Configuración → API.

````