Skip to main content
POST
Create Business Travel

Create Business Travel

Create a new business travel record in your organization. The system will automatically calculate CO2e emissions based on the transport type and distance.
Distance Options: You can provide either distance_km directly OR provide origin and destination addresses to have the distance calculated automatically.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
string
required
Must be application/json

Body Parameters

string
required
Mode of transportAvailable values: car, metro, train, trolleybus, bus, motorbike, aircraft, ferry
date
required
Start date of the business travelFormat: YYYY-MM-DDExample: "2024-12-01"
date
required
End date of the business travel. Must be on or after start_dateFormat: YYYY-MM-DDExample: "2024-12-01"
number
Distance traveled in kilometers (required if origin/destination not provided)Constraints: Must be greater than 0Example: 350.5
string
Starting location address (required if distance_km not provided)Constraints: Max 500 charactersExample: "Madrid, Spain"
string
Ending location address (required if distance_km not provided). Cannot be the same as origin unless distance_km is also provided.Constraints: Max 500 charactersExample: "Barcelona, Spain"
string
Optional label for this travel recordConstraints: Max 255 charactersExample: "Q4 Sales Conference"
string
Email of the travelerExample: "j.garcia@example.com"
string
default:"one_way"
Whether this is a one-way or round tripAvailable values: one_way, round
integer
default:"1"
Number of tripsConstraints: 1 to 10,000 (further limited by date range — max 100 per day)Example: 2
integer
default:"1"
Number of passengers per tripConstraints: Must be at least 1Example: 3
string
Vehicle size. Required when transport_type is car, not allowed for other types.Available values: small, medium, large
string
Fuel type. Required when transport_type is car, not allowed for other types.Available values: diesel, petrol, natural_gas, lpg, electric, hybrid, not_fuel_based, do_not_know
string
Whether the vehicle uses renewable energyAvailable values: yes, no, do_not_know

Response

Returns the created business travel object with HTTP status 201 Created.
The co2e value may initially be 0 with status: "pending". Emissions are calculated asynchronously and the value will be updated shortly. Use the Get Business Travel endpoint to check the updated value.
string
Unique identifier (UUID) for the new record
string
Organization UUID
string | null
Travel record label
string | null
Traveler email
string
Mode of transport
date
Start date of travel
date
End date of travel
number | null
Distance in km (calculated if origin/destination provided)
string | null
How the distance was obtained: manual (provided directly), geodesic (great-circle for aircraft), or google_maps (other transport types with origin/destination)
string | null
Starting location address
string | null
Ending location address
object | null
Geocoded origin location resolved from the origin address
object | null
Geocoded destination location (same structure as origin_geocode)
string
Trip type: one_way or round
integer
Number of trips
integer
Number of passengers per trip
string | null
Vehicle size (car only)
string | null
Fuel type (car only)
string | null
Renewable energy usage
string
Record status: pending immediately after creation, active once calculation completes, error if calculation failed
string
Record source: api for records created via this endpoint
number | null
Calculated CO2 equivalent emissions in kg. null or 0 while calculation is pending
string | null
File UUID if created via bulk upload (always null for API-created records)
string | null
Name of the source file, if created via bulk upload
object | null
The authenticated user who created this record
datetime
Creation timestamp
datetime | null
Last update timestamp

Example

Train Travel with Direct Distance

Flight with Origin/Destination

Car Travel with Vehicle Details

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

422 Unprocessable Entity

Cause: Missing required fields — must provide either distance_km OR both origin and destination
Cause: Missing vehicle_size or fuel_type when transport_type is car
Cause: end_date is before start_date
Cause: Unknown field sent in request body (this endpoint rejects extra fields)

Validation Rules

  1. Distance Input: Provide either distance_km OR both origin and destination
  2. Date Range: end_date must be on or after start_date
  3. Travel Number: 1 to 10,000, further limited to max 100 per day in the date range
  4. Car Transport: vehicle_size and fuel_type are required when transport_type is car
  5. Vehicle Size Restriction: vehicle_size is only allowed for car transport
  6. Extra Fields: This endpoint rejects any fields not listed above (e.g. flight_type, cabin_class, round_trip)

List Business Travels

Retrieve all business travels

Get Business Travel

Get a specific business travel

Update Business Travel

Modify business travel details

Delete Business Travel

Remove a business travel record