Skip to main content
PATCH
Update Commuting Period

Update Commuting Period

Update an existing commuting period. You can modify transport details, dates, or other attributes. The CO2e will be recalculated automatically.
Transport Field Groups: When updating transport-related fields (transport_type, vehicle_size, fuel_type, renewable_energy, carpool), you must provide all five fields together.

Request

Headers

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

Path Parameters

string
required
The unique identifier (UUID) of the commuting periodExample: 660e8400-e29b-41d4-a716-446655440000

Body Parameters

All parameters are optional. Only include fields you want to update.
date
Period start date. Must provide end_date as well.
date
Period end date. Must provide start_date as well.
string
Type: in_itinere or in_labore
string
Mode of transport. When provided, must include all transport fields.
string
Vehicle size for cars. Part of transport field group.
string
Fuel type. Part of transport field group.
string
Renewable energy source. Part of transport field group.
boolean
Carpooling status. Part of transport field group.
number
One-way distance in kilometers.
array[integer]
Days of week for commuting.
integer
Round trips per day.
string
Period status: active, inactive, terminated

Response

Returns the updated commuting period with recalculated CO2e.
string
Commuting period UUID
string
Parent employee UUID
date
Period start date (YYYY-MM-DD)
string | null
Period end date (YYYY-MM-DD)
string
in_itinere (home-to-office) or in_labore (work-related travel)
string | null
Mode of transport (e.g. car, train, bicycle, bus)
string | null
Vehicle size category
string | null
Fuel type
string | null
Renewable energy source
boolean
Whether the employee carpools
number | null
One-way distance in kilometers
array[integer] | null
Days of the week the employee commutes (0=Monday, 6=Sunday)
integer
Round trips per commuting day
string | null
Period status: active, inactive, terminated
string | null
Origin address
string | null
Destination address
string | null
How the data was collected (e.g. manual, survey, csv)
number | null
Calculated CO2 equivalent emissions in kg
string | null
ISO 8601 creation timestamp
string | null
ISO 8601 last update timestamp

Example

Successful Response

Common Errors

422 Validation Error

Cause: Partial transport field update
Solution: Include all transport fields: transport_type, vehicle_size, fuel_type, renewable_energy, carpool.

Use Cases

Update Distance

Change Working Days

Update Date Range

Switch Transport Mode

Create Period

Add new period

Delete Period

Remove period