Create Commuting Period
Create Commuting Period
Add a new commuting period for an employee to track transportation emissions
POST
Create Commuting Period
Create Commuting Period
Create a new commuting period for an employee. This defines how the employee commutes during a specific date range, enabling CO2e emissions calculations.Transport Type Rules: Different transport types require different field combinations. See the transport validation rules below.
Request
Headers
Your API key for authenticationExample:
sk_live_1234567890abcdefYour organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody Parameters
UUID of the employee this period belongs toExample:
"550e8400-e29b-41d4-a716-446655440000"Period start date (YYYY-MM-DD)Example:
"2024-01-01"Period end date (YYYY-MM-DD). Must be after start_date.Example:
"2024-12-31"Type of commuteAvailable values:
in_itinere- Home to work commute (daily commuting)in_labore- Travel during work hours
"in_itinere"Mode of transportationAvailable values:
car, bus, train, metro, tram, motorbike, bicycle, walking, telecommuting, electric_kick_scooter, trolleybusExample: "car"One-way distance in kilometers. Required for all transport types except
telecommuting.Example: 15Days of the week the employee commutes (0=Monday, 6=Sunday). Required for all transport types except
telecommuting.Example: [0, 1, 2, 3, 4] (Monday to Friday)Number of round trips per day (usually 1)Example:
1Vehicle size (required for
car transport type)Available values: small, medium, largeExample: "medium"Fuel type. Required for
car, bus, motorbike. Optional for train, metro, bicycle, trolleybus.Available values: petrol, diesel, electric, hybrid, lpg, natural_gas, not_fuel_based, do_not_knowExample: "petrol"For electric vehicles/transport - whether powered by renewable energyAvailable values:
yes, no, do_not_knowExample: "yes"Whether the employee carpools. Must be
true or false for car, must be false for other transport types.Example: falsePeriod statusAvailable values:
active, inactive, terminatedExample: "active"How the commuting data was collectedAvailable values:
manual, qr, formExample: "manual"Transport Validation Rules
When providing transport fields, all related fields must be provided together:Car
Bus
Train / Metro / Trolleybus
Motorbike
Bicycle
Walking / Tram / Electric Kick Scooter / Telecommuting
Response
Unique identifier (UUID)
Employee UUID
Calculated CO2 equivalent emissions in kg for the period
Example
Successful Response
Common Errors
422 Validation Error
Cause: Invalid field combinations404 Not Found
Cause: Employee not foundUse Cases
Create Car Commute
Create Public Transit Commute
Create Remote Worker Period
Create Carpool Commute
Related Endpoints
Update Commuting Period
Modify period details
Delete Commuting Period
Remove a period
List Periods
View all periods
Employee Commuting Guide
Complete commuting tutorial

