> ## 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 last-known vehicle locations

> Returns stored location snapshots for the org (same field names as the legacy Karma location payload). Used by the live map and integrator diagnostics.



## OpenAPI

````yaml /openapi.json get /vehicles/locations
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:
  /vehicles/locations:
    get:
      tags:
        - Vehicles
      summary: List last-known vehicle locations
      description: >-
        Returns stored location snapshots for the org (same field names as the
        legacy Karma location payload). Used by the live map and integrator
        diagnostics.
      parameters:
        - schema:
            type: string
            description: >-
              Comma-separated external_id values. Omit to return all vehicles
              with a stored location.
          required: false
          name: external_ids
          in: query
        - schema:
            type: string
            description: Optional filter to one provider slug.
          required: false
          name: provider
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleLocationListResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    VehicleLocationListResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            locations:
              type: array
              items:
                $ref: '#/components/schemas/MapVehicleLocation'
            total:
              type: integer
          required:
            - locations
            - total
      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
    MapVehicleLocation:
      type: object
      properties:
        message_id:
          type: integer
        vehicle_id:
          type: integer
        carnumber:
          type: string
        device_id:
          type: string
        extra:
          type: string
        edt:
          type: string
        eid:
          type: integer
        latitude:
          type: number
        longitude:
          type: number
        spd:
          type: number
        head:
          type: number
        odo:
          type: number
        alt:
          type: number
        eng:
          type: integer
        driver_id:
          type:
            - integer
            - 'null'
          description: >-
            Provider driver external_id at time of snapshot
            (`drivers.external_id`).
          example: 4821
        car_title:
          type: string
        license_plate:
          type: string
        icon_url:
          type: string
        car_type:
          type: string
        sub_type:
          type: string
      required:
        - message_id
        - vehicle_id
        - carnumber
        - device_id
        - edt
        - eid
        - latitude
        - longitude
        - spd
        - head
        - odo
        - alt
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ulk_<prefix>_<secret>
      description: >-
        Authorization: Bearer ulk_<prefix>_<secret>. Cree la clave en
        Configuración → API.

````