Skip to main content
GET
/
vehicles
List Vehicles
curl --request GET \
  --url https://api.inspecto.com/api/third-party/v1/vehicles \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "plateNumber": "<string>",
      "vin": "<string>",
      "brand": "<string>",
      "model": "<string>",
      "type": "<string>",
      "status": "<string>",
      "fuelType": "<string>",
      "euroClass": "<string>",
      "capacity": 123,
      "fuel": 123,
      "lastMaintenance": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "meta": {
    "version": "<string>",
    "pagination": {
      "currentPage": 123,
      "totalPages": 123,
      "totalCount": 123,
      "hasNextPage": true,
      "hasPreviousPage": true
    },
    "filters": {}
  }
}

Endpoint

GET /api/third-party/v1/vehicles

Authentication

Requires vehicles:read scope.

Query Parameters

page
integer
default:"1"
Page number to retrieve
limit
integer
default:"50"
Number of items per page (max: 100)
type
string
Filter by vehicle typeOptions: TRACTOR_UNIT, CONTAINER_BDF, SEMI_TRAILER, TRAILER
status
string
Filter by vehicle statusOptions: OK, WARNING, NO_STATUS, DELETED
fuelType
string
Filter by fuel typeOptions: DIESEL, GASOLINE, ELECTRIC, HYBRID
groupId
string
Filter by vehicle group ID (UUID)
Search by plate number or VIN
sortBy
string
default:"updateAt"
Field to sort byOptions: updateAt, plateNumber, brand, createdAt
sortOrder
string
default:"desc"
Sort directionOptions: asc, desc

Response

data
array
Array of vehicle objects
meta
object
Response metadata

Example Request

curl -X GET "https://api.inspecto.com/api/third-party/v1/vehicles?type=TRACTOR_UNIT&status=OK&limit=10" \
  -H "Authorization: Bearer insp_your_api_key_here"

Example Response

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "plateNumber": "ABC-1234",
      "vin": "WDB9634321L123456",
      "brand": "Mercedes-Benz",
      "model": "Actros",
      "type": "TRACTOR_UNIT",
      "status": "OK",
      "fuelType": "DIESEL",
      "euroClass": "EURO_6",
      "capacity": 18.5,
      "fuel": 450.0,
      "lastMaintenance": "2024-11-15T10:30:00Z",
      "updatedAt": "2024-12-09T14:22:00Z"
    }
  ],
  "meta": {
    "version": "v1",
    "pagination": {
      "currentPage": 1,
      "totalPages": 3,
      "totalCount": 27,
      "hasNextPage": true,
      "hasPreviousPage": false
    },
    "filters": {
      "type": "TRACTOR_UNIT",
      "status": "OK"
    }
  }
}

Error Responses

{
  "errors": [{
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }]
}
{
  "errors": [{
    "code": "FORBIDDEN",
    "message": "Insufficient permissions",
    "details": {
      "required": ["vehicles:read"],
      "available": []
    }
  }]
}