Skip to main content

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 an API key included in the x-api-key header.

Headers

All requests must include:
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef

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 - passenger or freight
  • ownership (string, required): Ownership type - owned or rented
  • 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

  1. Retrieve available options (if needed):
    • Get unknown vehicle types from /unknown-vehicles endpoint
    • Get fuel types from /vehicle-fuels endpoint
    • Get market segments from /vehicles/market-segments endpoint
  2. Create the vehicle with:
    • Required fields: type, ownership, license_plate, country, unknown_vehicle_id
    • Either vehicle_fuel_id or custom_emission_factor_id for emissions calculation
  3. Track emissions through the co2e field 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

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:

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 minute
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Unix timestamp when limit resets