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));import requests
url = "https://api.dcycle.io/v1/vehicles/{vehicle_id}"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/vehicles/{vehicle_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"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 a single vehicle by ID
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));import requests
url = "https://api.dcycle.io/v1/vehicles/{vehicle_id}"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/vehicles/{vehicle_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"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": {}
}← Vehicles API
Retrieve the full details of a single vehicle, including its fuel type, emission data, and status.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
string
required
UUID of the vehicleExample:
f47ac10b-58cc-4372-a567-0e02b2c3d479Response
string
Vehicle UUID
string | null
Display name of the vehicle
string
Vehicle usage type:
freight or passengerstring
Ownership type:
owned or rentedstring | null
Vehicle license plate number
string
ISO country code
integer | null
Year the vehicle was registered
string | null
Market segment:
mini, supermini, lower_medium, upper_medium, executive, luxury, sports, dual_purpose_4x4, mpvstring | null
Vehicle size:
small_car, medium, large_car, average_carstring
Current status:
active, archived, errornumber
Total CO2 equivalent emissions in kg
string | null
UUID of the assigned fuel type
string | null
Fuel type name (e.g.
diesel, petrol, electric)array[object] | null
string | null
UUID of the unknown vehicle type
string | null
String name of the unknown vehicle type (e.g.
Truck, Van)string | null
UUID of the custom emission factor applied, if any
array[string] | null
Error codes when status is
errorstring | null
UUID of the import file, if created via CSV import
string | null
Name of the import file, if created via CSV import
datetime
ISO 8601 creation timestamp
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}"
import requests
import os
response = requests.get(
f"https://api.dcycle.io/v1/vehicles/{os.getenv('VEHICLE_ID')}",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
},
)
vehicle = response.json()
print(f"{vehicle['name']} — {vehicle['co2e']} kg CO2e")
const axios = require('axios');
const response = await axios.get(
`https://api.dcycle.io/v1/vehicles/${process.env.VEHICLE_ID}`,
{
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
}
);
console.log(`${response.data.name} — ${response.data.co2e} kg CO2e`);
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" }
Related Endpoints
List Vehicles
Browse all vehicles
Update Vehicle
Modify vehicle details
Was this page helpful?