Vehicles API
The Vehicles API allows you to create, retrieve, update, and delete vehicles within your organization. Each vehicle is configured with specific attributes that enable accurate CO2e emissions calculations based on fuel type, vehicle characteristics, and usage patterns.New API: This endpoint is part of the new API architecture with improved design and maintainability.
Key Features
- Fleet Management: Create and manage vehicles in your organization
- Flexible Vehicle Configuration: Support for both known vehicles (with fuel types) and unknown vehicle types
- CO2e Calculation: Automatic emissions calculation based on vehicle characteristics
- Regional Support: ISO country codes for region-specific emission factors
- Market Segmentation: Classify vehicles by market segment for accurate categorization
- Pagination Support: Efficiently retrieve large lists of vehicles
Authentication
All endpoints require authentication using either:- API Key: Include in
Authorizationheader asBearer {API_KEY} - JWT Token: Include in
Authorizationheader asBearer {JWT_TOKEN}
Headers
All requests must include:Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBearer token for authenticationFormat:
Bearer {API_KEY} or Bearer {JWT_TOKEN}Available Endpoints
List Vehicles
Retrieve all vehicles with filtering and pagination
Create Vehicle
Add a new vehicle to your fleet
Update Vehicle
Modify vehicle details
Delete Vehicle
Remove a vehicle from your fleet
Market Segments
Get available vehicle market segments
Vehicle Consumptions
Retrieve consumption data for a specific vehicle
Vehicle Attributes
Core Vehicle Information
- name (
string, optional): Custom name or alias for the vehicle (e.g., “Company Fleet Car #1”) - type (
string, required): Type of vehicle usage -passengerorfreight - ownership (
string, required): Ownership type -ownedorrented - license_plate (
string, required): Vehicle registration/license plate number - country (
string, required): ISO 3166-1 country code (2-3 characters)
Vehicle Classification
- unknown_vehicle_id (
UUID, required): UUID of the unknown vehicle type for categorization - vehicle_fuel_id (
UUID, optional): UUID of the vehicle fuel type (petrol, diesel, electric, hybrid, etc.) - registration_year (
integer, optional): Year of vehicle registration (YYYY format) - market_segment (
string, optional): Vehicle market segment classification - size (
string, optional): Vehicle size category (small, medium, large)
Emission Data
- custom_emission_factor_id (
UUID, optional): UUID of a custom emission factor for organizations with custom emission data - co2e (
float, read-only): Calculated CO2 equivalent emissions in kg CO2e
Workflow
Creating a Fleet Vehicle
-
Retrieve available options (if needed):
- Get unknown vehicle types from
/vehicles/unknownendpoint - Get fuel types from
/vehicles/fuelsendpoint - Get market segments from
/vehicles/market-segmentsendpoint
- Get unknown vehicle types from
-
Create the vehicle with:
- Required fields:
type,ownership,license_plate,country,unknown_vehicle_id - Either
vehicle_fuel_idorcustom_emission_factor_idfor emissions calculation
- Required fields:
-
Track emissions through the
co2efield in responses
Filtering and Pagination
Use query parameters to:- Filter by status (
active,archived,error) - Filter by ownership type (
owned,rented) - Filter by fuel type or unknown vehicle type
- Search by vehicle name or license plate
- Sort results (by name, license plate, creation date)
- Include child organizations in results
Response Format
All responses include:Vehicle Object
Pagination Response
Error Handling
Common HTTP Status Codes
| Status | Meaning | Solution |
|---|---|---|
| 200 | Success | - |
| 201 | Created | - |
| 204 | No Content (delete successful) | - |
| 400 | Bad Request | Check request parameters and format |
| 401 | Unauthorized | Verify API key or JWT token |
| 404 | Not Found | Check resource ID or organization |
| 422 | Validation Error | Review error details in response |
| 500 | Server Error | Contact support if persists |
Error Response Format
Use Cases
Track Corporate Fleet Emissions
Monitor CO2e emissions for all vehicles in your organization:Compare Vehicle Options
Evaluate different vehicle options based on emissions:Related Documentation
Authentication Guide
Learn how to get your API key and authenticate requests
Unknown Vehicles
Manage unknown vehicle types in your system
Vehicle Fuels
View available fuel types for vehicle configuration
Logistics API
Calculate emissions for shipments and logistics operations
Rate Limiting
API requests are subject to rate limiting. Include rate limit information from response headers:X-RateLimit-Limit: Maximum requests per minuteX-RateLimit-Remaining: Requests remainingX-RateLimit-Reset: Unix timestamp when limit resets

