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

# Get vehicle

> Returns a single vehicle by ID.



## OpenAPI

````yaml get /v1/businesses/{businessId}/mileage/vehicles/{vehicleId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/mileage/vehicles/{vehicleId}:
    get:
      tags: []
      summary: Get vehicle
      description: Returns a single vehicle by ID.
      operationId: business.mileage.vehicles.vehicleId.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business
          required: true
          schema:
            type: string
            format: uuid
        - name: vehicleId
          in: path
          description: The UUID of the vehicle
          required: true
          schema:
            type: string
            format: uuid
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
        - name: allow_archived
          in: query
          description: Allow fetching archived vehicles
          required: false
          schema:
            type: boolean
            default: false
        - name: allow_deleted
          in: query
          description: Allow fetching deleted vehicles
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: The vehicle
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiVehicle'
        '404':
          description: Business or vehicle not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiVehicle:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the vehicle
        business_id:
          type: string
          format: uuid
          description: The UUID of the business this vehicle belongs to
        external_id:
          type: string
          nullable: true
          description: >-
            An optional external identifier for the vehicle, used for
            idempotency
        make_and_model:
          type: string
          description: The make and model of the vehicle (e.g., 'Toyota Camry')
        year:
          type: integer
          description: The model year of the vehicle
        license_plate:
          type: string
          nullable: true
          description: The license plate number of the vehicle
        vin:
          type: string
          nullable: true
          description: The Vehicle Identification Number (VIN)
        description:
          type: string
          nullable: true
          description: An optional description or notes about the vehicle
        is_primary:
          type: boolean
          description: >-
            Whether this is the primary vehicle for the business. Only one
            vehicle can be primary at a time.
        is_eligible_for_deletion:
          type: boolean
          description: >-
            Whether the vehicle can be deleted. A vehicle cannot be deleted if
            it has trips or is archived.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the vehicle was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the vehicle was last updated
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the vehicle was archived, or null if not archived
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the vehicle was deleted, or null if not deleted
      required:
        - id
        - business_id
        - make_and_model
        - year
        - is_primary
        - is_eligible_for_deletion
        - created_at
        - updated_at
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````