> ## 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.

# Get an event by id

> Returns a single telemetry event by its numeric `id` (scoped to the API key's organization).



## OpenAPI

````yaml /openapi.json get /events/{id}
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/{id}:
    get:
      tags:
        - Events
      summary: Get an event by id
      description: >-
        Returns a single telemetry event by its numeric `id` (scoped to the API
        key's organization).
      parameters:
        - schema:
            type: string
            pattern: ^\d+$
            description: Numeric event id.
          required: true
          name: id
          in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
              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'
        '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.
        '404':
          description: Event not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
              example:
                error:
                  code: not_found
                  message: Evento no encontrado.
        '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:
    EventResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Event'
      required:
        - data
    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
    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.

````