Skip to main content
GET
/
v1
/
vehicles
/
{vehicle_id}
Get Vehicle
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/vehicles/{vehicle_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "name": {},
  "type": "<string>",
  "ownership": "<string>",
  "license_plate": {},
  "country": "<string>",
  "registration_year": {},
  "market_segment": {},
  "size": {},
  "status": "<string>",
  "co2e": 123,
  "vehicle_fuel_id": {},
  "vehicle_fuel": {},
  "vehicle_fuel_units": {
    "id": "<string>",
    "name": "<string>",
    "type": "<string>"
  },
  "unknown_vehicle_id": {},
  "unknown_vehicle_type": {},
  "custom_emission_factor_id": {},
  "error_messages": {},
  "file_id": {},
  "file_name": {},
  "created_at": {},
  "updated_at": {}
}

Get Vehicle

Retrieve the full details of a single vehicle, including its fuel type, emission data, and status.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

vehicle_id
string
required
UUID of the vehicleExample: f47ac10b-58cc-4372-a567-0e02b2c3d479

Response

id
string
Vehicle UUID
name
string | null
Display name of the vehicle
type
string
Vehicle usage type: freight or passenger
ownership
string
Ownership type: owned or rented
license_plate
string | null
Vehicle license plate number
country
string
ISO country code
registration_year
integer | null
Year the vehicle was registered
market_segment
string | null
Market segment: mini, supermini, lower_medium, upper_medium, executive, luxury, sports, dual_purpose_4x4, mpv
size
string | null
Vehicle size: small_car, medium, large_car, average_car
status
string
Current status: active, archived, error
co2e
number
Total CO2 equivalent emissions in kg
vehicle_fuel_id
string | null
UUID of the assigned fuel type
vehicle_fuel
string | null
Fuel type name (e.g. diesel, petrol, electric)
vehicle_fuel_units
array[object] | null
Available fuel units for this vehicle’s fuel type
unknown_vehicle_id
string | null
UUID of the unknown vehicle type
unknown_vehicle_type
string | null
String name of the unknown vehicle type (e.g. Truck, Van)
custom_emission_factor_id
string | null
UUID of the custom emission factor applied, if any
error_messages
array[string] | null
Error codes when status is error
file_id
string | null
UUID of the import file, if created via CSV import
file_name
string | null
Name of the import file, if created via CSV import
created_at
datetime
ISO 8601 creation timestamp
updated_at
datetime | null
ISO 8601 last-update timestamp

Example

curl "https://api.dcycle.io/v1/vehicles/${VEHICLE_ID}" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "name": "Company Van #12",
  "type": "freight",
  "ownership": "owned",
  "license_plate": "1234 ABC",
  "country": "ES",
  "registration_year": 2021,
  "market_segment": null,
  "size": "large_car",
  "status": "active",
  "co2e": 2450.8,
  "vehicle_fuel_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "vehicle_fuel": "diesel",
  "vehicle_fuel_units": [
    { "id": "unit-uuid", "name": "litres", "type": "volume" }
  ],
  "unknown_vehicle_id": null,
  "unknown_vehicle_type": null,
  "custom_emission_factor_id": null,
  "error_messages": null,
  "file_id": null,
  "file_name": null,
  "created_at": "2024-06-15T10:30:00Z",
  "updated_at": "2025-01-20T14:22:00Z"
}

Common Errors

404 Not Found

Cause: Vehicle does not exist or does not belong to your organization
{ "detail": "Vehicle not found" }

List Vehicles

Browse all vehicles

Update Vehicle

Modify vehicle details