Create Vehicle
Create Vehicle
Add a new vehicle to your organization’s fleet
POST
Create Vehicle
Create Vehicle
Create a new vehicle in your organization’s fleet. The system will automatically calculate CO2e emissions based on the vehicle’s characteristics.Required Setup: Before creating a vehicle, ensure you have retrieved the necessary references:
- Unknown vehicle type IDs from
/v1/unknown-vehicles - Fuel type IDs from
/v1/vehicle-fuels
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody Parameters
string
Custom name or alias for the vehicleExample:
"Company Fleet Car #1"string
required
Type of vehicle usageAvailable values:
passenger, freightExample: "passenger"string
required
Vehicle ownership typeAvailable values:
owned, rentedExample: "owned"string
required
Vehicle registration/license plate numberExample:
"ABC-1234"uuid
required
UUID of the unknown vehicle type for categorizationRetrieve available options from
GET /v1/unknown-vehiclesExample: "550e8400-e29b-41d4-a716-446655440000"string
required
ISO 3166-1 country code (2-3 characters) for regional emission calculationsExamples:
"US", "GB", "ES", "DE"uuid
UUID of the vehicle fuel type (required if
custom_emission_factor_id not provided)Retrieve available options from GET /v1/vehicle-fuelsExamples: petrol, diesel, electric, hybridExample: "660e8400-e29b-41d4-a716-446655440000"uuid
UUID of a custom emission factor (required if
vehicle_fuel_id not provided)For organizations with custom emission dataExample: "770e8400-e29b-41d4-a716-446655440000"integer
Year of vehicle registration (YYYY format)Used for age-based emission factors and vehicle classificationExample:
2022string
Vehicle market segment for classificationAvailable values:
mini, supermini, lower_medium, upper_medium, executive, luxury, sports, dual_purpose_4x4, mpvExample: "upper_medium"string
Vehicle size categoryAvailable values:
small_car, medium, large_car, average_carExample: "medium"Response
string
Unique identifier (UUID) for the vehicle
string | null
Custom name or alias for the vehicle
string
Type of vehicle usage:
passenger or freightstring
Ownership type:
owned or rentedstring
Vehicle registration/license plate number
string
ISO 3166-1 country code
string
Current status of the vehicle (newly created vehicles are
active)number
Calculated CO2 equivalent emissions in kg CO2e
string | null
UUID of the fuel type
string | null
Fuel type name (e.g.
diesel, petrol, electric)array[object] | null
Available fuel units for this vehicle’s fuel type
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
integer | null
Year of vehicle registration
string | null
Vehicle market segment classification
string | null
Vehicle size category
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
Timestamp when the vehicle was created
datetime | null
Timestamp when the vehicle was last updated
Example
Successful Response
Common Errors
401 Unauthorized
Cause: Missing or invalid API key404 Not Found
Cause: Organization not found or invalid UUID referencex-organization-id header contains a valid organization UUID, and that the unknown_vehicle_id and vehicle_fuel_id are valid.
422 Validation Error
Cause: Missing required parameters or invalid valuesvehicle_fuel_id or custom_emission_factor_id must be specified. Country code should be 2-3 characters.
Use Cases
Add a Passenger Vehicle to Fleet
Create a new company car with full details:Register a Fleet Vehicle with Custom Emissions
Add a vehicle using a custom emission factor:Bulk Add Multiple Vehicles
Add multiple vehicles in a batch operation:Related Endpoints
List Vehicles
Retrieve all vehicles with filtering and pagination
Update Vehicle
Modify vehicle details
Unknown Vehicles
Get available vehicle types
Vehicle Fuels
Get available fuel types