# Goes to work every working day, by car, with no days at home. Dcycle measures the route.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-01-01", "end_date": "2026-06-30", "client_row_id": "HR-1042-2026H1", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "origin": "Calle de Alcalá 1, Madrid", "destination": "Paseo de la Castellana 100, Madrid" } ] } ] }'
# Car on Monday and Tuesday, train on Wednesday, home on Thursday and Friday.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "carpool": true, "days": ["monday", "tuesday"], "distance_km": 18 }, { "work_model": "in_person", "transport_type": "train", "fuel_type": "electric", "renewable_energy": "yes", "days": ["wednesday"], "distance_km": 32.5 }, { "work_model": "telecommuting", "days": ["thursday", "friday"], "hours_per_day": 8 } ] } ] }'
# Works only from home: one telecommuting mode, nothing else.# The same employee as the In-person example, from July: a change of work model is a new period.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-07-01", "end_date": "2026-12-31", "client_row_id": "HR-1042-2026H2", "modes": [ { "work_model": "telecommuting", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"] } ] } ] }'
import osimport uuidimport requests# One batch can mix every work model.response = requests.post( "https://api.dcycle.io/v2/employees/commuting", headers={ "x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"], "Idempotency-Key": str(uuid.uuid4()), # keep it to retry this same batch }, json={ "records": [ { # In-person: walks to work, 1.2 km each way. "employee_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "walking", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "distance_km": 1.2, } ], }, { # Hybrid: bus three days a week, and only the total hours at home are known. "employee_id": "3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "bus", "days": ["monday", "wednesday", "friday"], "distance_km": 9, }, {"work_model": "telecommuting", "total_hours": 360}, ], }, { # Telecommute: only from home, given as the total hours of the period. "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-07-01", "end_date": "2026-12-31", "modes": [{"work_model": "telecommuting", "total_hours": 1012.5}], }, { # On leave for the period: no modes, calculated at 0 kg. "employee_id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b", "start_date": "2026-01-01", "end_date": "2026-03-31", "situation": "inactive", }, ] }, timeout=60,)response.raise_for_status()job = response.json()print(job["id"], job["status"])
{ "type": "https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED", "title": "Unprocessable Entity", "status": 422, "code": "BULK_RECORDS_REJECTED", "detail": "1 of the submitted records are invalid; nothing was written.", "errors": [ { "source_row_index": 0, "client_row_id": "HR-2041-2026H1", "error_code": "SCHEMA_INVALID", "error_params": { "errors": [ { "loc": [], "type": "value_error", "msg": "Value error, tuesday is in modes 0 and 2: each day goes in one mode" } ] } } ], "rejected": 1, "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"}
{ "dry_run": true, "submitted": 1, "valid": 1 }
Create Commuting Periods (v2)
Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously
POST
/
v2
/
employees
/
commuting
# Goes to work every working day, by car, with no days at home. Dcycle measures the route.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-01-01", "end_date": "2026-06-30", "client_row_id": "HR-1042-2026H1", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "origin": "Calle de Alcalá 1, Madrid", "destination": "Paseo de la Castellana 100, Madrid" } ] } ] }'
# Car on Monday and Tuesday, train on Wednesday, home on Thursday and Friday.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "carpool": true, "days": ["monday", "tuesday"], "distance_km": 18 }, { "work_model": "in_person", "transport_type": "train", "fuel_type": "electric", "renewable_energy": "yes", "days": ["wednesday"], "distance_km": 32.5 }, { "work_model": "telecommuting", "days": ["thursday", "friday"], "hours_per_day": 8 } ] } ] }'
# Works only from home: one telecommuting mode, nothing else.# The same employee as the In-person example, from July: a change of work model is a new period.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-07-01", "end_date": "2026-12-31", "client_row_id": "HR-1042-2026H2", "modes": [ { "work_model": "telecommuting", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"] } ] } ] }'
import osimport uuidimport requests# One batch can mix every work model.response = requests.post( "https://api.dcycle.io/v2/employees/commuting", headers={ "x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"], "Idempotency-Key": str(uuid.uuid4()), # keep it to retry this same batch }, json={ "records": [ { # In-person: walks to work, 1.2 km each way. "employee_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "walking", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "distance_km": 1.2, } ], }, { # Hybrid: bus three days a week, and only the total hours at home are known. "employee_id": "3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "bus", "days": ["monday", "wednesday", "friday"], "distance_km": 9, }, {"work_model": "telecommuting", "total_hours": 360}, ], }, { # Telecommute: only from home, given as the total hours of the period. "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-07-01", "end_date": "2026-12-31", "modes": [{"work_model": "telecommuting", "total_hours": 1012.5}], }, { # On leave for the period: no modes, calculated at 0 kg. "employee_id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b", "start_date": "2026-01-01", "end_date": "2026-03-31", "situation": "inactive", }, ] }, timeout=60,)response.raise_for_status()job = response.json()print(job["id"], job["status"])
{ "type": "https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED", "title": "Unprocessable Entity", "status": 422, "code": "BULK_RECORDS_REJECTED", "detail": "1 of the submitted records are invalid; nothing was written.", "errors": [ { "source_row_index": 0, "client_row_id": "HR-2041-2026H1", "error_code": "SCHEMA_INVALID", "error_params": { "errors": [ { "loc": [], "type": "value_error", "msg": "Value error, tuesday is in modes 0 and 2: each day goes in one mode" } ] } } ], "rejected": 1, "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"}
{ "dry_run": true, "submitted": 1, "valid": 1 }
← Employees APISay how your employees got to work (Scope 3 category 7, employee commuting): one record per employee and period,
with the modes they worked in. A mode is in_person (a transport and the days of the week it took them to
work) or telecommuting (the days, or the hours, they worked from home); a hybrid employee sends both, each day of
the week in one mode only, as the commuting survey of the Dcycle app asks it. Dcycle works out the distance when
you leave it out and calculates the emissions in the background.Each record is stored as one response of the employee for that period, as the app’s form, the survey and the
Data Importer store theirs: one commuting period per transport, with the days at home on the first one. These are the
periods List Commuting Periods reads, in the vocabulary of
POST /v1/employee-historic. An employee has one response at
a time: a record whose dates overlap another response of the employee is rejected, whatever the weekdays. A record
requires what the app’s form and the Data Importer require, since without it a period cannot be calculated.Every period is stored as in_itinere: commuting to and from work. Travel during working hours (in_labore) goes
through POST /v1/employee-historic.The request checks every record and writes them all at once, then answers 202 Accepted with an
ingest job that calculates them (see
how bulk ingestion works). Follow it with
GET /v2/ingest-jobs/{id} or, for a job submitted with an API key, the
ingest_job.finished webhook. Like the rest of the bulk ingest API, this route
never sends an email.
Beta. Part of the bulk ingest API, in beta. The contract may still change before general availability.
# Goes to work every working day, by car, with no days at home. Dcycle measures the route.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-01-01", "end_date": "2026-06-30", "client_row_id": "HR-1042-2026H1", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "origin": "Calle de Alcalá 1, Madrid", "destination": "Paseo de la Castellana 100, Madrid" } ] } ] }'
# Car on Monday and Tuesday, train on Wednesday, home on Thursday and Friday.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "car", "vehicle_size": "medium", "fuel_type": "diesel", "carpool": true, "days": ["monday", "tuesday"], "distance_km": 18 }, { "work_model": "in_person", "transport_type": "train", "fuel_type": "electric", "renewable_energy": "yes", "days": ["wednesday"], "distance_km": 32.5 }, { "work_model": "telecommuting", "days": ["thursday", "friday"], "hours_per_day": 8 } ] } ] }'
# Works only from home: one telecommuting mode, nothing else.# The same employee as the In-person example, from July: a change of work model is a new period.# One key per batch: reuse it only to retry this same batch.IDEMPOTENCY_KEY=$(uuidgen)curl -X POST "https://api.dcycle.io/v2/employees/commuting" \ -H "x-api-key: ${DCYCLE_API_KEY}" \ -H "x-organization-id: ${DCYCLE_ORG_ID}" \ -H "Idempotency-Key: ${IDEMPOTENCY_KEY}" \ -H "Content-Type: application/json" \ -d '{ "records": [ { "employee_id": "4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a", "start_date": "2026-07-01", "end_date": "2026-12-31", "client_row_id": "HR-1042-2026H2", "modes": [ { "work_model": "telecommuting", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"] } ] } ] }'
import osimport uuidimport requests# One batch can mix every work model.response = requests.post( "https://api.dcycle.io/v2/employees/commuting", headers={ "x-api-key": os.environ["DCYCLE_API_KEY"], "x-organization-id": os.environ["DCYCLE_ORG_ID"], "Idempotency-Key": str(uuid.uuid4()), # keep it to retry this same batch }, json={ "records": [ { # In-person: walks to work, 1.2 km each way. "employee_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "walking", "days": ["monday", "tuesday", "wednesday", "thursday", "friday"], "distance_km": 1.2, } ], }, { # Hybrid: bus three days a week, and only the total hours at home are known. "employee_id": "3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f", "start_date": "2026-01-01", "end_date": "2026-06-30", "modes": [ { "work_model": "in_person", "transport_type": "bus", "days": ["monday", "wednesday", "friday"], "distance_km": 9, }, {"work_model": "telecommuting", "total_hours": 360}, ], }, { # Telecommute: only from home, given as the total hours of the period. "employee_id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "start_date": "2026-07-01", "end_date": "2026-12-31", "modes": [{"work_model": "telecommuting", "total_hours": 1012.5}], }, { # On leave for the period: no modes, calculated at 0 kg. "employee_id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b", "start_date": "2026-01-01", "end_date": "2026-03-31", "situation": "inactive", }, ] }, timeout=60,)response.raise_for_status()job = response.json()print(job["id"], job["status"])
Start from how the employee worked in the period, the work-model question of the app’s commuting survey. It decides
which modes the record sends:
In the period, the employee…
Work model
modes
went to work, with no days at home
In-person
one in_person mode per transport
went to work some days and worked from home the others
Hybrid
one in_person mode per transport, and one telecommuting mode
worked only from home
Telecommute
one telecommuting mode
was on leave or had left
Not active: send situation: inactive or terminated
the modes of the days worked, or none
Each day of the week goes in one mode only: a car on Monday and Tuesday and a train on Wednesday are two
in_person modes, and the days at home are the telecommuting one. The app’s analytics show an in_person period
as On-site and a telecommuting one as Remote.
The questions of the app’s commuting survey, grouped by mode. Each step says which modes it applies to.
1
Who and when (every record)
employee_id, start_date and end_date. A change of address or transport within the year is a new record,
with its own dates.An employee on leave or gone in the period sends situation: inactive or terminated. The situation only labels
the period: send the modes of the days they worked, and they are calculated as any other’s; send no modes and
the period has no commute and is calculated at 0 kg. Every other record is active, the default, and sends 1 to 8
modes.
2
How they got to work (in_person)
transport_type, and the details that only that transport takes:
transport_type
Also send
fuel_type takes
car
vehicle_size (small, medium or large) and fuel_type, both required; carpool
diesel, natural_gas, petrol, lpg, electric, hybrid (a hybrid car), do_not_know
motorbike
fuel_type, required
diesel, petrol, electric, do_not_know
bus
fuel_type, do_not_know when left out
diesel, natural_gas, petrol, lpg, do_not_know
train
fuel_type, do_not_know when left out
diesel, electric, do_not_know
metro, trolleybus
fuel_type, do_not_know when left out
electric, do_not_know
bicycle
fuel_type, optional
electric, not_fuel_based, do_not_know
tram, electric_kick_scooter, walking
nothing else
none
carpool: true says the car is shared. Only a car takes it; left out or null, it is false.
renewable_energy (yes, no or do_not_know) goes only with fuel_type: electric: whether that
electricity is renewable.
With walking, send no vehicle detail.
3
How far and how often (in_person)
The days:days, the days of the week they went to work with that transport, monday to sunday. The
app’s survey asks how many days and stores them from Monday; send the actual days when you know them, since
public holidays are removed by date.
The distance, one way:distance_km, or origin and destination for Dcycle to measure the road or rail
route between them (by the transport). When your system knows the distance, send distance_km and leave the
places out; any you send are only stored.
The trips:daily_trips, round trips each of those days, 1 (the default) to 3.
4
Days at home (telecommuting)
days, the days of the week they worked from home, or, when only the total is known, total_hours for the
whole period. Send one of the two, never both.
hours_per_day (default 8) prices each day at home.
One telecommuting mode at most: send all the days at home in it.
Every record is checked: its fields and the rules of its modes, its employee, its custom factors, and that it
does not overlap another response of its employee, from any channel (this route, the app’s form, the survey, the
Data Importer), nor an earlier record of the request. If any record is invalid the whole request is rejected
with 422 and nothing is written; rejected is the number of invalid records and errors lists them (up to 100). The request never measures a distance, and leaves the job
at most 500 distinct routes to measure (origin, destination and the road or rail network of the transport): a
route repeated in the request counts once.
The records are written at once, each as one response of its employee for its dates, in the organization of
its employee (the x-organization-id organization or one of its
perimeter), with one commuting period per transport, all with the
record’s dates. The days at home (telecommutingdays) go on the first transport’s period; they are a
telecommuting period of their own when the record has no in_person mode, or when they are given as
total_hours. Its custom_responses go on the first period. A record for the exact dates of a survey sent to the
employee answers it.
The job calculates each response in the background, in chunks. An in_person period sent without
distance_km gets the distance of the road or rail route (by its transport) between its origin and
destination, and is marked total_km_estimated. Then its commute is calculated under employee commuting, and
the days at home under telecommuting. An employee with a calculated period is uploaded. A period that is not
active is calculated the same way: its modes when it has them, else at 0 kg. A job item is
failed, with the period_id of a period that failed in error_params, when:
DISTANCE_CALCULATION_ERROR: a place could not be found or no route joins them. That period is kept without a
distance and is not calculated: write the response again (the item’s entity_id) with
Replace Commuting Response (v2), with distance_km or
other places for that mode.
CALCULATION_FAILED: a period produced no emission at all (no factor for its commute or its days at home).
The response’s other periods keep their emissions.
When every chunk is done the job is completed (or completed_with_errors). For a job submitted with an API
key, ingest_job.finished is sent to the webhook endpoints of the x-organization-id organization.
An in_person period is the same trip repeated on its days between start_date and end_date, without the
public holidays of the organization’s country: daily_trips round trips each of those days, each twice the
distance (there and back). A shared car (carpool: true) splits the emissions in 3.
The days at home count their days between the same dates, without the same holidays, priced per hour worked
(hours_per_day each) or per day, depending on the factor, whichever period holds them. Sent with total_hours,
they are priced on those hours instead, spread over the years of the period by calendar days (a factor per day reads
them as total_hours / hours_per_day days).
For example, the Hybrid record of the request examples, in a week with no public holidays: 2 days × 1 round trip ×
2 × 18 km = 72 km by car, shared by 3; 1 × 1 × 2 × 32.5 km = 65 km by train; and 2 days at home × 8 hours =
16 hours worked from home (or 2 days, when the factor is per day).
The organization you send as. Its employees, and those of the organizations under it that you can write to (its
perimeter), can be given records. The job and its
ingest_job.finished webhook belong to this organization.
1 to 255 characters, one per batch, looked up per organization across every v2 bulk route. Within 24 hours, the
same key with the same route and body returns the original job (with Idempotent-Replayed: true) instead of
writing the records again; the same key with another body or on another route is 422 IDEMPOTENCY_KEY_REUSED, and
while the first request is still being processed 409 IDEMPOTENCY_KEY_IN_PROGRESS. After 24 hours the key is free,
and a request with it is a new one. See The Idempotency-Key.
Check only: the same 422 for invalid records, nothing written, no job; 200 with
{"dry_run": true, "submitted": n, "valid": n} when every record is valid. The
Idempotency-Key header is still required, but a dry run does not check or store it.
The employee in the period: active, inactive (on leave) or terminated. It only labels the period: an
inactive or terminated record sends the modes of the days worked, calculated as any other’s, or no
modes (or []), stored as one telecommuting period with no day and calculated at 0 kg.
How the employee worked, 1 to 8 modes, required for an active record and optional otherwise: one
in_person mode per transport and at most one telecommuting mode, each day of the week in one mode only.
Each is one of the two objects below, told apart by work_model.
Answers to your organization’s own survey questions, by question key: the custom columns of the commuting
table, the ones your survey adds. Each value as its column takes it (text, a number, an option of a select…),
and none is required; a key that is not one of your questions is refused (CUSTOM_RESPONSE_INVALID). A formula
column’s key is ignored: its value is computed, so what
Get Commuting Response (v2) reads can be sent back as it is.
Stored on the response’s first period, as the survey stores them. dry_run=true checks them too.
How they got to work: bicycle, bus, car, electric_kick_scooter, metro, motorbike, train, tram,
trolleybus or walking. It decides which vehicle details the mode takes (step 2).
What the vehicle runs on: petrol, diesel, electric, hybrid, lpg, natural_gas, not_fuel_based or
do_not_know, among those its transport takes (step 2). Required for a car and a
motorbike; a bus, metro, train or trolleybus sent without one (or with "") is do_not_know.
Whether the car is shared, which splits its emissions in 3; false when left out or null. Only a car can be
shared: on any other transport, true is SCHEMA_INVALID.
Where the commute starts, e.g. the home address, 1 to 500 characters once trimmed (a blank one counts as not
sent). Without distance_km the job measures the distance: send it with destination, each with a letter or a
digit to find it by. With distance_km nothing is measured, and either place may be sent alone, to be stored.
A record of your custom emission factor databases to
calculate this commute with instead of the default: find it with
List Records. It must be visible from the employee’s
organization, enabled, and its activity_categories must include employees_in_itinere.
The hours worked from home in the whole period, from 0.01 to 100,000, when the days are not known. Send it
instead of days, never with them (see How a period is counted).
Hours worked a day, 0 to 24. With days, a factor per hour prices each day at home at these hours (with 0, no
emissions) and a factor per day counts the days whatever the hours. With total_hours, a factor per hour reads
those hours whatever this value, and a factor per day reads total_hours / hours_per_day days (with 0, no
emissions). See How a period is counted.
List Commuting Periods returns the employee’s periods, one per
transport with the record’s dates, with their distance and emissions (co2e) and their id (what ids
deletes).
If chunks_done stops moving, see A job that does not finish:
never resend the batch with a new Idempotency-Key: its records are already stored, so a second send is rejected
with COMMUTING_RESPONSE_OVERLAP.
Problem details. Per-record codes in errors[].error_code of a 422 BULK_RECORDS_REJECTED:
error_code
Cause
SCHEMA_INVALID
The record does not match the schema or the rules of its modes: see Common mistakes. error_params.errors says where (loc names the mode, e.g. ["modes", "1", "in_person"]).
REFERENCE_NOT_FOUND
employee_id does not exist, is disabled or is outside your organization’s perimeter (all answer the same). error_params.field is employee_id.
MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED
A mode’s custom_ef_record_id (error_params.field says which, e.g. modes.1.custom_ef_record_id) does not exist, is disabled or is not visible from the employee’s organization.
MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY
That custom record is not configured for its mode’s activity category (employees_in_itinere or employees_telecommute).
COMMUTING_RESPONSE_OVERLAP
The employee already has a response whose dates overlap the record’s (whatever the weekdays), from any channel. error_params.field is start_date, and error_params names that response, response_id (or period_id for a period that answers no survey), with its start_date and end_date. Write that response again with Replace Commuting Response (v2), or delete it (response_ids, or ids for a period_id) and send the record again.
COMMUTING_RECORDS_OVERLAP
An earlier record of the request, for the same employee, has dates that overlap this one’s. error_params.field is start_date, and error_params.source_row_index is that record’s position, with its start_date and end_date. Send one record per employee and period, with every mode in it.
CUSTOM_RESPONSE_INVALID
A key of custom_responses is not one of your organization’s questions (error_params.reason is UNKNOWN_QUESTION), or a value is not one its column takes, such as a word in a number column or an option the select does not offer (reason is the column’s code, e.g. INVALID_VALUE). error_params.field is custom_responses and error_params.message names the question. Send the value as the column takes it, or leave the key out.
ROUTE_LIMIT_EXCEEDED
One of the record’s routes is past the first 500 distinct ones the request leaves to measure (error_params.max is 500, and error_params.field names the record’s first mode past it, e.g. modes.1.distance_km; a route is its origin, destination and road or rail network, and a repeated one counts once). Send its distance_km, or send the record in another request.
After the 202, a job item can end failed with DISTANCE_CALCULATION_ERROR or CALCULATION_FAILED (see
How it works).
a vehicle detail its transport does not take: vehicle_size on a bus, carpool: true on a train, a fuel_type on a tram, renewable_energy without fuel_type: electric…
neither distance_km nor origin and destination; or, without distance_km, only one of the two places, or one with no letter or digit, such as ???
Send distance_km, or both places.
in_person
distance_km of 0, or daily_trips of 0 or above 3
Send the distance above 0, and 1 to 3 trips.
telecommuting
neither days nor total_hours, or both
Send one of the two.
telecommuting
total_hours outside 0.01 to 100,000, or a commute field such as distance_km
Send the period’s hours worked from home, and nothing about trips.
Request-level errors: 401 for a missing or invalid API key, 403 LOGGED_USER_NOT_MEMBER when the key’s user is not a
member of the organization, 422 REQUEST_VALIDATION_FAILED for a malformed body (no records, more than 5,000, no
Idempotency-Key), 422 IDEMPOTENCY_KEY_REUSED, 409 IDEMPOTENCY_KEY_IN_PROGRESS, and 429 beyond the
rate limits.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Dcycle Platform Docs","colors":{"primary":"#006ad4","light":"#006ad4","dark":"#006ad4"},"favicon":"https://mintcdn.com/dcyleio/3p55kB8fgLjSeubO/images/favicon.svg?fit=max\u0026auto=format\u0026n=3p55kB8fgLjSeubO\u0026q=85\u0026s=b60bb57384c71b7a5a59fbc458538887","api":{"params":{"expanded":"all"},"playground":{"display":"interactive","proxy":true},"examples":{"languages":["javascript","python","curl"],"prefill":true},"mdx":{"server":"https://api.dcycle.io"}},"navbar":{"links":[{"href":"https://app.dcycle.io","label":"App"}],"primary":{"type":"button","label":"Get API Key","href":"/docs/authentication#get-an-api-key"}},"search":{"prompt":"Search API endpoints and guides..."},"seo":{"indexing":"all"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"contextual":{"options":["copy","view","claude","chatgpt"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dcyleio","hasAudioNarration":false,"actualSubdomain":"dcyleio","customDomains":["code.dcycle.io"],"gitSource":{"type":"github","owner":"dcycle-by-wum","repo":"dcycle-backend-app","deployBranch":"main","contentDirectory":"docs/developer-center","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6aef6f67b69215f74376dc6d","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API","count":454},{"language":"default","tag":"Guides","count":48},{"language":"default","tag":"CLI","count":40},{"language":"default","tag":"Employees","count":38},{"language":"default","tag":"Vehicles","count":38},{"language":"default","tag":"Own Workforce","count":37},{"language":"default","tag":"Logistics","count":34},{"language":"default","tag":"Custom KPI","count":33},{"language":"default","tag":"Commands","count":33},{"language":"default","tag":"MCP","count":32}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/employees/commuting-create-v2","slug":"/api-reference/employees/commuting-create-v2","pageMetadata":{"title":"Create Commuting Periods (v2)","api":"POST /v2/employees/commuting","description":"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously","tag":"BETA","href":"/api-reference/employees/commuting-create-v2"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,Expandable,Heading,ParamField,Step,Steps,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsx(_components.a,{href:`/api-reference/employees/overview`,children:`← Employees API`})}),`\n`,_jsxs(_components.p,{children:[`Say how your employees got to work (Scope 3 category 7, employee commuting): one record per employee and period,\nwith the `,_jsx(_components.strong,{children:`modes`}),` they worked in. A mode is `,_jsx(_components.code,{children:`in_person`}),` (a transport and the days of the week it took them to\nwork) or `,_jsx(_components.code,{children:`telecommuting`}),` (the days, or the hours, they worked from home); a hybrid employee sends both, each day of\nthe week in one mode only, as the commuting survey of the Dcycle app asks it. Dcycle works out the distance when\nyou leave it out and calculates the emissions in the background.`]}),`\n`,_jsxs(_components.p,{children:[`Each record is stored as one `,_jsx(_components.strong,{children:`response`}),` of the employee for that period, as the app’s form, the survey and the\nData Importer store theirs: one commuting period per transport, with the days at home on the first one. These are the\nperiods `,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/list`,children:`List Commuting Periods`}),` reads, in the vocabulary of\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/create`,children:_jsx(_components.code,{children:`POST /v1/employee-historic`})}),`. An employee has `,_jsx(_components.strong,{children:`one response at\na time`}),`: a record whose dates overlap another response of the employee is rejected, whatever the weekdays. A record\nrequires what the app’s form and the Data Importer require, since without it a period cannot be calculated.`]}),`\n`,_jsxs(_components.p,{children:[`Every period is stored as `,_jsx(_components.code,{children:`in_itinere`}),`: commuting to and from work. Travel during working hours (`,_jsx(_components.code,{children:`in_labore`}),`) goes\nthrough `,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/create`,children:_jsx(_components.code,{children:`POST /v1/employee-historic`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request checks every record and writes them all at once, then answers `,_jsx(_components.code,{children:`202 Accepted`}),` with an\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:`ingest job`}),` that calculates them (see\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview`,children:`how bulk ingestion works`}),`). Follow it with\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}`})}),` or, for a job submitted with an API key, the\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` webhook. Like the rest of the bulk ingest API, this route\n`,_jsx(_components.strong,{children:`never sends an email`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Beta.`}),` Part of the bulk ingest API, in beta. The contract may still change before general availability.`]})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`choose-the-work-model`,children:`Choose the work model`}),`\n`,_jsx(_components.p,{children:`Start from how the employee worked in the period, the work-model question of the app’s commuting survey. It decides\nwhich modes the record sends:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`In the period, the employee…`}),_jsx(_components.th,{children:`Work model`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`modes`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`went to work, with no days at home`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`In-person`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`in_person`}),` mode per transport`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`went to work some days and worked from home the others`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Hybrid`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`in_person`}),` mode per transport, and one `,_jsx(_components.code,{children:`telecommuting`}),` mode`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`worked only from home`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Telecommute`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`telecommuting`}),` mode`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`was on leave or had left`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Not active`}),`: send `,_jsx(_components.code,{children:`situation: inactive`}),` or `,_jsx(_components.code,{children:`terminated`})]}),_jsx(_components.td,{children:`the modes of the days worked, or none`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Each day of the week goes in one mode only: a car on Monday and Tuesday and a train on Wednesday are two\n`,_jsx(_components.code,{children:`in_person`}),` modes, and the days at home are the `,_jsx(_components.code,{children:`telecommuting`}),` one. The app’s analytics show an `,_jsx(_components.code,{children:`in_person`}),` period\nas On-site and a `,_jsx(_components.code,{children:`telecommuting`}),` one as Remote.`]}),`\n`,_jsx(Heading,{level:`2`,id:`build-a-record`,children:`Build a record`}),`\n`,_jsx(_components.p,{children:`The questions of the app’s commuting survey, grouped by mode. Each step says which modes it applies to.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Who and when (every record)`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`employee_id`}),`, `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. A change of address or transport within the year is a new record,\nwith its own dates.`]}),_jsxs(_components.p,{children:[`An employee on leave or gone in the period sends `,_jsx(_components.code,{children:`situation: inactive`}),` or `,_jsx(_components.code,{children:`terminated`}),`. The situation only labels\nthe period: send the `,_jsx(_components.code,{children:`modes`}),` of the days they worked, and they are calculated as any other’s; send no `,_jsx(_components.code,{children:`modes`}),` and\nthe period has no commute and is calculated at 0 kg. Every other record is `,_jsx(_components.code,{children:`active`}),`, the default, and sends 1 to 8\nmodes.`]})]}),_jsxs(Step,{title:`How they got to work (in_person)`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`transport_type`}),`, and the details that only that transport takes:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`transport_type`})}),_jsx(_components.th,{children:`Also send`}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`fuel_type`}),` takes`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`car`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`vehicle_size`}),` (`,_jsx(_components.code,{children:`small`}),`, `,_jsx(_components.code,{children:`medium`}),` or `,_jsx(_components.code,{children:`large`}),`) and `,_jsx(_components.code,{children:`fuel_type`}),`, both required; `,_jsx(_components.code,{children:`carpool`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`hybrid`}),` (a hybrid car), `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`motorbike`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, required`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bus`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`train`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`trolleybus`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bicycle`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, optional`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`not_fuel_based`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`tram`}),`, `,_jsx(_components.code,{children:`electric_kick_scooter`}),`, `,_jsx(_components.code,{children:`walking`})]}),_jsx(_components.td,{children:`nothing else`}),_jsx(_components.td,{children:`none`})]})]})]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`carpool: true`}),` says the car is shared. Only a `,_jsx(_components.code,{children:`car`}),` takes it; left out or `,_jsx(_components.code,{children:`null`}),`, it is `,_jsx(_components.code,{children:`false`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`renewable_energy`}),` (`,_jsx(_components.code,{children:`yes`}),`, `,_jsx(_components.code,{children:`no`}),` or `,_jsx(_components.code,{children:`do_not_know`}),`) goes only with `,_jsx(_components.code,{children:`fuel_type: electric`}),`: whether that\nelectricity is renewable.`]}),`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`walking`}),`, send no vehicle detail.`]}),`\n`]})]}),_jsx(Step,{title:`How far and how often (in_person)`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The days:`}),` `,_jsx(_components.code,{children:`days`}),`, the days of the week they went to work with that transport, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`. The\napp’s survey asks how many days and stores them from Monday; send the actual days when you know them, since\npublic holidays are removed by date.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The distance, one way:`}),` `,_jsx(_components.code,{children:`distance_km`}),`, or `,_jsx(_components.code,{children:`origin`}),` and `,_jsx(_components.code,{children:`destination`}),` for Dcycle to measure the road or rail\nroute between them (by the transport). When your system knows the distance, send `,_jsx(_components.code,{children:`distance_km`}),` and leave the\nplaces out; any you send are only stored.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The trips:`}),` `,_jsx(_components.code,{children:`daily_trips`}),`, round trips each of those days, `,_jsx(_components.code,{children:`1`}),` (the default) to `,_jsx(_components.code,{children:`3`}),`.`]}),`\n`]})}),_jsx(Step,{title:`Days at home (telecommuting)`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`days`}),`, the days of the week they worked from home, or, when only the total is known, `,_jsx(_components.code,{children:`total_hours`}),` for the\nwhole period. Send one of the two, never both.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`hours_per_day`}),` (default `,_jsx(_components.code,{children:`8`}),`) prices each day at home.`]}),`\n`,_jsxs(_components.li,{children:[`One `,_jsx(_components.code,{children:`telecommuting`}),` mode at most: send all the days at home in it.`]}),`\n`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Every record is checked`}),`: its fields and the rules of its modes, its employee, its custom factors, and that it\ndoes not overlap another response of its employee, from any channel (this route, the app’s form, the survey, the\nData Importer), nor an earlier record of the request. If any record is invalid the `,_jsx(_components.strong,{children:`whole`}),` request is rejected\nwith `,_jsx(_components.code,{children:`422`}),` and nothing is written; `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),` lists them (up to 100). The request never measures a distance, and leaves the job\nat most 500 distinct routes to measure (`,_jsx(_components.code,{children:`origin`}),`, `,_jsx(_components.code,{children:`destination`}),` and the road or rail network of the transport): a\nroute repeated in the request counts once.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The records are written at once`}),`, each as one response of its employee for its dates, in the organization of\nits employee (the `,_jsx(_components.code,{children:`x-organization-id`}),` organization or one of its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`), with one commuting period per transport, all with the\nrecord’s dates. The days at home (`,_jsx(_components.code,{children:`telecommuting`}),` `,_jsx(_components.code,{children:`days`}),`) go on the first transport’s period; they are a\n`,_jsx(_components.code,{children:`telecommuting`}),` period of their own when the record has no `,_jsx(_components.code,{children:`in_person`}),` mode, or when they are given as\n`,_jsx(_components.code,{children:`total_hours`}),`. Its `,_jsx(_components.code,{children:`custom_responses`}),` go on the first period. A record for the exact dates of a survey sent to the\nemployee answers it.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The job calculates each response`}),` in the background, in chunks. An `,_jsx(_components.code,{children:`in_person`}),` period sent without\n`,_jsx(_components.code,{children:`distance_km`}),` gets the distance of the road or rail route (by its transport) between its `,_jsx(_components.code,{children:`origin`}),` and\n`,_jsx(_components.code,{children:`destination`}),`, and is marked `,_jsx(_components.code,{children:`total_km_estimated`}),`. Then its commute is calculated under employee commuting, and\nthe days at home under telecommuting. An employee with a calculated period is `,_jsx(_components.code,{children:`uploaded`}),`. A period that is not\n`,_jsx(_components.code,{children:`active`}),` is calculated the same way: its modes when it has them, else at 0 kg. A job item is\n`,_jsx(_components.code,{children:`failed`}),`, with the `,_jsx(_components.code,{children:`period_id`}),` of a period that failed in `,_jsx(_components.code,{children:`error_params`}),`, when:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DISTANCE_CALCULATION_ERROR`}),`: a place could not be found or no route joins them. That period is kept without a\ndistance and is not calculated: write the response again (the item’s `,_jsx(_components.code,{children:`entity_id`}),`) with\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),`, with `,_jsx(_components.code,{children:`distance_km`}),` or\nother places for that mode.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`CALCULATION_FAILED`}),`: a period produced no emission at all (no factor for its commute or its days at home).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The response’s other periods keep their emissions.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When every chunk is done`}),` the job is `,_jsx(_components.code,{children:`completed`}),` (or `,_jsx(_components.code,{children:`completed_with_errors`}),`). For a job submitted with an API\nkey, `,_jsx(_components.code,{children:`ingest_job.finished`}),` is sent to the webhook endpoints of the `,_jsx(_components.code,{children:`x-organization-id`}),` organization.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-a-period-is-counted`,children:`How a period is counted`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`An `,_jsx(_components.code,{children:`in_person`}),` period`]}),` is the same trip repeated on its `,_jsx(_components.code,{children:`days`}),` between `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`, without the\npublic holidays of the organization’s country: `,_jsx(_components.code,{children:`daily_trips`}),` round trips each of those days, each twice the\ndistance (there and back). A shared car (`,_jsx(_components.code,{children:`carpool: true`}),`) splits the emissions in 3.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The days at home`}),` count their `,_jsx(_components.code,{children:`days`}),` between the same dates, without the same holidays, priced per hour worked\n(`,_jsx(_components.code,{children:`hours_per_day`}),` each) or per day, depending on the factor, whichever period holds them. Sent with `,_jsx(_components.code,{children:`total_hours`}),`,\nthey are priced on those hours instead, spread over the years of the period by calendar days (a factor per day reads\nthem as `,_jsx(_components.code,{children:`total_hours / hours_per_day`}),` days).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`For example, the Hybrid record of the request examples, in a week with no public holidays: 2 days × 1 round trip ×\n2 × 18 km = 72 km by car, shared by 3; 1 × 1 × 2 × 32.5 km = 65 km by train; and 2 days at home × 8 hours =\n16 hours worked from home (or 2 days, when the factor is per day).`}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key (see `,_jsx(_components.a,{href:`/api-reference/introduction#authentication`,children:`Authentication`}),`).`]})}),`\n`,_jsx(ParamField,{header:`x-organization-id`,type:`string`,required:true,id:`param-x-organization-id`,children:_jsxs(_components.p,{children:[`The organization you send as. Its employees, and those of the organizations under it that you can write to (its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`), can be given records. The job and its\n`,_jsx(_components.code,{children:`ingest_job.finished`}),` webhook belong to this organization.`]})}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`1 to 255 characters, one per batch, looked up per organization across every v2 bulk route. Within 24 hours, the\nsame key with the same route and body returns the original job (with `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) instead of\nwriting the records again; the same key with another body or on another route is `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`, and\nwhile the first request is still being processed `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`. After 24 hours the key is free,\nand a request with it is a new one. See `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#the-idempotency-key`,children:`The Idempotency-Key`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`dry_run`,type:`boolean`,default:`false`,id:`param-dry-run`,children:_jsxs(_components.p,{children:[`Check only: the same `,_jsx(_components.code,{children:`422`}),` for invalid records, nothing written, no job; `,_jsx(_components.code,{children:`200`}),` with\n`,_jsx(_components.code,{children:`{\"dry_run\": true, \"submitted\": n, \"valid\": n}`}),` when every record is valid. The\n`,_jsx(_components.code,{children:`Idempotency-Key`}),` header is still required, but a dry run does not check or store it.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`records`,type:`array[object]`,required:true,id:`param-records`,children:[_jsxs(_components.p,{children:[`The records to create, 1 to 5,000: one per employee and period. A field not listed here is rejected\n(`,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`).`]}),_jsxs(Expandable,{title:`record fields`,children:[_jsx(ParamField,{body:`employee_id`,type:`uuid`,required:true,id:`param-employee-id`,children:_jsxs(_components.p,{children:[`The employee: an `,_jsx(_components.code,{children:`id`}),` that `,_jsx(_components.a,{href:`/api-reference/employees/create-v2`,children:`Create Employees (v2)`}),` answers, or of\n`,_jsx(_components.a,{href:`/api-reference/employees/list`,children:`List Employees`}),`.`]})}),_jsx(ParamField,{body:`start_date`,type:`date`,required:true,id:`param-start-date`,children:_jsxs(_components.p,{children:[`First day of the period, `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`, from 1970 to `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`: a period is\nwhat happened.`]})}),_jsx(ParamField,{body:`end_date`,type:`date`,required:true,id:`param-end-date`,children:_jsxs(_components.p,{children:[`Last day of the period, on or after `,_jsx(_components.code,{children:`start_date`}),`, at the latest Dec 31 of the current year (a full-year\nestimate); a later one is `,_jsx(_components.code,{children:`date_after_this_year`}),`.`]})}),_jsx(ParamField,{body:`situation`,type:`string`,default:`active`,id:`param-situation`,children:_jsxs(_components.p,{children:[`The employee in the period: `,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`inactive`}),` (on leave) or `,_jsx(_components.code,{children:`terminated`}),`. It only labels the period: an\n`,_jsx(_components.code,{children:`inactive`}),` or `,_jsx(_components.code,{children:`terminated`}),` record sends the `,_jsx(_components.code,{children:`modes`}),` of the days worked, calculated as any other’s, or no\n`,_jsx(_components.code,{children:`modes`}),` (or `,_jsx(_components.code,{children:`[]`}),`), stored as one `,_jsx(_components.code,{children:`telecommuting`}),` period with no day and calculated at 0 kg.`]})}),_jsx(ParamField,{body:`modes`,type:`array[object]`,id:`param-modes`,children:_jsxs(_components.p,{children:[`How the employee worked, 1 to 8 modes, required for an `,_jsx(_components.code,{children:`active`}),` record and optional otherwise: one\n`,_jsx(_components.code,{children:`in_person`}),` mode per transport and at most one `,_jsx(_components.code,{children:`telecommuting`}),` mode, each day of the week in one mode only.\nEach is one of the two objects below, told apart by `,_jsx(_components.code,{children:`work_model`}),`.`]})}),_jsx(ParamField,{body:`custom_responses`,type:`object`,id:`param-custom-responses`,children:_jsxs(_components.p,{children:[`Answers to your organization’s own survey questions, by question key: the custom columns of the commuting\ntable, the ones your survey adds. Each value as its column takes it (text, a number, an option of a select…),\nand none is required; a key that is not one of your questions is refused (`,_jsx(_components.code,{children:`CUSTOM_RESPONSE_INVALID`}),`). A formula\ncolumn’s key is ignored: its value is computed, so what\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-get-v2`,children:`Get Commuting Response (v2)`}),` reads can be sent back as it is.\nStored on the response’s first period, as the survey stores them. `,_jsx(_components.code,{children:`dry_run=true`}),` checks them too.`]})}),_jsx(ParamField,{body:`client_row_id`,type:`string`,id:`param-client-row-id`,children:_jsx(_components.p,{children:`Your own reference for the record, up to 255 characters, echoed in errors and in the job’s items.`})})]}),_jsxs(Expandable,{title:`in_person mode`,children:[_jsx(ParamField,{body:`work_model`,type:`string`,required:true,id:`param-work-model`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`in_person`}),`: the days the employee went to work with one transport.`]})}),_jsx(ParamField,{body:`transport_type`,type:`string`,required:true,id:`param-transport-type`,children:_jsxs(_components.p,{children:[`How they got to work: `,_jsx(_components.code,{children:`bicycle`}),`, `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`car`}),`, `,_jsx(_components.code,{children:`electric_kick_scooter`}),`, `,_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`motorbike`}),`, `,_jsx(_components.code,{children:`train`}),`, `,_jsx(_components.code,{children:`tram`}),`,\n`,_jsx(_components.code,{children:`trolleybus`}),` or `,_jsx(_components.code,{children:`walking`}),`. It decides which vehicle details the mode takes (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})}),_jsx(ParamField,{body:`vehicle_size`,type:`string`,id:`param-vehicle-size`,children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`car`}),` only, and required for it: `,_jsx(_components.code,{children:`small`}),`, `,_jsx(_components.code,{children:`medium`}),` or `,_jsx(_components.code,{children:`large`}),`.`]})}),_jsx(ParamField,{body:`fuel_type`,type:`string`,id:`param-fuel-type`,children:_jsxs(_components.p,{children:[`What the vehicle runs on: `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`hybrid`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`not_fuel_based`}),` or\n`,_jsx(_components.code,{children:`do_not_know`}),`, among those its transport takes (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`). Required for a `,_jsx(_components.code,{children:`car`}),` and a\n`,_jsx(_components.code,{children:`motorbike`}),`; a `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`train`}),` or `,_jsx(_components.code,{children:`trolleybus`}),` sent without one (or with `,_jsx(_components.code,{children:`\"\"`}),`) is `,_jsx(_components.code,{children:`do_not_know`}),`.`]})}),_jsx(ParamField,{body:`renewable_energy`,type:`string`,id:`param-renewable-energy`,children:_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`fuel_type: electric`}),`, and only with it: `,_jsx(_components.code,{children:`yes`}),`, `,_jsx(_components.code,{children:`no`}),` or `,_jsx(_components.code,{children:`do_not_know`}),`, whether the electricity is\nrenewable.`]})}),_jsx(ParamField,{body:`carpool`,type:`boolean`,default:`false`,id:`param-carpool`,children:_jsxs(_components.p,{children:[`Whether the car is shared, which splits its emissions in 3; `,_jsx(_components.code,{children:`false`}),` when left out or `,_jsx(_components.code,{children:`null`}),`. Only a `,_jsx(_components.code,{children:`car`}),` can be\nshared: on any other transport, `,_jsx(_components.code,{children:`true`}),` is `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]})}),_jsx(ParamField,{body:`days`,type:`array[string]`,required:true,id:`param-days`,children:_jsxs(_components.p,{children:[`The days of the week they went to work with this transport, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`, each once and in no other mode\nof the record.`]})}),_jsx(ParamField,{body:`distance_km`,type:`number`,id:`param-distance-km`,children:_jsxs(_components.p,{children:[`One-way distance, in km, above 0 and up to 500,000. Left out: the job works it out from `,_jsx(_components.code,{children:`origin`}),` and\n`,_jsx(_components.code,{children:`destination`}),`.`]})}),_jsx(ParamField,{body:`origin`,type:`string`,id:`param-origin`,children:_jsxs(_components.p,{children:[`Where the commute starts, e.g. the home address, 1 to 500 characters once trimmed (a blank one counts as not\nsent). Without `,_jsx(_components.code,{children:`distance_km`}),` the job measures the distance: send it with `,_jsx(_components.code,{children:`destination`}),`, each with a letter or a\ndigit to find it by. With `,_jsx(_components.code,{children:`distance_km`}),` nothing is measured, and either place may be sent alone, to be stored.`]})}),_jsx(ParamField,{body:`destination`,type:`string`,id:`param-destination`,children:_jsxs(_components.p,{children:[`Where it ends, e.g. the office address, as `,_jsx(_components.code,{children:`origin`}),`.`]})}),_jsx(ParamField,{body:`daily_trips`,type:`integer`,default:`1`,id:`param-daily-trips`,children:_jsxs(_components.p,{children:[`Round trips each of those days, 1 to 3: `,_jsx(_components.code,{children:`1`}),` is there and back, twice the distance.`]})}),_jsx(ParamField,{body:`custom_ef_record_id`,type:`uuid`,id:`param-custom-ef-record-id`,children:_jsxs(_components.p,{children:[`A record of your `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor databases`}),` to\ncalculate this commute with instead of the default: find it with\n`,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/list-records`,children:`List Records`}),`. It must be visible from the employee’s\norganization, enabled, and its `,_jsx(_components.code,{children:`activity_categories`}),` must include `,_jsx(_components.code,{children:`employees_in_itinere`}),`.`]})})]}),_jsxs(Expandable,{title:`telecommuting mode`,children:[_jsx(ParamField,{body:`work_model`,type:`string`,required:true,id:`param-work-model-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`telecommuting`}),`: the time the employee worked from home.`]})}),_jsx(ParamField,{body:`days`,type:`array[string]`,id:`param-days-1`,children:_jsxs(_components.p,{children:[`The days of the week they worked from home, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`, each once and in no other mode of the record.\nSend them or `,_jsx(_components.code,{children:`total_hours`}),`.`]})}),_jsx(ParamField,{body:`total_hours`,type:`number`,id:`param-total-hours`,children:_jsxs(_components.p,{children:[`The hours worked from home in the whole period, from 0.01 to 100,000, when the days are not known. Send it\ninstead of `,_jsx(_components.code,{children:`days`}),`, never with them (see `,_jsx(_components.a,{href:`#how-a-period-is-counted`,children:`How a period is counted`}),`).`]})}),_jsx(ParamField,{body:`hours_per_day`,type:`integer`,default:`8`,id:`param-hours-per-day`,children:_jsxs(_components.p,{children:[`Hours worked a day, 0 to 24. With `,_jsx(_components.code,{children:`days`}),`, a factor per hour prices each day at home at these hours (with `,_jsx(_components.code,{children:`0`}),`, no\nemissions) and a factor per day counts the days whatever the hours. With `,_jsx(_components.code,{children:`total_hours`}),`, a factor per hour reads\nthose hours whatever this value, and a factor per day reads `,_jsx(_components.code,{children:`total_hours / hours_per_day`}),` days (with `,_jsx(_components.code,{children:`0`}),`, no\nemissions). See `,_jsx(_components.a,{href:`#how-a-period-is-counted`,children:`How a period is counted`}),`.`]})}),_jsx(ParamField,{body:`custom_ef_record_id`,type:`uuid`,id:`param-custom-ef-record-id-1`,children:_jsxs(_components.p,{children:[`As in an `,_jsx(_components.code,{children:`in_person`}),` mode, for the days at home: its `,_jsx(_components.code,{children:`activity_categories`}),` must include\n`,_jsx(_components.code,{children:`employees_telecommute`}),`.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`202 Accepted`}),` with the job (`,_jsx(_components.code,{children:`entity_type: employee_commuting`}),`, `,_jsx(_components.code,{children:`operation: create`}),`) and a `,_jsx(_components.code,{children:`Location`}),` header to it. To\nread the result:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}/items`})}),` has one item per record, in the order\nsent. Its `,_jsx(_components.code,{children:`entity_id`}),` is the record’s response:\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-get-v2`,children:`Get Commuting Response (v2)`}),` reads it,\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),` writes it again and\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-delete-v2`,children:`Delete Commuting Periods (v2)`}),` takes it in `,_jsx(_components.code,{children:`response_ids`}),` to delete\nall its periods. A `,_jsx(_components.code,{children:`failed`}),` item carries its `,_jsx(_components.code,{children:`error_code`}),` and the `,_jsx(_components.code,{children:`period_id`}),` that failed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/list`,children:`List Commuting Periods`}),` returns the employee’s periods, one per\ntransport with the record’s dates, with their distance and emissions (`,_jsx(_components.code,{children:`co2e`}),`) and their `,_jsx(_components.code,{children:`id`}),` (what `,_jsx(_components.code,{children:`ids`}),`\ndeletes).`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`chunks_done`}),` stops moving, see `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get#a-job-that-does-not-finish`,children:`A job that does not finish`}),`:\nnever resend the batch with a new `,_jsx(_components.code,{children:`Idempotency-Key`}),`: its records are already stored, so a second send is rejected\nwith `,_jsx(_components.code,{children:`COMMUTING_RESPONSE_OVERLAP`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/errors`,children:`Problem details`}),`. Per-record codes in `,_jsx(_components.code,{children:`errors[].error_code`}),` of a `,_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`error_code`})}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SCHEMA_INVALID`})}),_jsxs(_components.td,{children:[`The record does not match the schema or the rules of its modes: see `,_jsx(_components.a,{href:`#common-mistakes`,children:`Common mistakes`}),`. `,_jsx(_components.code,{children:`error_params.errors`}),` says where (`,_jsx(_components.code,{children:`loc`}),` names the mode, e.g. `,_jsx(_components.code,{children:`[\"modes\", \"1\", \"in_person\"]`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`employee_id`}),` does not exist, is disabled or is outside your organization’s `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` (all answer the same). `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`employee_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED`})}),_jsxs(_components.td,{children:[`A mode’s `,_jsx(_components.code,{children:`custom_ef_record_id`}),` (`,_jsx(_components.code,{children:`error_params.field`}),` says which, e.g. `,_jsx(_components.code,{children:`modes.1.custom_ef_record_id`}),`) does not exist, is disabled or is not visible from the employee’s organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY`})}),_jsxs(_components.td,{children:[`That custom record is not configured for its mode’s activity category (`,_jsx(_components.code,{children:`employees_in_itinere`}),` or `,_jsx(_components.code,{children:`employees_telecommute`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`COMMUTING_RESPONSE_OVERLAP`})}),_jsxs(_components.td,{children:[`The employee already has a response whose dates overlap the record’s (whatever the weekdays), from any channel. `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`start_date`}),`, and `,_jsx(_components.code,{children:`error_params`}),` names that response, `,_jsx(_components.code,{children:`response_id`}),` (or `,_jsx(_components.code,{children:`period_id`}),` for a period that answers no survey), with its `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. Write that response again with `,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),`, or delete it (`,_jsx(_components.a,{href:`/api-reference/employees/commuting-delete-v2`,children:_jsx(_components.code,{children:`response_ids`})}),`, or `,_jsx(_components.code,{children:`ids`}),` for a `,_jsx(_components.code,{children:`period_id`}),`) and send the record again.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`COMMUTING_RECORDS_OVERLAP`})}),_jsxs(_components.td,{children:[`An earlier record of the request, for the same employee, has dates that overlap this one’s. `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`start_date`}),`, and `,_jsx(_components.code,{children:`error_params.source_row_index`}),` is that record’s position, with its `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. Send one record per employee and period, with every mode in it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOM_RESPONSE_INVALID`})}),_jsxs(_components.td,{children:[`A key of `,_jsx(_components.code,{children:`custom_responses`}),` is not one of your organization’s questions (`,_jsx(_components.code,{children:`error_params.reason`}),` is `,_jsx(_components.code,{children:`UNKNOWN_QUESTION`}),`), or a value is not one its column takes, such as a word in a number column or an option the select does not offer (`,_jsx(_components.code,{children:`reason`}),` is the column’s code, e.g. `,_jsx(_components.code,{children:`INVALID_VALUE`}),`). `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`custom_responses`}),` and `,_jsx(_components.code,{children:`error_params.message`}),` names the question. Send the value as the column takes it, or leave the key out.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ROUTE_LIMIT_EXCEEDED`})}),_jsxs(_components.td,{children:[`One of the record’s routes is past the first 500 distinct ones the request leaves to measure (`,_jsx(_components.code,{children:`error_params.max`}),` is 500, and `,_jsx(_components.code,{children:`error_params.field`}),` names the record’s first mode past it, e.g. `,_jsx(_components.code,{children:`modes.1.distance_km`}),`; a route is its `,_jsx(_components.code,{children:`origin`}),`, `,_jsx(_components.code,{children:`destination`}),` and road or rail network, and a repeated one counts once). Send its `,_jsx(_components.code,{children:`distance_km`}),`, or send the record in another request.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`After the `,_jsx(_components.code,{children:`202`}),`, a job item can end `,_jsx(_components.code,{children:`failed`}),` with `,_jsx(_components.code,{children:`DISTANCE_CALCULATION_ERROR`}),` or `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),` (see\n`,_jsx(_components.a,{href:`#how-it-works`,children:`How it works`}),`).`]}),`\n`,_jsx(Heading,{level:`3`,id:`common-mistakes`,children:`Common mistakes`}),`\n`,_jsxs(_components.p,{children:[`Each one answers `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),` for the record:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Where`}),_jsx(_components.th,{children:`The record sends…`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`a field this page does not list, e.g. `,_jsx(_components.code,{children:`organization_id`}),`, or a field of a mode at the record’s level, e.g. `,_jsx(_components.code,{children:`transport_type`})]}),_jsx(_components.td,{children:`Remove it, or move it into its mode.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`an `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`, a `,_jsx(_components.code,{children:`start_date`}),` in the future (`,_jsx(_components.code,{children:`date_in_the_future`}),`) or an `,_jsx(_components.code,{children:`end_date`}),` after this year (`,_jsx(_components.code,{children:`date_after_this_year`}),`)`]}),_jsx(_components.td,{children:`Send the dates of what happened, up to Dec 31 of the current year.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`no `,_jsx(_components.code,{children:`modes`}),` (or `,_jsx(_components.code,{children:`[]`}),`) on an `,_jsx(_components.code,{children:`active`}),` record, or more than 8`]}),_jsx(_components.td,{children:`Send how the employee worked, one mode per transport and one for home.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsx(_components.td,{children:`a day in two modes`}),_jsx(_components.td,{children:`Send each day in one mode.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`two `,_jsx(_components.code,{children:`telecommuting`}),` modes`]}),_jsx(_components.td,{children:`Send all the days at home in one.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mode`}),_jsxs(_components.td,{children:[`a `,_jsx(_components.code,{children:`work_model`}),` other than `,_jsx(_components.code,{children:`in_person`}),` or `,_jsx(_components.code,{children:`telecommuting`})]}),_jsx(_components.td,{children:`Send one of the two.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mode`}),_jsxs(_components.td,{children:[`a day twice in `,_jsx(_components.code,{children:`days`}),`, a day that is not `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),` (e.g. `,_jsx(_components.code,{children:`0`}),`), or no days`]}),_jsx(_components.td,{children:`Send each day once, by name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`transport_type: telecommuting`})}),_jsxs(_components.td,{children:[`Send a `,_jsx(_components.code,{children:`telecommuting`}),` mode instead.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`a `,_jsx(_components.code,{children:`car`}),` without `,_jsx(_components.code,{children:`vehicle_size`}),` or `,_jsx(_components.code,{children:`fuel_type`}),`, or a `,_jsx(_components.code,{children:`motorbike`}),` without `,_jsx(_components.code,{children:`fuel_type`})]}),_jsxs(_components.td,{children:[`Add them (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`a vehicle detail its transport does not take: `,_jsx(_components.code,{children:`vehicle_size`}),` on a `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`carpool: true`}),` on a `,_jsx(_components.code,{children:`train`}),`, a `,_jsx(_components.code,{children:`fuel_type`}),` on a `,_jsx(_components.code,{children:`tram`}),`, `,_jsx(_components.code,{children:`renewable_energy`}),` without `,_jsx(_components.code,{children:`fuel_type: electric`}),`…`]}),_jsxs(_components.td,{children:[`Leave it out (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`neither `,_jsx(_components.code,{children:`distance_km`}),` nor `,_jsx(_components.code,{children:`origin`}),` and `,_jsx(_components.code,{children:`destination`}),`; or, without `,_jsx(_components.code,{children:`distance_km`}),`, only one of the two places, or one with no letter or digit, such as `,_jsx(_components.code,{children:`???`})]}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`distance_km`}),`, or both places.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`distance_km`}),` of `,_jsx(_components.code,{children:`0`}),`, or `,_jsx(_components.code,{children:`daily_trips`}),` of `,_jsx(_components.code,{children:`0`}),` or above `,_jsx(_components.code,{children:`3`})]}),_jsx(_components.td,{children:`Send the distance above 0, and 1 to 3 trips.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`telecommuting`})}),_jsxs(_components.td,{children:[`neither `,_jsx(_components.code,{children:`days`}),` nor `,_jsx(_components.code,{children:`total_hours`}),`, or both`]}),_jsx(_components.td,{children:`Send one of the two.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`telecommuting`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`total_hours`}),` outside 0.01 to 100,000, or a commute field such as `,_jsx(_components.code,{children:`distance_km`})]}),_jsx(_components.td,{children:`Send the period’s hours worked from home, and nothing about trips.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Request-level errors: `,_jsx(_components.code,{children:`401`}),` for a missing or invalid API key, `,_jsx(_components.code,{children:`403 LOGGED_USER_NOT_MEMBER`}),` when the key’s user is not a\nmember of the organization, `,_jsx(_components.code,{children:`422 REQUEST_VALIDATION_FAILED`}),` for a malformed body (no `,_jsx(_components.code,{children:`records`}),`, more than 5,000, no\n`,_jsx(_components.code,{children:`Idempotency-Key`}),`), `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`, `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`, and `,_jsx(_components.code,{children:`429`}),` beyond the\n`,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Limit`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1 to 5,000`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Modes per record`}),_jsx(_components.td,{children:`1 to 8 (0 to 8 when not active)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Distinct routes to measure per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`500`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per calculation chunk`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Create Employees (v2)`,icon:`plus`,href:`/api-reference/employees/create-v2`,children:_jsxs(_components.p,{children:[`The employees, and their `,_jsx(_components.code,{children:`employee_id`})]})}),_jsx(Card,{title:`Replace Commuting Response (v2)`,icon:`pen`,href:`/api-reference/employees/commuting-response-replace-v2`,children:_jsx(_components.p,{children:`Write a response again whole`})}),_jsx(Card,{title:`Delete Commuting Periods (v2)`,icon:`trash`,href:`/api-reference/employees/commuting-delete-v2`,children:_jsx(_components.p,{children:`Delete periods, or whole responses`})}),_jsx(Card,{title:`List Job Items`,icon:`list`,href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.p,{children:`The response and outcome of each record`})}),_jsx(Card,{title:`List Custom Factor Records`,icon:`database`,href:`/api-reference/custom-emission-factors/list-records`,children:_jsxs(_components.p,{children:[`The ids for `,_jsx(_components.code,{children:`custom_ef_record_id`})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Create Commuting Periods (v2)","api":"POST /v2/employees/commuting","description":"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously","tag":"BETA","href":"/api-reference/employees/commuting-create-v2"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,Step,Steps,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsx(_components.a,{href:`/api-reference/employees/overview`,children:`← Employees API`})}),`\n`,_jsxs(_components.p,{children:[`Say how your employees got to work (Scope 3 category 7, employee commuting): one record per employee and period,\nwith the `,_jsx(_components.strong,{children:`modes`}),` they worked in. A mode is `,_jsx(_components.code,{children:`in_person`}),` (a transport and the days of the week it took them to\nwork) or `,_jsx(_components.code,{children:`telecommuting`}),` (the days, or the hours, they worked from home); a hybrid employee sends both, each day of\nthe week in one mode only, as the commuting survey of the Dcycle app asks it. Dcycle works out the distance when\nyou leave it out and calculates the emissions in the background.`]}),`\n`,_jsxs(_components.p,{children:[`Each record is stored as one `,_jsx(_components.strong,{children:`response`}),` of the employee for that period, as the app’s form, the survey and the\nData Importer store theirs: one commuting period per transport, with the days at home on the first one. These are the\nperiods `,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/list`,children:`List Commuting Periods`}),` reads, in the vocabulary of\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/create`,children:_jsx(_components.code,{children:`POST /v1/employee-historic`})}),`. An employee has `,_jsx(_components.strong,{children:`one response at\na time`}),`: a record whose dates overlap another response of the employee is rejected, whatever the weekdays. A record\nrequires what the app’s form and the Data Importer require, since without it a period cannot be calculated.`]}),`\n`,_jsxs(_components.p,{children:[`Every period is stored as `,_jsx(_components.code,{children:`in_itinere`}),`: commuting to and from work. Travel during working hours (`,_jsx(_components.code,{children:`in_labore`}),`) goes\nthrough `,_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/create`,children:_jsx(_components.code,{children:`POST /v1/employee-historic`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request checks every record and writes them all at once, then answers `,_jsx(_components.code,{children:`202 Accepted`}),` with an\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:`ingest job`}),` that calculates them (see\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview`,children:`how bulk ingestion works`}),`). Follow it with\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}`})}),` or, for a job submitted with an API key, the\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` webhook. Like the rest of the bulk ingest API, this route\n`,_jsx(_components.strong,{children:`never sends an email`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Beta.`}),` Part of the bulk ingest API, in beta. The contract may still change before general availability.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL: In-person`,numberOfLines:`29`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# Goes to work every working day, by car, with no days at home. Dcycle measures the route.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One key per batch: reuse it only to retry this same batch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$(`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/employees/commuting\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"Idempotency-Key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\": \"4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-01-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-06-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"HR-1042-2026H1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\": \"in_person\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"transport_type\": \"car\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"vehicle_size\": \"medium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"fuel_type\": \"diesel\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\": [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"origin\": \"Calle de Alcalá 1, Madrid\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"destination\": \"Paseo de la Castellana 100, Madrid\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL: Hybrid`,numberOfLines:`41`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`41`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# Car on Monday and Tuesday, train on Wednesday, home on Thursday and Friday.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One key per batch: reuse it only to retry this same batch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$(`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/employees/commuting\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"Idempotency-Key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\": \"7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-01-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-06-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\": \"in_person\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"transport_type\": \"car\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"vehicle_size\": \"medium\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"fuel_type\": \"diesel\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"carpool\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\": [\"monday\", \"tuesday\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"distance_km\": 18`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\": \"in_person\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"transport_type\": \"train\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"fuel_type\": \"electric\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"renewable_energy\": \"yes\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\": [\"wednesday\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"distance_km\": 32.5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\": \"telecommuting\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\": [\"thursday\", \"friday\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"hours_per_day\": 8`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL: Telecommute`,numberOfLines:`25`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# Works only from home: one telecommuting mode, nothing else.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# The same employee as the In-person example, from July: a change of work model is a new period.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One key per batch: reuse it only to retry this same batch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$(`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/employees/commuting\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"Idempotency-Key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\": \"4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-07-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-12-31\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"HR-1042-2026H2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\": \"telecommuting\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\": [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python: every work model`,numberOfLines:`65`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`65`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One batch can mix every work model.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/employees/commuting\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-organization-id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_ORG_ID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`str`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(uuid.uuid4()), `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# keep it to retry this same batch`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` json`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` # In-person: walks to work, 1.2 km each way.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-01-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-06-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"in_person\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"transport_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"walking\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"monday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"tuesday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"wednesday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"thursday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"friday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"distance_km\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1.2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` # Hybrid: bus three days a week, and only the total hours at home are known.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-01-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-06-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"work_model\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"in_person\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"transport_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"bus\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"days\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"monday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"wednesday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"friday\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"distance_km\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`9`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"work_model\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"telecommuting\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"total_hours\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`360`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` # Telecommute: only from home, given as the total hours of the period.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-07-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-12-31\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"modes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"work_model\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"telecommuting\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"total_hours\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1012.5`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` # On leave for the period: no modes, calculated at 0 kg.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"employee_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-01-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-03-31\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"situation\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"inactive\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`202 (one record)`,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"entity_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"employee_commuting\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"operation\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"create\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"api_bulk\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"counts\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"succeeded\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_done\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-10-20T09:12:44.031Z\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"finished_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"self\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081/items\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422`,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"1 of the submitted records are invalid; nothing was written.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"HR-2041-2026H1\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"SCHEMA_INVALID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"loc\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"value_error\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Value error, tuesday is in modes 0 and 2: each day goes in one mode\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"rejected\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200 (dry_run=true, one record)`,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{ `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"dry_run\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"valid\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`choose-the-work-model`,children:`Choose the work model`}),`\n`,_jsx(_components.p,{children:`Start from how the employee worked in the period, the work-model question of the app’s commuting survey. It decides\nwhich modes the record sends:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`In the period, the employee…`}),_jsx(_components.th,{children:`Work model`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`modes`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`went to work, with no days at home`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`In-person`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`in_person`}),` mode per transport`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`went to work some days and worked from home the others`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Hybrid`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`in_person`}),` mode per transport, and one `,_jsx(_components.code,{children:`telecommuting`}),` mode`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`worked only from home`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Telecommute`})}),_jsxs(_components.td,{children:[`one `,_jsx(_components.code,{children:`telecommuting`}),` mode`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`was on leave or had left`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Not active`}),`: send `,_jsx(_components.code,{children:`situation: inactive`}),` or `,_jsx(_components.code,{children:`terminated`})]}),_jsx(_components.td,{children:`the modes of the days worked, or none`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Each day of the week goes in one mode only: a car on Monday and Tuesday and a train on Wednesday are two\n`,_jsx(_components.code,{children:`in_person`}),` modes, and the days at home are the `,_jsx(_components.code,{children:`telecommuting`}),` one. The app’s analytics show an `,_jsx(_components.code,{children:`in_person`}),` period\nas On-site and a `,_jsx(_components.code,{children:`telecommuting`}),` one as Remote.`]}),`\n`,_jsx(Heading,{level:`2`,id:`build-a-record`,children:`Build a record`}),`\n`,_jsx(_components.p,{children:`The questions of the app’s commuting survey, grouped by mode. Each step says which modes it applies to.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Who and when (every record)`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`employee_id`}),`, `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. A change of address or transport within the year is a new record,\nwith its own dates.`]}),_jsxs(_components.p,{children:[`An employee on leave or gone in the period sends `,_jsx(_components.code,{children:`situation: inactive`}),` or `,_jsx(_components.code,{children:`terminated`}),`. The situation only labels\nthe period: send the `,_jsx(_components.code,{children:`modes`}),` of the days they worked, and they are calculated as any other’s; send no `,_jsx(_components.code,{children:`modes`}),` and\nthe period has no commute and is calculated at 0 kg. Every other record is `,_jsx(_components.code,{children:`active`}),`, the default, and sends 1 to 8\nmodes.`]})]}),_jsxs(Step,{title:`How they got to work (in_person)`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`transport_type`}),`, and the details that only that transport takes:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`transport_type`})}),_jsx(_components.th,{children:`Also send`}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`fuel_type`}),` takes`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`car`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`vehicle_size`}),` (`,_jsx(_components.code,{children:`small`}),`, `,_jsx(_components.code,{children:`medium`}),` or `,_jsx(_components.code,{children:`large`}),`) and `,_jsx(_components.code,{children:`fuel_type`}),`, both required; `,_jsx(_components.code,{children:`carpool`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`hybrid`}),` (a hybrid car), `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`motorbike`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, required`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bus`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`train`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`trolleybus`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, `,_jsx(_components.code,{children:`do_not_know`}),` when left out`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bicycle`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fuel_type`}),`, optional`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`not_fuel_based`}),`, `,_jsx(_components.code,{children:`do_not_know`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`tram`}),`, `,_jsx(_components.code,{children:`electric_kick_scooter`}),`, `,_jsx(_components.code,{children:`walking`})]}),_jsx(_components.td,{children:`nothing else`}),_jsx(_components.td,{children:`none`})]})]})]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`carpool: true`}),` says the car is shared. Only a `,_jsx(_components.code,{children:`car`}),` takes it; left out or `,_jsx(_components.code,{children:`null`}),`, it is `,_jsx(_components.code,{children:`false`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`renewable_energy`}),` (`,_jsx(_components.code,{children:`yes`}),`, `,_jsx(_components.code,{children:`no`}),` or `,_jsx(_components.code,{children:`do_not_know`}),`) goes only with `,_jsx(_components.code,{children:`fuel_type: electric`}),`: whether that\nelectricity is renewable.`]}),`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`walking`}),`, send no vehicle detail.`]}),`\n`]})]}),_jsx(Step,{title:`How far and how often (in_person)`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The days:`}),` `,_jsx(_components.code,{children:`days`}),`, the days of the week they went to work with that transport, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`. The\napp’s survey asks how many days and stores them from Monday; send the actual days when you know them, since\npublic holidays are removed by date.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The distance, one way:`}),` `,_jsx(_components.code,{children:`distance_km`}),`, or `,_jsx(_components.code,{children:`origin`}),` and `,_jsx(_components.code,{children:`destination`}),` for Dcycle to measure the road or rail\nroute between them (by the transport). When your system knows the distance, send `,_jsx(_components.code,{children:`distance_km`}),` and leave the\nplaces out; any you send are only stored.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The trips:`}),` `,_jsx(_components.code,{children:`daily_trips`}),`, round trips each of those days, `,_jsx(_components.code,{children:`1`}),` (the default) to `,_jsx(_components.code,{children:`3`}),`.`]}),`\n`]})}),_jsx(Step,{title:`Days at home (telecommuting)`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`days`}),`, the days of the week they worked from home, or, when only the total is known, `,_jsx(_components.code,{children:`total_hours`}),` for the\nwhole period. Send one of the two, never both.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`hours_per_day`}),` (default `,_jsx(_components.code,{children:`8`}),`) prices each day at home.`]}),`\n`,_jsxs(_components.li,{children:[`One `,_jsx(_components.code,{children:`telecommuting`}),` mode at most: send all the days at home in it.`]}),`\n`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Every record is checked`}),`: its fields and the rules of its modes, its employee, its custom factors, and that it\ndoes not overlap another response of its employee, from any channel (this route, the app’s form, the survey, the\nData Importer), nor an earlier record of the request. If any record is invalid the `,_jsx(_components.strong,{children:`whole`}),` request is rejected\nwith `,_jsx(_components.code,{children:`422`}),` and nothing is written; `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),` lists them (up to 100). The request never measures a distance, and leaves the job\nat most 500 distinct routes to measure (`,_jsx(_components.code,{children:`origin`}),`, `,_jsx(_components.code,{children:`destination`}),` and the road or rail network of the transport): a\nroute repeated in the request counts once.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The records are written at once`}),`, each as one response of its employee for its dates, in the organization of\nits employee (the `,_jsx(_components.code,{children:`x-organization-id`}),` organization or one of its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`), with one commuting period per transport, all with the\nrecord’s dates. The days at home (`,_jsx(_components.code,{children:`telecommuting`}),` `,_jsx(_components.code,{children:`days`}),`) go on the first transport’s period; they are a\n`,_jsx(_components.code,{children:`telecommuting`}),` period of their own when the record has no `,_jsx(_components.code,{children:`in_person`}),` mode, or when they are given as\n`,_jsx(_components.code,{children:`total_hours`}),`. Its `,_jsx(_components.code,{children:`custom_responses`}),` go on the first period. A record for the exact dates of a survey sent to the\nemployee answers it.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The job calculates each response`}),` in the background, in chunks. An `,_jsx(_components.code,{children:`in_person`}),` period sent without\n`,_jsx(_components.code,{children:`distance_km`}),` gets the distance of the road or rail route (by its transport) between its `,_jsx(_components.code,{children:`origin`}),` and\n`,_jsx(_components.code,{children:`destination`}),`, and is marked `,_jsx(_components.code,{children:`total_km_estimated`}),`. Then its commute is calculated under employee commuting, and\nthe days at home under telecommuting. An employee with a calculated period is `,_jsx(_components.code,{children:`uploaded`}),`. A period that is not\n`,_jsx(_components.code,{children:`active`}),` is calculated the same way: its modes when it has them, else at 0 kg. A job item is\n`,_jsx(_components.code,{children:`failed`}),`, with the `,_jsx(_components.code,{children:`period_id`}),` of a period that failed in `,_jsx(_components.code,{children:`error_params`}),`, when:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DISTANCE_CALCULATION_ERROR`}),`: a place could not be found or no route joins them. That period is kept without a\ndistance and is not calculated: write the response again (the item’s `,_jsx(_components.code,{children:`entity_id`}),`) with\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),`, with `,_jsx(_components.code,{children:`distance_km`}),` or\nother places for that mode.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`CALCULATION_FAILED`}),`: a period produced no emission at all (no factor for its commute or its days at home).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The response’s other periods keep their emissions.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When every chunk is done`}),` the job is `,_jsx(_components.code,{children:`completed`}),` (or `,_jsx(_components.code,{children:`completed_with_errors`}),`). For a job submitted with an API\nkey, `,_jsx(_components.code,{children:`ingest_job.finished`}),` is sent to the webhook endpoints of the `,_jsx(_components.code,{children:`x-organization-id`}),` organization.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-a-period-is-counted`,children:`How a period is counted`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`An `,_jsx(_components.code,{children:`in_person`}),` period`]}),` is the same trip repeated on its `,_jsx(_components.code,{children:`days`}),` between `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`, without the\npublic holidays of the organization’s country: `,_jsx(_components.code,{children:`daily_trips`}),` round trips each of those days, each twice the\ndistance (there and back). A shared car (`,_jsx(_components.code,{children:`carpool: true`}),`) splits the emissions in 3.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The days at home`}),` count their `,_jsx(_components.code,{children:`days`}),` between the same dates, without the same holidays, priced per hour worked\n(`,_jsx(_components.code,{children:`hours_per_day`}),` each) or per day, depending on the factor, whichever period holds them. Sent with `,_jsx(_components.code,{children:`total_hours`}),`,\nthey are priced on those hours instead, spread over the years of the period by calendar days (a factor per day reads\nthem as `,_jsx(_components.code,{children:`total_hours / hours_per_day`}),` days).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`For example, the Hybrid record of the request examples, in a week with no public holidays: 2 days × 1 round trip ×\n2 × 18 km = 72 km by car, shared by 3; 1 × 1 × 2 × 32.5 km = 65 km by train; and 2 days at home × 8 hours =\n16 hours worked from home (or 2 days, when the factor is per day).`}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key (see `,_jsx(_components.a,{href:`/api-reference/introduction#authentication`,children:`Authentication`}),`).`]})}),`\n`,_jsx(ParamField,{header:`x-organization-id`,type:`string`,required:true,id:`param-x-organization-id`,children:_jsxs(_components.p,{children:[`The organization you send as. Its employees, and those of the organizations under it that you can write to (its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`), can be given records. The job and its\n`,_jsx(_components.code,{children:`ingest_job.finished`}),` webhook belong to this organization.`]})}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`1 to 255 characters, one per batch, looked up per organization across every v2 bulk route. Within 24 hours, the\nsame key with the same route and body returns the original job (with `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) instead of\nwriting the records again; the same key with another body or on another route is `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`, and\nwhile the first request is still being processed `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`. After 24 hours the key is free,\nand a request with it is a new one. See `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#the-idempotency-key`,children:`The Idempotency-Key`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`dry_run`,type:`boolean`,default:`false`,id:`param-dry-run`,children:_jsxs(_components.p,{children:[`Check only: the same `,_jsx(_components.code,{children:`422`}),` for invalid records, nothing written, no job; `,_jsx(_components.code,{children:`200`}),` with\n`,_jsx(_components.code,{children:`{\"dry_run\": true, \"submitted\": n, \"valid\": n}`}),` when every record is valid. The\n`,_jsx(_components.code,{children:`Idempotency-Key`}),` header is still required, but a dry run does not check or store it.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`records`,type:`array[object]`,required:true,id:`param-records`,children:[_jsxs(_components.p,{children:[`The records to create, 1 to 5,000: one per employee and period. A field not listed here is rejected\n(`,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`).`]}),_jsxs(Expandable,{title:`record fields`,children:[_jsx(ParamField,{body:`employee_id`,type:`uuid`,required:true,id:`param-employee-id`,children:_jsxs(_components.p,{children:[`The employee: an `,_jsx(_components.code,{children:`id`}),` that `,_jsx(_components.a,{href:`/api-reference/employees/create-v2`,children:`Create Employees (v2)`}),` answers, or of\n`,_jsx(_components.a,{href:`/api-reference/employees/list`,children:`List Employees`}),`.`]})}),_jsx(ParamField,{body:`start_date`,type:`date`,required:true,id:`param-start-date`,children:_jsxs(_components.p,{children:[`First day of the period, `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`, from 1970 to `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`: a period is\nwhat happened.`]})}),_jsx(ParamField,{body:`end_date`,type:`date`,required:true,id:`param-end-date`,children:_jsxs(_components.p,{children:[`Last day of the period, on or after `,_jsx(_components.code,{children:`start_date`}),`, at the latest Dec 31 of the current year (a full-year\nestimate); a later one is `,_jsx(_components.code,{children:`date_after_this_year`}),`.`]})}),_jsx(ParamField,{body:`situation`,type:`string`,default:`active`,id:`param-situation`,children:_jsxs(_components.p,{children:[`The employee in the period: `,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`inactive`}),` (on leave) or `,_jsx(_components.code,{children:`terminated`}),`. It only labels the period: an\n`,_jsx(_components.code,{children:`inactive`}),` or `,_jsx(_components.code,{children:`terminated`}),` record sends the `,_jsx(_components.code,{children:`modes`}),` of the days worked, calculated as any other’s, or no\n`,_jsx(_components.code,{children:`modes`}),` (or `,_jsx(_components.code,{children:`[]`}),`), stored as one `,_jsx(_components.code,{children:`telecommuting`}),` period with no day and calculated at 0 kg.`]})}),_jsx(ParamField,{body:`modes`,type:`array[object]`,id:`param-modes`,children:_jsxs(_components.p,{children:[`How the employee worked, 1 to 8 modes, required for an `,_jsx(_components.code,{children:`active`}),` record and optional otherwise: one\n`,_jsx(_components.code,{children:`in_person`}),` mode per transport and at most one `,_jsx(_components.code,{children:`telecommuting`}),` mode, each day of the week in one mode only.\nEach is one of the two objects below, told apart by `,_jsx(_components.code,{children:`work_model`}),`.`]})}),_jsx(ParamField,{body:`custom_responses`,type:`object`,id:`param-custom-responses`,children:_jsxs(_components.p,{children:[`Answers to your organization’s own survey questions, by question key: the custom columns of the commuting\ntable, the ones your survey adds. Each value as its column takes it (text, a number, an option of a select…),\nand none is required; a key that is not one of your questions is refused (`,_jsx(_components.code,{children:`CUSTOM_RESPONSE_INVALID`}),`). A formula\ncolumn’s key is ignored: its value is computed, so what\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-get-v2`,children:`Get Commuting Response (v2)`}),` reads can be sent back as it is.\nStored on the response’s first period, as the survey stores them. `,_jsx(_components.code,{children:`dry_run=true`}),` checks them too.`]})}),_jsx(ParamField,{body:`client_row_id`,type:`string`,id:`param-client-row-id`,children:_jsx(_components.p,{children:`Your own reference for the record, up to 255 characters, echoed in errors and in the job’s items.`})})]}),_jsxs(Expandable,{title:`in_person mode`,children:[_jsx(ParamField,{body:`work_model`,type:`string`,required:true,id:`param-work-model`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`in_person`}),`: the days the employee went to work with one transport.`]})}),_jsx(ParamField,{body:`transport_type`,type:`string`,required:true,id:`param-transport-type`,children:_jsxs(_components.p,{children:[`How they got to work: `,_jsx(_components.code,{children:`bicycle`}),`, `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`car`}),`, `,_jsx(_components.code,{children:`electric_kick_scooter`}),`, `,_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`motorbike`}),`, `,_jsx(_components.code,{children:`train`}),`, `,_jsx(_components.code,{children:`tram`}),`,\n`,_jsx(_components.code,{children:`trolleybus`}),` or `,_jsx(_components.code,{children:`walking`}),`. It decides which vehicle details the mode takes (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})}),_jsx(ParamField,{body:`vehicle_size`,type:`string`,id:`param-vehicle-size`,children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`car`}),` only, and required for it: `,_jsx(_components.code,{children:`small`}),`, `,_jsx(_components.code,{children:`medium`}),` or `,_jsx(_components.code,{children:`large`}),`.`]})}),_jsx(ParamField,{body:`fuel_type`,type:`string`,id:`param-fuel-type`,children:_jsxs(_components.p,{children:[`What the vehicle runs on: `,_jsx(_components.code,{children:`petrol`}),`, `,_jsx(_components.code,{children:`diesel`}),`, `,_jsx(_components.code,{children:`electric`}),`, `,_jsx(_components.code,{children:`hybrid`}),`, `,_jsx(_components.code,{children:`lpg`}),`, `,_jsx(_components.code,{children:`natural_gas`}),`, `,_jsx(_components.code,{children:`not_fuel_based`}),` or\n`,_jsx(_components.code,{children:`do_not_know`}),`, among those its transport takes (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`). Required for a `,_jsx(_components.code,{children:`car`}),` and a\n`,_jsx(_components.code,{children:`motorbike`}),`; a `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`metro`}),`, `,_jsx(_components.code,{children:`train`}),` or `,_jsx(_components.code,{children:`trolleybus`}),` sent without one (or with `,_jsx(_components.code,{children:`\"\"`}),`) is `,_jsx(_components.code,{children:`do_not_know`}),`.`]})}),_jsx(ParamField,{body:`renewable_energy`,type:`string`,id:`param-renewable-energy`,children:_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`fuel_type: electric`}),`, and only with it: `,_jsx(_components.code,{children:`yes`}),`, `,_jsx(_components.code,{children:`no`}),` or `,_jsx(_components.code,{children:`do_not_know`}),`, whether the electricity is\nrenewable.`]})}),_jsx(ParamField,{body:`carpool`,type:`boolean`,default:`false`,id:`param-carpool`,children:_jsxs(_components.p,{children:[`Whether the car is shared, which splits its emissions in 3; `,_jsx(_components.code,{children:`false`}),` when left out or `,_jsx(_components.code,{children:`null`}),`. Only a `,_jsx(_components.code,{children:`car`}),` can be\nshared: on any other transport, `,_jsx(_components.code,{children:`true`}),` is `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]})}),_jsx(ParamField,{body:`days`,type:`array[string]`,required:true,id:`param-days`,children:_jsxs(_components.p,{children:[`The days of the week they went to work with this transport, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`, each once and in no other mode\nof the record.`]})}),_jsx(ParamField,{body:`distance_km`,type:`number`,id:`param-distance-km`,children:_jsxs(_components.p,{children:[`One-way distance, in km, above 0 and up to 500,000. Left out: the job works it out from `,_jsx(_components.code,{children:`origin`}),` and\n`,_jsx(_components.code,{children:`destination`}),`.`]})}),_jsx(ParamField,{body:`origin`,type:`string`,id:`param-origin`,children:_jsxs(_components.p,{children:[`Where the commute starts, e.g. the home address, 1 to 500 characters once trimmed (a blank one counts as not\nsent). Without `,_jsx(_components.code,{children:`distance_km`}),` the job measures the distance: send it with `,_jsx(_components.code,{children:`destination`}),`, each with a letter or a\ndigit to find it by. With `,_jsx(_components.code,{children:`distance_km`}),` nothing is measured, and either place may be sent alone, to be stored.`]})}),_jsx(ParamField,{body:`destination`,type:`string`,id:`param-destination`,children:_jsxs(_components.p,{children:[`Where it ends, e.g. the office address, as `,_jsx(_components.code,{children:`origin`}),`.`]})}),_jsx(ParamField,{body:`daily_trips`,type:`integer`,default:`1`,id:`param-daily-trips`,children:_jsxs(_components.p,{children:[`Round trips each of those days, 1 to 3: `,_jsx(_components.code,{children:`1`}),` is there and back, twice the distance.`]})}),_jsx(ParamField,{body:`custom_ef_record_id`,type:`uuid`,id:`param-custom-ef-record-id`,children:_jsxs(_components.p,{children:[`A record of your `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor databases`}),` to\ncalculate this commute with instead of the default: find it with\n`,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/list-records`,children:`List Records`}),`. It must be visible from the employee’s\norganization, enabled, and its `,_jsx(_components.code,{children:`activity_categories`}),` must include `,_jsx(_components.code,{children:`employees_in_itinere`}),`.`]})})]}),_jsxs(Expandable,{title:`telecommuting mode`,children:[_jsx(ParamField,{body:`work_model`,type:`string`,required:true,id:`param-work-model-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`telecommuting`}),`: the time the employee worked from home.`]})}),_jsx(ParamField,{body:`days`,type:`array[string]`,id:`param-days-1`,children:_jsxs(_components.p,{children:[`The days of the week they worked from home, `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),`, each once and in no other mode of the record.\nSend them or `,_jsx(_components.code,{children:`total_hours`}),`.`]})}),_jsx(ParamField,{body:`total_hours`,type:`number`,id:`param-total-hours`,children:_jsxs(_components.p,{children:[`The hours worked from home in the whole period, from 0.01 to 100,000, when the days are not known. Send it\ninstead of `,_jsx(_components.code,{children:`days`}),`, never with them (see `,_jsx(_components.a,{href:`#how-a-period-is-counted`,children:`How a period is counted`}),`).`]})}),_jsx(ParamField,{body:`hours_per_day`,type:`integer`,default:`8`,id:`param-hours-per-day`,children:_jsxs(_components.p,{children:[`Hours worked a day, 0 to 24. With `,_jsx(_components.code,{children:`days`}),`, a factor per hour prices each day at home at these hours (with `,_jsx(_components.code,{children:`0`}),`, no\nemissions) and a factor per day counts the days whatever the hours. With `,_jsx(_components.code,{children:`total_hours`}),`, a factor per hour reads\nthose hours whatever this value, and a factor per day reads `,_jsx(_components.code,{children:`total_hours / hours_per_day`}),` days (with `,_jsx(_components.code,{children:`0`}),`, no\nemissions). See `,_jsx(_components.a,{href:`#how-a-period-is-counted`,children:`How a period is counted`}),`.`]})}),_jsx(ParamField,{body:`custom_ef_record_id`,type:`uuid`,id:`param-custom-ef-record-id-1`,children:_jsxs(_components.p,{children:[`As in an `,_jsx(_components.code,{children:`in_person`}),` mode, for the days at home: its `,_jsx(_components.code,{children:`activity_categories`}),` must include\n`,_jsx(_components.code,{children:`employees_telecommute`}),`.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`202 Accepted`}),` with the job (`,_jsx(_components.code,{children:`entity_type: employee_commuting`}),`, `,_jsx(_components.code,{children:`operation: create`}),`) and a `,_jsx(_components.code,{children:`Location`}),` header to it. To\nread the result:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}/items`})}),` has one item per record, in the order\nsent. Its `,_jsx(_components.code,{children:`entity_id`}),` is the record’s response:\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-get-v2`,children:`Get Commuting Response (v2)`}),` reads it,\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),` writes it again and\n`,_jsx(_components.a,{href:`/api-reference/employees/commuting-delete-v2`,children:`Delete Commuting Periods (v2)`}),` takes it in `,_jsx(_components.code,{children:`response_ids`}),` to delete\nall its periods. A `,_jsx(_components.code,{children:`failed`}),` item carries its `,_jsx(_components.code,{children:`error_code`}),` and the `,_jsx(_components.code,{children:`period_id`}),` that failed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/employees/commuting-periods/list`,children:`List Commuting Periods`}),` returns the employee’s periods, one per\ntransport with the record’s dates, with their distance and emissions (`,_jsx(_components.code,{children:`co2e`}),`) and their `,_jsx(_components.code,{children:`id`}),` (what `,_jsx(_components.code,{children:`ids`}),`\ndeletes).`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`chunks_done`}),` stops moving, see `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get#a-job-that-does-not-finish`,children:`A job that does not finish`}),`:\nnever resend the batch with a new `,_jsx(_components.code,{children:`Idempotency-Key`}),`: its records are already stored, so a second send is rejected\nwith `,_jsx(_components.code,{children:`COMMUTING_RESPONSE_OVERLAP`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/errors`,children:`Problem details`}),`. Per-record codes in `,_jsx(_components.code,{children:`errors[].error_code`}),` of a `,_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`error_code`})}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SCHEMA_INVALID`})}),_jsxs(_components.td,{children:[`The record does not match the schema or the rules of its modes: see `,_jsx(_components.a,{href:`#common-mistakes`,children:`Common mistakes`}),`. `,_jsx(_components.code,{children:`error_params.errors`}),` says where (`,_jsx(_components.code,{children:`loc`}),` names the mode, e.g. `,_jsx(_components.code,{children:`[\"modes\", \"1\", \"in_person\"]`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`employee_id`}),` does not exist, is disabled or is outside your organization’s `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` (all answer the same). `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`employee_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED`})}),_jsxs(_components.td,{children:[`A mode’s `,_jsx(_components.code,{children:`custom_ef_record_id`}),` (`,_jsx(_components.code,{children:`error_params.field`}),` says which, e.g. `,_jsx(_components.code,{children:`modes.1.custom_ef_record_id`}),`) does not exist, is disabled or is not visible from the employee’s organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY`})}),_jsxs(_components.td,{children:[`That custom record is not configured for its mode’s activity category (`,_jsx(_components.code,{children:`employees_in_itinere`}),` or `,_jsx(_components.code,{children:`employees_telecommute`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`COMMUTING_RESPONSE_OVERLAP`})}),_jsxs(_components.td,{children:[`The employee already has a response whose dates overlap the record’s (whatever the weekdays), from any channel. `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`start_date`}),`, and `,_jsx(_components.code,{children:`error_params`}),` names that response, `,_jsx(_components.code,{children:`response_id`}),` (or `,_jsx(_components.code,{children:`period_id`}),` for a period that answers no survey), with its `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. Write that response again with `,_jsx(_components.a,{href:`/api-reference/employees/commuting-response-replace-v2`,children:`Replace Commuting Response (v2)`}),`, or delete it (`,_jsx(_components.a,{href:`/api-reference/employees/commuting-delete-v2`,children:_jsx(_components.code,{children:`response_ids`})}),`, or `,_jsx(_components.code,{children:`ids`}),` for a `,_jsx(_components.code,{children:`period_id`}),`) and send the record again.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`COMMUTING_RECORDS_OVERLAP`})}),_jsxs(_components.td,{children:[`An earlier record of the request, for the same employee, has dates that overlap this one’s. `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`start_date`}),`, and `,_jsx(_components.code,{children:`error_params.source_row_index`}),` is that record’s position, with its `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`. Send one record per employee and period, with every mode in it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOM_RESPONSE_INVALID`})}),_jsxs(_components.td,{children:[`A key of `,_jsx(_components.code,{children:`custom_responses`}),` is not one of your organization’s questions (`,_jsx(_components.code,{children:`error_params.reason`}),` is `,_jsx(_components.code,{children:`UNKNOWN_QUESTION`}),`), or a value is not one its column takes, such as a word in a number column or an option the select does not offer (`,_jsx(_components.code,{children:`reason`}),` is the column’s code, e.g. `,_jsx(_components.code,{children:`INVALID_VALUE`}),`). `,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`custom_responses`}),` and `,_jsx(_components.code,{children:`error_params.message`}),` names the question. Send the value as the column takes it, or leave the key out.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ROUTE_LIMIT_EXCEEDED`})}),_jsxs(_components.td,{children:[`One of the record’s routes is past the first 500 distinct ones the request leaves to measure (`,_jsx(_components.code,{children:`error_params.max`}),` is 500, and `,_jsx(_components.code,{children:`error_params.field`}),` names the record’s first mode past it, e.g. `,_jsx(_components.code,{children:`modes.1.distance_km`}),`; a route is its `,_jsx(_components.code,{children:`origin`}),`, `,_jsx(_components.code,{children:`destination`}),` and road or rail network, and a repeated one counts once). Send its `,_jsx(_components.code,{children:`distance_km`}),`, or send the record in another request.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`After the `,_jsx(_components.code,{children:`202`}),`, a job item can end `,_jsx(_components.code,{children:`failed`}),` with `,_jsx(_components.code,{children:`DISTANCE_CALCULATION_ERROR`}),` or `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),` (see\n`,_jsx(_components.a,{href:`#how-it-works`,children:`How it works`}),`).`]}),`\n`,_jsx(Heading,{level:`3`,id:`common-mistakes`,children:`Common mistakes`}),`\n`,_jsxs(_components.p,{children:[`Each one answers `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),` for the record:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Where`}),_jsx(_components.th,{children:`The record sends…`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`a field this page does not list, e.g. `,_jsx(_components.code,{children:`organization_id`}),`, or a field of a mode at the record’s level, e.g. `,_jsx(_components.code,{children:`transport_type`})]}),_jsx(_components.td,{children:`Remove it, or move it into its mode.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`an `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`, a `,_jsx(_components.code,{children:`start_date`}),` in the future (`,_jsx(_components.code,{children:`date_in_the_future`}),`) or an `,_jsx(_components.code,{children:`end_date`}),` after this year (`,_jsx(_components.code,{children:`date_after_this_year`}),`)`]}),_jsx(_components.td,{children:`Send the dates of what happened, up to Dec 31 of the current year.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`no `,_jsx(_components.code,{children:`modes`}),` (or `,_jsx(_components.code,{children:`[]`}),`) on an `,_jsx(_components.code,{children:`active`}),` record, or more than 8`]}),_jsx(_components.td,{children:`Send how the employee worked, one mode per transport and one for home.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsx(_components.td,{children:`a day in two modes`}),_jsx(_components.td,{children:`Send each day in one mode.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Record`}),_jsxs(_components.td,{children:[`two `,_jsx(_components.code,{children:`telecommuting`}),` modes`]}),_jsx(_components.td,{children:`Send all the days at home in one.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mode`}),_jsxs(_components.td,{children:[`a `,_jsx(_components.code,{children:`work_model`}),` other than `,_jsx(_components.code,{children:`in_person`}),` or `,_jsx(_components.code,{children:`telecommuting`})]}),_jsx(_components.td,{children:`Send one of the two.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mode`}),_jsxs(_components.td,{children:[`a day twice in `,_jsx(_components.code,{children:`days`}),`, a day that is not `,_jsx(_components.code,{children:`monday`}),` to `,_jsx(_components.code,{children:`sunday`}),` (e.g. `,_jsx(_components.code,{children:`0`}),`), or no days`]}),_jsx(_components.td,{children:`Send each day once, by name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`transport_type: telecommuting`})}),_jsxs(_components.td,{children:[`Send a `,_jsx(_components.code,{children:`telecommuting`}),` mode instead.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`a `,_jsx(_components.code,{children:`car`}),` without `,_jsx(_components.code,{children:`vehicle_size`}),` or `,_jsx(_components.code,{children:`fuel_type`}),`, or a `,_jsx(_components.code,{children:`motorbike`}),` without `,_jsx(_components.code,{children:`fuel_type`})]}),_jsxs(_components.td,{children:[`Add them (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`a vehicle detail its transport does not take: `,_jsx(_components.code,{children:`vehicle_size`}),` on a `,_jsx(_components.code,{children:`bus`}),`, `,_jsx(_components.code,{children:`carpool: true`}),` on a `,_jsx(_components.code,{children:`train`}),`, a `,_jsx(_components.code,{children:`fuel_type`}),` on a `,_jsx(_components.code,{children:`tram`}),`, `,_jsx(_components.code,{children:`renewable_energy`}),` without `,_jsx(_components.code,{children:`fuel_type: electric`}),`…`]}),_jsxs(_components.td,{children:[`Leave it out (`,_jsx(_components.a,{href:`#build-a-record`,children:`step 2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[`neither `,_jsx(_components.code,{children:`distance_km`}),` nor `,_jsx(_components.code,{children:`origin`}),` and `,_jsx(_components.code,{children:`destination`}),`; or, without `,_jsx(_components.code,{children:`distance_km`}),`, only one of the two places, or one with no letter or digit, such as `,_jsx(_components.code,{children:`???`})]}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`distance_km`}),`, or both places.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`in_person`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`distance_km`}),` of `,_jsx(_components.code,{children:`0`}),`, or `,_jsx(_components.code,{children:`daily_trips`}),` of `,_jsx(_components.code,{children:`0`}),` or above `,_jsx(_components.code,{children:`3`})]}),_jsx(_components.td,{children:`Send the distance above 0, and 1 to 3 trips.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`telecommuting`})}),_jsxs(_components.td,{children:[`neither `,_jsx(_components.code,{children:`days`}),` nor `,_jsx(_components.code,{children:`total_hours`}),`, or both`]}),_jsx(_components.td,{children:`Send one of the two.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`telecommuting`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`total_hours`}),` outside 0.01 to 100,000, or a commute field such as `,_jsx(_components.code,{children:`distance_km`})]}),_jsx(_components.td,{children:`Send the period’s hours worked from home, and nothing about trips.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Request-level errors: `,_jsx(_components.code,{children:`401`}),` for a missing or invalid API key, `,_jsx(_components.code,{children:`403 LOGGED_USER_NOT_MEMBER`}),` when the key’s user is not a\nmember of the organization, `,_jsx(_components.code,{children:`422 REQUEST_VALIDATION_FAILED`}),` for a malformed body (no `,_jsx(_components.code,{children:`records`}),`, more than 5,000, no\n`,_jsx(_components.code,{children:`Idempotency-Key`}),`), `,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`, `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`, and `,_jsx(_components.code,{children:`429`}),` beyond the\n`,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Limit`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1 to 5,000`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Modes per record`}),_jsx(_components.td,{children:`1 to 8 (0 to 8 when not active)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Distinct routes to measure per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`500`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per calculation chunk`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`100`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Create Employees (v2)`,icon:`plus`,href:`/api-reference/employees/create-v2`,children:_jsxs(_components.p,{children:[`The employees, and their `,_jsx(_components.code,{children:`employee_id`})]})}),_jsx(Card,{title:`Replace Commuting Response (v2)`,icon:`pen`,href:`/api-reference/employees/commuting-response-replace-v2`,children:_jsx(_components.p,{children:`Write a response again whole`})}),_jsx(Card,{title:`Delete Commuting Periods (v2)`,icon:`trash`,href:`/api-reference/employees/commuting-delete-v2`,children:_jsx(_components.p,{children:`Delete periods, or whole responses`})}),_jsx(Card,{title:`List Job Items`,icon:`list`,href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.p,{children:`The response and outcome of each record`})}),_jsx(Card,{title:`List Custom Factor Records`,icon:`database`,href:`/api-reference/custom-emission-factors/list-records`,children:_jsxs(_components.p,{children:[`The ids for `,_jsx(_components.code,{children:`custom_ef_record_id`})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Create Commuting Periods (v2)","api":"POST /v2/employees/commuting","description":"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously","tag":"BETA","href":"/api-reference/employees/commuting-create-v2"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Choose the work model","slug":"choose-the-work-model","depth":2,"children":[]},{"title":"Build a record","slug":"build-a-record","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[{"title":"How a period is counted","slug":"how-a-period-is-counted","depth":3,"children":[]}]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Query Parameters","slug":"query-parameters","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[{"title":"Common mistakes","slug":"common-mistakes","depth":3,"children":[]}]},{"title":"Limits","slug":"limits","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL: In-person","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"29\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># Goes to work every working day, by car, with no days at home. Dcycle measures the route.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># One key per batch: reuse it only to retry this same batch.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">$(\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">uuidgen\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -X\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> POST\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/employees/commuting\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_ORG_ID\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -d\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\": \"4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\": \"2026-01-01\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\": \"2026-06-30\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"client_row_id\": \"HR-1042-2026H1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\": \"in_person\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"transport_type\": \"car\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"vehicle_size\": \"medium\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"fuel_type\": \"diesel\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\": [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"origin\": \"Calle de Alcalá 1, Madrid\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"destination\": \"Paseo de la Castellana 100, Madrid\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL: Hybrid","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"41\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># Car on Monday and Tuesday, train on Wednesday, home on Thursday and Friday.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># One key per batch: reuse it only to retry this same batch.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">$(\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">uuidgen\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -X\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> POST\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/employees/commuting\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_ORG_ID\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -d\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\": \"7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\": \"2026-01-01\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\": \"2026-06-30\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\": \"in_person\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"transport_type\": \"car\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"vehicle_size\": \"medium\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"fuel_type\": \"diesel\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"carpool\": true,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\": [\"monday\", \"tuesday\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"distance_km\": 18\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\": \"in_person\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"transport_type\": \"train\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"fuel_type\": \"electric\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"renewable_energy\": \"yes\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\": [\"wednesday\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"distance_km\": 32.5\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\": \"telecommuting\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\": [\"thursday\", \"friday\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"hours_per_day\": 8\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL: Telecommute","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"25\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># Works only from home: one telecommuting mode, nothing else.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># The same employee as the In-person example, from July: a change of work model is a new period.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># One key per batch: reuse it only to retry this same batch.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">$(\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">uuidgen\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -X\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> POST\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/employees/commuting\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_ORG_ID\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -d\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\": \"4c3b2a19-0f8e-4d7c-9b6a-5f4e3d2c1b0a\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\": \"2026-07-01\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\": \"2026-12-31\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"client_row_id\": \"HR-1042-2026H2\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\": \"telecommuting\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\": [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python: every work model","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"65\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> uuid\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># One batch can mix every work model.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">response \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/employees/commuting\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> headers\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: os.environ[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"DCYCLE_API_KEY\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: os.environ[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"DCYCLE_ORG_ID\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">str\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(uuid.uuid4()), \u003c/span>\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># keep it to retry this same batch\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> json\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"> # In-person: walks to work, 1.2 km each way.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-01-01\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-06-30\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"in_person\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"transport_type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"walking\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"monday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"tuesday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"wednesday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"thursday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"friday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"distance_km\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1.2\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"> # Hybrid: bus three days a week, and only the total hours at home are known.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"3c4d5e6f-7a8b-4c9d-8e0f-2a3b4c5d6e7f\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-01-01\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-06-30\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"work_model\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"in_person\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"transport_type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"bus\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"days\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"monday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"wednesday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"friday\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"distance_km\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">9\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"work_model\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"telecommuting\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"total_hours\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">360\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"> # Telecommute: only from home, given as the total hours of the period.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-07-01\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-12-31\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"modes\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [{\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"work_model\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"telecommuting\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"total_hours\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1012.5\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"> # On leave for the period: no modes, calculated at 0 kg.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"employee_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-01-01\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-03-31\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"situation\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"inactive\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> timeout\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">60\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">response.raise_for_status()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">job \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> response.json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">print\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(job[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">], job[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"status\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">])\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"202 (one record)","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"status\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"processing\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"entity_type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"employee_commuting\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"operation\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"create\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"source\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"api_bulk\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"counts\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"submitted\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"succeeded\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"failed\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"chunks_total\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"chunks_done\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-10-20T09:12:44.031Z\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"finished_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">null\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"links\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"self\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"/v2/ingest-jobs/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"items\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"/v2/ingest-jobs/1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081/items\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"25\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"title\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Unprocessable Entity\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"status\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">422\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"code\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"BULK_RECORDS_REJECTED\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"detail\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"1 of the submitted records are invalid; nothing was written.\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"errors\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"source_row_index\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"client_row_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"HR-2041-2026H1\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"SCHEMA_INVALID\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"error_params\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"errors\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"loc\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"value_error\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"msg\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Value error, tuesday is in modes 0 and 2: each day goes in one mode\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"rejected\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"request_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200 (dry_run=true, one record)","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{ \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"dry_run\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">true\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"submitted\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"valid\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Commuting Periods (v2)","path":"/v2/employees/commuting","servers":[{"url":"https://api.dcycle.io"}],"method":"post","request":{"security":[],"parameters":{"query":{"dry_run":{"schema":[{"type":"boolean","description":"Check only: the same `422` for invalid records, nothing written, no job; `200` with `{\"dry_run\": true, \"submitted\": n, \"valid\": n}` when every record is valid. The `Idempotency-Key` header is still required, but a dry run does not check or store it."}]}},"header":{"x-api-key":{"schema":[{"type":"string","description":"Your API key (see Authentication ).","required":true}]},"x-organization-id":{"schema":[{"type":"string","description":"The organization you send as. Its employees, and those of the organizations under it that you can write to (its perimeter ), can be given records. The job and its `ingest_job.finished` webhook belong to this organization.","required":true}]},"Idempotency-Key":{"schema":[{"type":"string","description":"1 to 255 characters, one per batch, looked up per organization across every v2 bulk route. Within 24 hours, the same key with the same route and body returns the original job (with `Idempotent-Replayed: true` ) instead of writing the records again; the same key with another body or on another route is `422 IDEMPOTENCY_KEY_REUSED` , and while the first request is still being processed `409 IDEMPOTENCY_KEY_IN_PROGRESS` . After 24 hours the key is free, and a request with it is a new one. See The Idempotency-Key .","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"records":[{"type":"object","properties":{"employee_id":[{"type":"string","description":"The employee: an `id` that Create Employees (v2) answers, or of List Employees .","required":true}],"start_date":[{"type":"string","description":"First day of the period, `YYYY-MM-DD` , from 1970 to tomorrow in UTC at the latest : a period is what happened.","required":true}],"end_date":[{"type":"string","description":"Last day of the period, on or after `start_date` , at the latest Dec 31 of the current year (a full-year estimate); a later one is `date_after_this_year` .","required":true}],"situation":[{"type":"string","description":"The employee in the period: `active` , `inactive` (on leave) or `terminated` . It only labels the period: an `inactive` or `terminated` record sends the `modes` of the days worked, calculated as any other’s, or no `modes` (or `[]` ), stored as one `telecommuting` period with no day and calculated at 0 kg."}],"modes":[{"type":"object","properties":{},"description":"How the employee worked, 1 to 8 modes, required for an `active` record and optional otherwise: one `in_person` mode per transport and at most one `telecommuting` mode, each day of the week in one mode only. Each is one of the two objects below, told apart by `work_model` ."}],"custom_responses":[{"type":"object","properties":{},"description":"Answers to your organization’s own survey questions, by question key: the custom columns of the commuting table, the ones your survey adds. Each value as its column takes it (text, a number, an option of a select…), and none is required; a key that is not one of your questions is refused ( `CUSTOM_RESPONSE_INVALID` ). A formula column’s key is ignored: its value is computed, so what Get Commuting Response (v2) reads can be sent back as it is. Stored on the response’s first period, as the survey stores them. `dry_run=true` checks them too."}],"client_row_id":[{"type":"string","description":"Your own reference for the record, up to 255 characters, echoed in errors and in the job’s items."}],"work_model":[{"type":"string","description":"`telecommuting` : the time the employee worked from home.","required":true}],"transport_type":[{"type":"string","description":"How they got to work: `bicycle` , `bus` , `car` , `electric_kick_scooter` , `metro` , `motorbike` , `train` , `tram` , `trolleybus` or `walking` . It decides which vehicle details the mode takes ( step 2 ).","required":true}],"vehicle_size":[{"type":"string","description":"A `car` only, and required for it: `small` , `medium` or `large` ."}],"fuel_type":[{"type":"string","description":"What the vehicle runs on: `petrol` , `diesel` , `electric` , `hybrid` , `lpg` , `natural_gas` , `not_fuel_based` or `do_not_know` , among those its transport takes ( step 2 ). Required for a `car` and a `motorbike` ; a `bus` , `metro` , `train` or `trolleybus` sent without one (or with `\"\"` ) is `do_not_know` ."}],"renewable_energy":[{"type":"string","description":"With `fuel_type: electric` , and only with it: `yes` , `no` or `do_not_know` , whether the electricity is renewable."}],"carpool":[{"type":"boolean","description":"Whether the car is shared, which splits its emissions in 3; `false` when left out or `null` . Only a `car` can be shared: on any other transport, `true` is `SCHEMA_INVALID` ."}],"days":[{"type":"object","properties":{},"description":"The days of the week they worked from home, `monday` to `sunday` , each once and in no other mode of the record. Send them or `total_hours` ."}],"distance_km":[{"type":"number","description":"One-way distance, in km, above 0 and up to 500,000. Left out: the job works it out from `origin` and `destination` ."}],"origin":[{"type":"string","description":"Where the commute starts, e.g. the home address, 1 to 500 characters once trimmed (a blank one counts as not sent). Without `distance_km` the job measures the distance: send it with `destination` , each with a letter or a digit to find it by. With `distance_km` nothing is measured, and either place may be sent alone, to be stored."}],"destination":[{"type":"string","description":"Where it ends, e.g. the office address, as `origin` ."}],"daily_trips":[{"type":"integer","description":"Round trips each of those days, 1 to 3: `1` is there and back, twice the distance."}],"custom_ef_record_id":[{"type":"string","description":"As in an `in_person` mode, for the days at home: its `activity_categories` must include `employees_telecommute` ."}],"total_hours":[{"type":"number","description":"The hours worked from home in the whole period, from 0.01 to 100,000, when the days are not known. Send it instead of `days` , never with them (see How a period is counted )."}],"hours_per_day":[{"type":"integer","description":"Hours worked a day, 0 to 24. With `days` , a factor per hour prices each day at home at these hours (with `0` , no emissions) and a factor per day counts the days whatever the hours. With `total_hours` , a factor per hour reads those hours whatever this value, and a factor per day reads `total_hours / hours_per_day` days (with `0` , no emissions). See How a period is counted ."}]},"description":"The records to create, 1 to 5,000: one per employee and period. A field not listed here is rejected ( `SCHEMA_INVALID` ).","required":true}]}}],"examples":{"example":{"value":{"records":{"employee_id":"\u003cstring>","start_date":"\u003cstring>","end_date":"\u003cstring>","situation":"\u003cstring>","modes":{},"custom_responses":{},"client_row_id":"\u003cstring>","work_model":"\u003cstring>","transport_type":"\u003cstring>","vehicle_size":"\u003cstring>","fuel_type":"\u003cstring>","renewable_energy":"\u003cstring>","carpool":true,"days":{},"distance_km":123,"origin":"\u003cstring>","destination":"\u003cstring>","daily_trips":123,"custom_ef_record_id":"\u003cstring>","total_hours":123,"hours_per_day":123}}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"dcyleio","siteName":"Dcycle Platform Docs","title":"Create Commuting Periods (v2) - Dcycle Platform Docs","navMaps":{"firstHrefInVersion":{"New API (Recommended)":{"href":"/api-reference/employees/commuting-create-v2","matchLevel":0},"Legacy API":{"href":"/api-reference/introduction","matchLevel":3}},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T16:29:58.376Z","originalFileLocation":"api-reference/employees/commuting-create-v2.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Commuting Periods (v2) - Dcycle Platform Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://code.dcycle.io/api-reference/employees/commuting-create-v2\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dcyleio.mintlify.site/_mintlify/api/og/v2?division=Employees\u0026amp;title=Create+Commuting+Periods+%28v2%29\u0026amp;description=Say+how+up+to+5%2C000+employees+got+to+work+in+a+period%2C+mode+by+mode%3B+distances+and+emissions+are+calculated+asynchronously\u0026amp;theme=d115002796afa8d4456400b7\u0026amp;signature=dea2b8760c5e90c930c73b79affe6d110109652c502bed8cd564af887f88b985\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Commuting Periods (v2) - Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dcyleio.mintlify.site/_mintlify/api/og/v2?division=Employees\u0026amp;title=Create+Commuting+Periods+%28v2%29\u0026amp;description=Say+how+up+to+5%2C000+employees+got+to+work+in+a+period%2C+mode+by+mode%3B+distances+and+emissions+are+calculated+asynchronously\u0026amp;theme=d115002796afa8d4456400b7\u0026amp;signature=dea2b8760c5e90c930c73b79affe6d110109652c502bed8cd564af887f88b985\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006ad4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://code.dcycle.io/api-reference/employees/commuting-create-v2\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/employees/commuting-create-v2.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://code.dcycle.io/#organization\",\"name\":\"Dcycle Platform Docs\",\"url\":\"https://code.dcycle.io\"},{\"@type\":\"WebSite\",\"@id\":\"https://code.dcycle.io#website\",\"name\":\"Dcycle Platform Docs\",\"url\":\"https://code.dcycle.io\",\"publisher\":{\"@id\":\"https://code.dcycle.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2#webpage\",\"url\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2\",\"name\":\"Create Commuting Periods (v2)\",\"description\":\"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\",\"dateModified\":\"2026-11-03T16:29:58.376Z\",\"isPartOf\":{\"@id\":\"https://code.dcycle.io#website\"},\"breadcrumb\":{\"@id\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Employees\",\"item\":\"https://code.dcycle.io/api-reference/employees/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Commuting Periods (v2)\",\"item\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2#apireference\",\"headline\":\"Create Commuting Periods (v2)\",\"name\":\"Create Commuting Periods (v2)\",\"description\":\"Say how up to 5,000 employees got to work in a period, mode by mode; distances and emissions are calculated asynchronously\",\"url\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2\",\"mainEntityOfPage\":{\"@id\":\"https://code.dcycle.io/api-reference/employees/commuting-create-v2#webpage\"},\"dateModified\":\"2026-11-03T16:29:58.376Z\",\"publisher\":{\"@id\":\"https://code.dcycle.io/#organization\"},\"isPartOf\":{\"@id\":\"https://code.dcycle.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dcycle Platform Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Dcycle Platform Docs","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":"/docs/introduction"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/emissions/overview"}]},{"tab":"API","versions":[{"version":"New API (Recommended)","groups":[{"group":"Introduction","pages":[{"title":"API Introduction","href":"/api-reference/introduction"},{"title":"Changelog","href":"/api-reference/changelog"},{"title":"Errors","href":"/api-reference/errors"},{"title":"OpenAPI \u0026 SDKs","href":"/api-reference/openapi-sdks"},{"title":"Rate Limits","href":"/api-reference/rate-limits"}]},{"group":"Business Travels","pages":[{"title":"Business Travels API","href":"/api-reference/business-travels/overview"},{"title":"Get Business Travel Totals","api":"GET /v1/business-travels/totals","href":"/api-reference/business-travels/totals"},{"title":"Get Business Travel Version History","api":"GET /v1/business-travels/{business_travel_id}/versions","href":"/api-reference/business-travels/versions"},{"title":"List Business Travels","api":"GET /v1/business-travels","href":"/api-reference/business-travels/list"},{"title":"Get Business Travel","api":"GET /v1/business-travels/{business_travel_id}","href":"/api-reference/business-travels/get"},{"title":"Create Business Travel","api":"POST /v1/business-travels","deprecated":true,"href":"/api-reference/business-travels/create"},{"title":"Create Business Travels (v2)","api":"POST /v2/business-travels","tag":"BETA","href":"/api-reference/business-travels/create-v2"},{"title":"Delete Business Travels (v2)","api":"POST /v2/business-travels/delete","tag":"BETA","href":"/api-reference/business-travels/delete-v2"},{"title":"Update Business Travel","api":"PATCH /v1/business-travels/{business_travel_id}","href":"/api-reference/business-travels/update"},{"title":"Delete Business Travel","api":"DELETE /v1/business-travels/{business_travel_id}","deprecated":true,"href":"/api-reference/business-travels/delete"},{"title":"Bulk Delete Business Travels","api":"POST /v1/business-travels/bulk-delete","deprecated":true,"href":"/api-reference/business-travels/bulk-delete"},{"title":"Bulk Delete Business Travels by Filters","api":"POST /v1/business-travels/bulk-delete-by-filters","href":"/api-reference/business-travels/bulk-delete-by-filters"}]},{"group":"Custom Emission Factors","pages":[{"title":"Custom Emission Factor Databases","tag":"BETA","href":"/api-reference/custom-emission-factors/overview"},{"title":"List Custom Database Versions","api":"GET /v1/emission-factors/custom-databases/{database_id}/versions","tag":"BETA","href":"/api-reference/custom-emission-factors/list-versions"},{"title":"List Custom Databases","api":"GET /v1/emission-factors/custom-databases","tag":"BETA","href":"/api-reference/custom-emission-factors/list-databases"},{"title":"List Custom Records","api":"GET /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records","tag":"BETA","href":"/api-reference/custom-emission-factors/list-records"},{"title":"Get Custom Record","api":"GET /v1/emission-factors/custom-databases/record/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/get-record"},{"title":"Create Custom Database","api":"POST /v1/emission-factors/custom-databases","tag":"BETA","href":"/api-reference/custom-emission-factors/create-database"},{"title":"Create Custom Database Version","api":"POST /v1/emission-factors/custom-databases/{database_id}/versions","tag":"BETA","href":"/api-reference/custom-emission-factors/create-version"},{"title":"Create Custom Record","api":"POST /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records","tag":"BETA","href":"/api-reference/custom-emission-factors/create-record"},{"title":"Update Custom Record","api":"PATCH /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/update-record"},{"title":"Delete Custom Record","api":"DELETE /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/delete-record"}]},{"group":"Custom Emission Groups","pages":[{"title":"List Custom Emission Groups","api":"GET /custom_emission_groups/light","href":"/api-reference/custom-emission-groups/list-light"}]},{"group":"Custom KPI","pages":[{"title":"Custom KPI","href":"/api-reference/custom-kpi/overview"},{"title":"List Dataset Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/values","href":"/api-reference/custom-kpi/list-dataset-values"},{"title":"List Datasets","api":"GET /v1/custom-kpi-datasets","href":"/api-reference/custom-kpi/list-datasets"},{"title":"Get Dataset","api":"GET /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/get-dataset"},{"title":"Create Dataset","api":"POST /v1/custom-kpi-datasets","href":"/api-reference/custom-kpi/create-dataset"},{"title":"Download Excel","api":"POST /v1/custom-kpi-datasets/{dataset_id}/download_excel","href":"/api-reference/custom-kpi/download-excel"},{"title":"Submit Response","api":"POST /v1/custom-kpi-datasets/{dataset_id}/responses","href":"/api-reference/custom-kpi/submit-response"},{"title":"Update Dataset","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/update-dataset"},{"title":"Delete Dataset","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/delete-dataset"},{"title":"Presigned URL","api":"POST /v1/custom-kpi-datasets/{dataset_id}/responses/attachments/presigned-url","href":"/api-reference/custom-kpi/presigned-url"},{"group":"Assignments","expanded":true,"pages":[{"title":"List Assignments","api":"GET /v1/custom-kpi-datasets/{dataset_id}/assignments","href":"/api-reference/custom-kpi/list-assignments"},{"title":"Create Assignment","api":"POST /v1/custom-kpi-datasets/{dataset_id}/assignments","href":"/api-reference/custom-kpi/create-assignment"},{"title":"Update Assignment","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/assignments/{assignment_id}","href":"/api-reference/custom-kpi/update-assignment"},{"title":"Delete Assignment","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/assignments/{assignment_id}","href":"/api-reference/custom-kpi/delete-assignment"}]},{"group":"Campaigns","expanded":true,"pages":[{"title":"Assignment Versions","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/versions","href":"/api-reference/custom-kpi/assignment-versions"},{"title":"Get Assignment Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/values","href":"/api-reference/custom-kpi/get-assignment-values"},{"title":"List Campaign Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/values","href":"/api-reference/custom-kpi/list-campaign-values"},{"title":"List Campaigns","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns","href":"/api-reference/custom-kpi/list-campaigns"},{"title":"List Response Sets","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/response-sets","href":"/api-reference/custom-kpi/list-response-sets"},{"title":"Get Campaign","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/get-campaign"},{"title":"Add Campaign Recipient","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments","href":"/api-reference/custom-kpi/add-campaign-recipient"},{"title":"Create Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns","href":"/api-reference/custom-kpi/create-campaign"},{"title":"Lock Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/lock","href":"/api-reference/custom-kpi/lock-campaign"},{"title":"Resend Invite","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/resend","href":"/api-reference/custom-kpi/resend-invite"},{"title":"Send Invites","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/send-invites","href":"/api-reference/custom-kpi/send-invites"},{"title":"Unlock Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/unlock","href":"/api-reference/custom-kpi/unlock-campaign"},{"title":"Edit Assignment Values","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/values","href":"/api-reference/custom-kpi/edit-assignment-values"},{"title":"Update Campaign","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/update-campaign"},{"title":"Delete Campaign","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/delete-campaign"},{"title":"Remove Campaign Recipient","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}","href":"/api-reference/custom-kpi/remove-campaign-recipient"}]},{"group":"KPIs","expanded":true,"pages":[{"title":"Create KPI","api":"POST /v1/custom-kpi-datasets/{dataset_id}/kpis","href":"/api-reference/custom-kpi/create-kpi"},{"title":"Update KPI","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/kpis/{kpi_id}","href":"/api-reference/custom-kpi/update-kpi"},{"title":"Delete KPI","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/kpis/{kpi_id}","href":"/api-reference/custom-kpi/delete-kpi"}]}]},{"group":"Dashboards","pages":[{"title":"Dashboards API","href":"/api-reference/dashboards/overview"},{"title":"List Dashboards","api":"GET /v2/dashboard","href":"/api-reference/dashboards/list"},{"title":"Get Dashboard","api":"GET /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/get"},{"title":"Create Dashboard","api":"POST /v2/dashboard","href":"/api-reference/dashboards/create"},{"title":"Update Dashboard","api":"PATCH /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/update"},{"title":"Delete Dashboard","api":"DELETE /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/delete"}]},{"group":"Datasets","pages":[{"title":"Get Dataset Schema","api":"GET /v1/datasets/{key}/schema","href":"/api-reference/datasets/schema"},{"title":"List Available Datasets","api":"GET /v1/datasets","href":"/api-reference/datasets/list"},{"title":"Query datasets","api":"POST /v1/datasets/{key}/query","href":"/api-reference/datasets/query"}]},{"group":"Emissions","pages":[{"title":"Emissions","href":"/api-reference/emissions/overview"},{"title":"Get Emissions Summary","api":"GET /v1/total-impacts","href":"/api-reference/emissions/get-summary"}]},{"group":"Employees","pages":[{"title":"Employees API","href":"/api-reference/employees/overview"},{"title":"List Employees","api":"GET /v1/employees","href":"/api-reference/employees/list"},{"title":"List Employees (V2)","api":"GET /v2/employees","href":"/api-reference/employees/list-v2"},{"title":"List Survey Rows","api":"GET /v2/employees/survey-rows","href":"/api-reference/employees/survey-rows"},{"title":"Queue Pending Mobility Survey Export","api":"GET /v2/employees/pending-survey/download","href":"/api-reference/employees/pending-survey-download"},{"title":"Get Commuting Response (v2)","api":"GET /v2/employees/commuting/responses/{response_id}","tag":"BETA","href":"/api-reference/employees/commuting-response-get-v2"},{"title":"Get Employee","api":"GET /v1/employees/{employee_id}","description":"Retrieve a specific employee by ID with their commuting periods","href":"/api-reference/employees/get"},{"title":"Create Commuting Periods (v2)","api":"POST /v2/employees/commuting","tag":"BETA","href":"/api-reference/employees/commuting-create-v2"},{"title":"Create Employee","api":"POST /v1/employees","description":"Add a new employee to your organization for commuting tracking","deprecated":true,"href":"/api-reference/employees/create"},{"title":"Create Employees (v2)","api":"POST /v2/employees","tag":"BETA","href":"/api-reference/employees/create-v2"},{"title":"Delete Commuting Periods (v2)","api":"POST /v2/employees/commuting/delete","tag":"BETA","href":"/api-reference/employees/commuting-delete-v2"},{"title":"Delete Employees (v2)","api":"POST /v2/employees/delete","tag":"BETA","href":"/api-reference/employees/delete-v2"},{"title":"Download Survey Rows","api":"POST /v2/employees/survey-rows/export","href":"/api-reference/employees/survey-rows-export"},{"title":"Resend Commuting Survey","api":"POST /v1/employees/resend-survey","href":"/api-reference/employees/resend-survey"},{"title":"Replace Commuting Response (v2)","api":"PUT /v2/employees/commuting/responses/{response_id}","tag":"BETA","href":"/api-reference/employees/commuting-response-replace-v2"},{"title":"Update Employee","api":"PATCH /v1/employees/{employee_id}","href":"/api-reference/employees/update"},{"title":"Delete Employee","api":"DELETE /v1/employees/{employee_id}","deprecated":true,"href":"/api-reference/employees/delete"},{"title":"Bulk Delete Employees","api":"POST /v2/employees/bulk-delete","deprecated":true,"href":"/api-reference/employees/bulk-delete"},{"title":"Bulk Delete Employees by Filters","api":"POST /v2/employees/bulk-delete-by-filters","href":"/api-reference/employees/bulk-delete-by-filters"},{"title":"CSV Import","api":"POST /v1/employees/csv","href":"/api-reference/employees/csv-import"},{"title":"Recalculate Employees","api":"POST /v2/employees/recalculate","href":"/api-reference/employees/recalculate"},{"group":"Commuting Periods","expanded":true,"pages":[{"title":"Calculation Steps","api":"GET /v1/employee-historic/{employee_historic_id}/steps","href":"/api-reference/employees/commuting-periods/calculation-steps"},{"title":"List Commuting Periods","api":"GET /v1/employee-historic","href":"/api-reference/employees/commuting-periods/list"},{"title":"Get Commuting Period","api":"GET /v1/employee-historic/{employee_historic_id}","href":"/api-reference/employees/commuting-periods/get"},{"title":"Create Commuting Period","api":"POST /v1/employee-historic","deprecated":true,"href":"/api-reference/employees/commuting-periods/create"},{"title":"Update Commuting Period","api":"PATCH /v1/employee-historic/{employee_historic_id}","href":"/api-reference/employees/commuting-periods/update"},{"title":"Delete Commuting Period","api":"DELETE /v1/employee-historic/{employee_historic_id}","deprecated":true,"href":"/api-reference/employees/commuting-periods/delete"},{"title":"CSV Upload","api":"POST /v1/employee-historic/bulk/csv","deprecated":true,"href":"/api-reference/employees/commuting-periods/csv-upload"}]},{"group":"Survey Templates","expanded":true,"pages":[{"title":"Survey Templates API","href":"/api-reference/employees/survey-templates/overview"},{"title":"List Survey Templates","api":"GET /v1/employee-survey-templates","href":"/api-reference/employees/survey-templates/list"},{"title":"Get Survey Template","api":"GET /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/get"},{"title":"Create Survey Template","api":"POST /v1/employee-survey-templates","href":"/api-reference/employees/survey-templates/create"},{"title":"Block Template","api":"PATCH /v1/employee-survey-templates/{template_id}/block","href":"/api-reference/employees/survey-templates/block"},{"title":"Set Default Template","api":"PATCH /v1/employee-survey-templates/{template_id}/default","href":"/api-reference/employees/survey-templates/set-default"},{"title":"Unblock Template","api":"PATCH /v1/employee-survey-templates/{template_id}/unblock","href":"/api-reference/employees/survey-templates/unblock"},{"title":"Update Survey Template","api":"PATCH /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/update"},{"title":"Delete Survey Template","api":"DELETE /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/delete"},{"title":"Clone Survey Template","api":"POST /v1/employee-survey-templates/{template_id}/clone","href":"/api-reference/employees/survey-templates/clone"}]}]},{"group":"Facilities","pages":[{"title":"Facilities API","href":"/api-reference/facilities/overview"},{"title":"Get Facility Version History","api":"GET /v1/facilities/{facility_id}/versions","href":"/api-reference/facilities/versions"},{"title":"List Facilities","api":"GET /v1/facilities","href":"/api-reference/facilities/list"},{"title":"Get Facility","api":"GET /v1/facilities/{facility_id}","href":"/api-reference/facilities/get"},{"title":"Create Facilities (v2)","api":"POST /v2/facilities","tag":"BETA","href":"/api-reference/facilities/create-v2"},{"title":"Create Facility","api":"POST /v1/facilities","deprecated":true,"href":"/api-reference/facilities/create"},{"title":"Create Waste Water Facility","api":"POST /v1/facilities/waste_water","deprecated":true,"href":"/api-reference/facilities/create-waste-water"},{"title":"Delete Facilities (v2)","api":"POST /v2/facilities/delete","tag":"BETA","href":"/api-reference/facilities/delete-v2"},{"title":"Update Facility","api":"PUT /v1/facilities/{facility_id}","href":"/api-reference/facilities/update"},{"title":"Delete Facility","api":"DELETE /v1/facilities/{facility_id}","deprecated":true,"href":"/api-reference/facilities/delete"}]},{"group":"Files","pages":[{"title":"Files","href":"/api-reference/files/overview"},{"title":"Get a File's Sheets","api":"GET /v2/files/{file_id}/sheets","tag":"BETA","href":"/api-reference/files/sheets-v2"},{"title":"List File Readings","api":"GET /v1/files/readings","href":"/api-reference/files/readings"},{"title":"Get a File (v2)","api":"GET /v2/files/{file_id}","tag":"BETA","href":"/api-reference/files/get-v2"},{"title":"Create Records From File Reading","api":"POST /v1/files/readings","href":"/api-reference/files/create-records"},{"title":"Retry File Processing","api":"POST /v1/files/send-event","href":"/api-reference/files/process"},{"title":"Update File Reading","api":"PUT /v1/files/readings/{file_reading_id}","href":"/api-reference/files/update-reading"},{"title":"Open an Import Session","api":"POST /v2/files/{file_id}/import-sessions","tag":"BETA","href":"/api-reference/files/import-sessions-v2"},{"title":"Upload a File (v2)","api":"POST /v2/files","tag":"BETA","href":"/api-reference/files/upload-v2"},{"title":"Upload Files","api":"POST /v1/files/presigned-urls","href":"/api-reference/files/upload"}]},{"group":"Historical Emissions","pages":[{"title":"Historical Emissions","href":"/api-reference/historical-emissions/overview"},{"title":"Get Historical Emission Version History","api":"GET /v1/historical-emissions/{historical_emission_id}/versions","href":"/api-reference/historical-emissions/versions"},{"title":"List Historical Emissions","api":"GET /v1/historical-emissions/","href":"/api-reference/historical-emissions/list"},{"title":"Get Historical Emission","api":"GET /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/get"},{"title":"Create Historical Emission","api":"POST /v1/historical-emissions/","href":"/api-reference/historical-emissions/create"},{"title":"Update Historical Emission","api":"PATCH /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/update"},{"title":"Delete Historical Emission","api":"DELETE /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/delete"}]},{"group":"Hotel Stays","pages":[{"title":"Hotel Stays API","href":"/api-reference/hotel-stays/overview"},{"title":"Get Hotel Stay Totals","api":"GET /v1/hotel-stays/totals","href":"/api-reference/hotel-stays/totals"},{"title":"Hotel Stay Calculation Steps","api":"GET /v1/hotel-stays/{hotel_stay_id}/steps","href":"/api-reference/hotel-stays/impact-calculation"},{"title":"List Available Countries","api":"GET /v1/hotel-stays/available-countries","href":"/api-reference/hotel-stays/available-countries"},{"title":"List Hotel Stays","api":"GET /v1/hotel-stays","href":"/api-reference/hotel-stays/list"},{"title":"Get Hotel Stay","api":"GET /v1/hotel-stays/{hotel_stay_id}","href":"/api-reference/hotel-stays/get"},{"title":"Create Hotel Stay","api":"POST /v1/hotel-stays","deprecated":true,"href":"/api-reference/hotel-stays/create"},{"title":"Create Hotel Stays (v2)","api":"POST /v2/hotel-stays","tag":"BETA","href":"/api-reference/hotel-stays/create-v2"},{"title":"Delete Hotel Stays (v2)","api":"POST /v2/hotel-stays/delete","tag":"BETA","href":"/api-reference/hotel-stays/delete-v2"},{"title":"Update Hotel Stay","api":"PATCH /v1/hotel-stays/{hotel_stay_id}","href":"/api-reference/hotel-stays/update"},{"title":"Delete Hotel Stay","api":"DELETE /v1/hotel-stays/{hotel_stay_id}","deprecated":true,"href":"/api-reference/hotel-stays/delete"},{"title":"Bulk Delete Hotel Stays","api":"POST /v1/hotel-stays/bulk-delete","deprecated":true,"href":"/api-reference/hotel-stays/bulk-delete"},{"title":"Bulk Delete Hotel Stays by Filters","api":"POST /v1/hotel-stays/bulk-delete-by-filters","href":"/api-reference/hotel-stays/bulk-delete-by-filters"},{"title":"CSV Upload","api":"POST /v1/hotel-stays/bulk/csv","deprecated":true,"href":"/api-reference/hotel-stays/csv-upload"},{"title":"Recalculate Hotel Stays","api":"POST /v1/hotel-stays/recalculate","href":"/api-reference/hotel-stays/recalculate"}]},{"group":"Imports","pages":[{"title":"Imports","href":"/api-reference/imports/overview"},{"title":"Get Import Rows","api":"GET /v2/imports/{import_id}/rows","href":"/api-reference/imports/get-rows"},{"title":"Get Import Status","api":"GET /v2/imports/{import_id}/status","href":"/api-reference/imports/get-status"},{"title":"List Import Sessions","api":"GET /v2/imports/sessions","href":"/api-reference/imports/list"},{"title":"Get Provider Options","api":"GET /v2/imports/options/{source_key}","href":"/api-reference/imports/get-options-source"},{"title":"Get Import Template","api":"GET /v2/imports/templates/{template_id}","href":"/api-reference/imports/get-template"},{"title":"Own Workforce Import Templates","href":"/api-reference/imports/own-workforce-templates"},{"title":"Get Unique Values","api":"POST /v2/imports/{import_id}/unique-values","href":"/api-reference/imports/get-unique-values"},{"title":"Confirm Mapping","api":"POST /v2/imports/{import_id}/mapping","href":"/api-reference/imports/confirm-mapping"},{"title":"Create Import Session","api":"POST /v2/imports/sessions","href":"/api-reference/imports/create-session"},{"title":"Delete Import Rows","api":"POST /v2/imports/{import_id}/rows/delete","href":"/api-reference/imports/delete-rows"},{"title":"Submit Import","api":"POST /v2/imports/{import_id}/submit","href":"/api-reference/imports/submit"},{"title":"Suggest Mapping","api":"POST /v2/imports/{import_id}/mapping/suggest","href":"/api-reference/imports/suggest-mapping"},{"title":"Validate Import","api":"POST /v2/imports/{import_id}/validate","href":"/api-reference/imports/validate"},{"title":"Patch Import Rows","api":"PATCH /v2/imports/{import_id}/rows","href":"/api-reference/imports/patch-rows"},{"title":"Delete Import Session","api":"DELETE /v2/imports/sessions/{import_id}","href":"/api-reference/imports/delete-session"}]},{"group":"Ingest Jobs","pages":[{"title":"How Bulk Ingestion Works","tag":"BETA","href":"/api-reference/ingest-jobs/overview"},{"title":"List Ingest Job Items","api":"GET /v2/ingest-jobs/{job_id}/items","tag":"BETA","href":"/api-reference/ingest-jobs/list-items"},{"title":"List Ingest Jobs","api":"GET /v2/ingest-jobs","tag":"BETA","href":"/api-reference/ingest-jobs/list"},{"title":"Get Ingest Job","api":"GET /v2/ingest-jobs/{job_id}","tag":"BETA","href":"/api-reference/ingest-jobs/get"}]},{"group":"Invoices","pages":[{"title":"Invoices API","href":"/api-reference/invoices/overview"},{"title":"Get Invoice Totals","api":"GET /v1/invoices/totals","href":"/api-reference/invoices/totals"},{"title":"List Invoice Filter Options","api":"GET /v1/invoices/filter-options","href":"/api-reference/invoices/filter-options"},{"title":"List Invoices","api":"GET /v1/invoices","href":"/api-reference/invoices/list"},{"title":"List Refrigerant Gases","api":"GET /v1/recharge/gases","href":"/api-reference/invoices/refrigerant-gases-list"},{"title":"List Stationary Fuels","api":"GET /v1/stationary/fuels","href":"/api-reference/invoices/stationary-fuels-list"},{"title":"List Suppliers (v2)","api":"GET /v2/suppliers","href":"/api-reference/invoices/suppliers-list-v2"},{"title":"Get Invoice","api":"GET /v1/invoices/{invoice_id}","href":"/api-reference/invoices/get"},{"title":"Create District Cooling Invoices (v2)","api":"POST /v2/invoices/district-cooling","tag":"BETA","href":"/api-reference/invoices/district-cooling-create-v2"},{"title":"Create District Heating Invoices (v2)","api":"POST /v2/invoices/district-heating","tag":"BETA","href":"/api-reference/invoices/district-heating-create-v2"},{"title":"Create Electricity Invoices (v2)","api":"POST /v2/invoices/electricity","tag":"BETA","href":"/api-reference/invoices/electricity-create-v2"},{"title":"Create Fuel Invoices (v2)","api":"POST /v2/invoices/fuels","tag":"BETA","href":"/api-reference/invoices/fuels-create-v2"},{"title":"Create Invoice","api":"POST /v1/invoices","deprecated":true,"href":"/api-reference/invoices/create"},{"title":"Create Process Invoices (v2)","api":"POST /v2/invoices/process","tag":"BETA","href":"/api-reference/invoices/process-create-v2"},{"title":"Create Refrigerant Invoices (v2)","api":"POST /v2/invoices/refrigerants","tag":"BETA","href":"/api-reference/invoices/refrigerants-create-v2"},{"title":"Create Water Invoices (v2)","api":"POST /v2/invoices/water","tag":"BETA","href":"/api-reference/invoices/water-create-v2"},{"title":"Delete Invoices (v2)","api":"POST /v2/invoices/delete","tag":"BETA","href":"/api-reference/invoices/delete-v2"},{"title":"Replace Invoice","api":"PUT /v1/invoices/{invoice_id}","href":"/api-reference/invoices/replace"},{"title":"Update Invoice","api":"PATCH /v1/invoices/{invoice_id}","href":"/api-reference/invoices/update"},{"title":"Delete Invoice","api":"DELETE /v1/invoices/{invoice_id}","deprecated":true,"href":"/api-reference/invoices/delete"},{"title":"Bulk Delete Invoices","api":"POST /v1/invoices/bulk-delete","deprecated":true,"href":"/api-reference/invoices/bulk-delete"},{"title":"Bulk Delete Invoices by Filters","api":"POST /v1/invoices/bulk-delete-by-filters","href":"/api-reference/invoices/bulk-delete-by-filters"},{"title":"Bulk Update","api":"POST /v1/invoices/bulk-update","href":"/api-reference/invoices/bulk-update"},{"title":"Recalculate Invoices","api":"POST /v1/invoices/recalculate","href":"/api-reference/invoices/recalculate"},{"title":"Create Invoice with PDF Attachment","href":"/api-reference/invoices/invoice-with-pdf"},{"title":"Invoice Comments","href":"/api-reference/invoices/comments"}]},{"group":"Life Cycle Assessment (LCA)","pages":[{"title":"LCA API","href":"/api-reference/lca/overview"},{"title":"Get LCA Calculation Errors","api":"GET /lca/portfolio/{lca_id}/calculation-errors","href":"/api-reference/lca/calculation-errors"},{"title":"Get LCA Dashboard","api":"GET /lca/portfolio/{lca_id}/dashboard","href":"/api-reference/lca/dashboard"},{"title":"List LCA Portfolios","api":"GET /lca/portfolio","href":"/api-reference/lca/list"},{"title":"Get LCA Impacts","api":"GET /lca/impacts/{lca_id}","href":"/api-reference/lca/impacts"},{"title":"Get LCA Portfolio","api":"GET /lca/portfolio/{lca_id}","href":"/api-reference/lca/get"},{"title":"Validate LCA","api":"GET /lca/validate/{lca_id}","href":"/api-reference/lca/validate"},{"title":"Create LCA from Excel","api":"POST /lca/create-from-excel","href":"/api-reference/lca/create-from-excel"},{"title":"Create LCA from JSON","api":"POST /lca/create-from-json","href":"/api-reference/lca/create-from-json"},{"title":"Create LCA Portfolio","api":"POST /v1/lca/portfolio","href":"/api-reference/lca/create"},{"title":"Export LCA to Excel","api":"POST /lca/export-xlsx/{lca_id}","href":"/api-reference/lca/export-xlsx"},{"title":"Update LCA Portfolio","api":"PATCH /lca/portfolio/{lca_id}","href":"/api-reference/lca/update"},{"title":"Delete LCA Portfolio","api":"DELETE /lca/portfolio/{lca_id}","href":"/api-reference/lca/delete"}]},{"group":"Logistic Hubs","pages":[{"title":"Logistic Hubs API","href":"/api-reference/logistic-hubs/overview"},{"title":"List Logistic Hubs","api":"GET /v1/logistic-hubs","href":"/api-reference/logistic-hubs/list"},{"title":"Get Logistic Hub","api":"GET /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/get"},{"title":"Create Logistic Hub","api":"POST /v1/logistic-hubs","href":"/api-reference/logistic-hubs/create"},{"title":"Create Logistic Hubs (v2)","api":"POST /v2/logistic-hubs","tag":"BETA","href":"/api-reference/logistic-hubs/create-v2"},{"title":"Update Logistic Hub","api":"PUT /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/update"},{"title":"Delete Logistic Hub","api":"DELETE /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/delete"}]},{"group":"Logistics","pages":[{"title":"Logistics API","href":"/api-reference/logistics/overview"},{"title":"Export Detailed Report","api":"GET /v1/logistics/report/export","href":"/api-reference/logistics/get-report-export"},{"title":"Generate Report","api":"GET /v1/logistics/report","href":"/api-reference/logistics/get-report"},{"title":"Get Logistics Packages (v2)","api":"GET /v2/logistics/packages","tag":"BETA","href":"/api-reference/logistics/get-packages-v2"},{"title":"Get Logistics Summary","api":"GET /v1/logistics/summary","href":"/api-reference/logistics/get-summary"},{"title":"List Available Fuel Types","api":"GET /v1/logistics/fuels","href":"/api-reference/logistics/list-fuels"},{"title":"List Available Vehicle Types","api":"GET /v1/logistics/tocs","href":"/api-reference/logistics/list-tocs"},{"title":"List Clients","api":"GET /v1/logistics/clients","href":"/api-reference/logistics/list-clients"},{"title":"List HOCs","api":"GET /v1/logistics/hocs","href":"/api-reference/logistics/list-hocs"},{"title":"List Logistics Hubs","api":"GET /v1/logistics/hubs","href":"/api-reference/logistics/list-hubs"},{"title":"List Packages","api":"GET /v1/logistics/packages","href":"/api-reference/logistics/list-packages"},{"title":"Get Package by ID","api":"GET /v1/logistics/packages/{package_id}","href":"/api-reference/logistics/get-package"},{"title":"CSV Upload","api":"POST /v1/logistics/upload","href":"/api-reference/logistics/upload"},{"group":"Recharges","expanded":true,"pages":[{"title":"List Logistics Recharges","api":"GET /v1/logistics/recharges","href":"/api-reference/logistics/list-recharges"},{"title":"List Recharge Filter Values","api":"GET /v1/logistics/recharges/unique-values","href":"/api-reference/logistics/recharges-unique-values"},{"title":"Create Logistics Recharge","api":"POST /v1/logistics/recharges","href":"/api-reference/logistics/create-recharge"},{"title":"Delete Logistics Recharge","api":"DELETE /v1/logistics/recharges/{recharge_id}","href":"/api-reference/logistics/delete-recharge"},{"title":"Batch Delete Logistics Recharges","api":"POST /v1/logistics/recharges/batch-delete","href":"/api-reference/logistics/batch-delete-recharges"},{"title":"Bulk Delete Recharges by Filters","api":"POST /v1/logistics/recharges/bulk-delete-by-filters","href":"/api-reference/logistics/recharges-bulk-delete-by-filters"},{"title":"Create Logistics Recharges (Bulk)","api":"POST /v1/logistics/recharges/bulk","href":"/api-reference/logistics/create-recharges-bulk"}]},{"group":"Requests","expanded":true,"pages":[{"title":"List Logistics Requests","api":"GET /v1/logistics/requests","href":"/api-reference/logistics/list-requests"},{"title":"List Shipment Filter Values","api":"GET /v1/logistics/requests/unique-values","href":"/api-reference/logistics/requests-unique-values"},{"title":"Create Logistics Request","api":"POST /v1/logistics/requests","href":"/api-reference/logistics/create-request"},{"title":"Create Logistics Requests (v2)","api":"POST /v2/logistics/requests","tag":"BETA","href":"/api-reference/logistics/create-requests-v2"},{"title":"Delete Logistics Requests (v2)","api":"POST /v2/logistics/requests/delete","tag":"BETA","href":"/api-reference/logistics/delete-requests-v2"},{"title":"Delete Logistics Request","api":"DELETE /v1/logistics/requests/{request_id}","href":"/api-reference/logistics/delete-request"},{"title":"Batch Delete Logistics Requests","api":"POST /v1/logistics/requests/batch-delete","href":"/api-reference/logistics/batch-delete-requests"},{"title":"Bulk Delete Requests by Filters","api":"POST /v1/logistics/requests/bulk-delete-by-filters","href":"/api-reference/logistics/requests-bulk-delete-by-filters"},{"title":"Create Logistics Requests (Bulk)","api":"POST /v1/logistics/requests/bulk","href":"/api-reference/logistics/create-requests-bulk"}]}]},{"group":"Organizations","pages":[{"title":"Organizations API","href":"/api-reference/organizations/overview"},{"title":"Organization Metrics","api":"GET /v1/organizations/{organization_id}/metrics","href":"/api-reference/organizations/metrics"},{"title":"Organization Tree","api":"GET /v2/organizations/tree","href":"/api-reference/organizations/tree"}]},{"group":"Own Workforce","pages":[{"title":"Own Workforce API","href":"/api-reference/own-workforce/overview"},{"title":"Get Workforce Unique Values","api":"GET /v1/own_workforces/unique-values","href":"/api-reference/own-workforce/unique-values"},{"title":"Get Workforce Verification Data","api":"GET /v1/own_workforces/verification-data","href":"/api-reference/own-workforce/verification-data"},{"title":"List Workforce Countries","api":"GET /v1/own_workforces/countries","href":"/api-reference/own-workforce/countries"},{"title":"List Workforce Employees","api":"GET /v1/own_workforces","href":"/api-reference/own-workforce/list"},{"title":"List Workforce Employees With Contracts","api":"GET /v1/own_workforces/with-contracts-and-remunerations","href":"/api-reference/own-workforce/with-contracts"},{"title":"List Workforce Job Categories","api":"GET /v1/own_workforces/job-categories","href":"/api-reference/own-workforce/job-categories"},{"title":"Get Workforce Employee","api":"GET /v1/own_workforces/{own_workforce_id}","href":"/api-reference/own-workforce/get"},{"title":"Create Workforce Employees (v2)","api":"POST /v2/own-workforce/employees","tag":"BETA","href":"/api-reference/own-workforce/employees-create-v2"},{"title":"Delete Workforce Employees (v2)","api":"POST /v2/own-workforce/employees/delete","tag":"BETA","href":"/api-reference/own-workforce/employees-delete-v2"},{"title":"Delete Workforce Employee","api":"DELETE /v1/own_workforces/{own_workforce_id}","deprecated":true,"href":"/api-reference/own-workforce/delete"},{"title":"Bulk Delete Workforce Employees","api":"POST /v1/own_workforces/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete"},{"title":"Bulk Delete Workforce Employees by Filters","api":"POST /v1/own_workforces/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-by-filters"},{"title":"Upload Workforce Employees CSV","api":"POST /v1/own_workforces/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload"},{"group":"Absenteeisms \u0026 Accidents","expanded":true,"pages":[{"title":"Get Workforce Absences Unique Values","api":"GET /v1/own_workforce_absenteeisms_accidents/unique-values","href":"/api-reference/own-workforce/unique-values-absences"},{"title":"List Workforce Absences","api":"GET /v1/own_workforce_absenteeisms_accidents","href":"/api-reference/own-workforce/list-absences"},{"title":"List Workforce Absences Paginated","api":"GET /v1/own_workforce_absenteeisms_accidents/paginated","href":"/api-reference/own-workforce/list-absences-paginated"},{"title":"List Workforce Absences by Employee","api":"GET /v1/own_workforce_absenteeisms_accidents/own_workforce/{own_workforce_id}","href":"/api-reference/own-workforce/list-absences-by-employee"},{"title":"Create Workforce Absences (v2)","api":"POST /v2/own-workforce/absences","tag":"BETA","href":"/api-reference/own-workforce/absences-create-v2"},{"title":"Delete Workforce Absences (v2)","api":"POST /v2/own-workforce/absences/delete","tag":"BETA","href":"/api-reference/own-workforce/absences-delete-v2"},{"title":"Delete Workforce Absence","api":"DELETE /v1/own_workforce_absenteeisms_accidents/{absenteeism_accident_id}","deprecated":true,"href":"/api-reference/own-workforce/delete-absence"},{"title":"Bulk Delete Workforce Absences","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete-absences"},{"title":"Bulk Delete Workforce Absences by Filters","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-absences-by-filters"},{"title":"Upload Workforce Absences CSV","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload-absences"}]},{"group":"Contracts \u0026 Remuneration","expanded":true,"pages":[{"title":"List Workforce Contracts","api":"GET /v1/own_workforce_contracts","href":"/api-reference/own-workforce/list-contracts"},{"title":"List Workforce Remunerations","api":"GET /v1/own_workforce_remunerations","href":"/api-reference/own-workforce/list-remunerations"},{"title":"Get Workforce Contract","api":"GET /v1/own_workforce_contracts/{contract_id}","href":"/api-reference/own-workforce/get-contract"}]},{"group":"Trainings","expanded":true,"pages":[{"title":"Get Workforce Trainings Unique Values","api":"GET /v1/own_workforce_trainings/unique-values","href":"/api-reference/own-workforce/unique-values-trainings"},{"title":"List Workforce Trainings","api":"GET /v1/own_workforce_trainings","href":"/api-reference/own-workforce/list-trainings"},{"title":"List Workforce Trainings Paginated","api":"GET /v1/own_workforce_trainings/paginated","href":"/api-reference/own-workforce/list-trainings-paginated"},{"title":"List Workforce Trainings by Employee","api":"GET /v1/own_workforce_trainings/own_workforce/{own_workforce_id}","href":"/api-reference/own-workforce/list-trainings-by-employee"},{"title":"Create Workforce Trainings (v2)","api":"POST /v2/own-workforce/trainings","tag":"BETA","href":"/api-reference/own-workforce/trainings-create-v2"},{"title":"Delete Workforce Trainings (v2)","api":"POST /v2/own-workforce/trainings/delete","tag":"BETA","href":"/api-reference/own-workforce/trainings-delete-v2"},{"title":"Delete Workforce Training","api":"DELETE /v1/own_workforce_trainings/{training_id}","deprecated":true,"href":"/api-reference/own-workforce/delete-training"},{"title":"Bulk Delete Workforce Trainings","api":"POST /v1/own_workforce_trainings/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete-trainings"},{"title":"Bulk Delete Workforce Trainings by Filters","api":"POST /v1/own_workforce_trainings/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-trainings-by-filters"},{"title":"Upload Workforce Trainings CSV","api":"POST /v1/own_workforce_trainings/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload-trainings"}]}]},{"group":"Projects","pages":[{"title":"Projects API","href":"/api-reference/projects/overview"},{"title":"Consolidated Emissions","api":"GET /v1/projects/{project_id}/consolidated","href":"/api-reference/projects/consolidated"},{"title":"List Projects","api":"GET /v1/projects/extended","href":"/api-reference/projects/list"},{"title":"Recent Activities","api":"GET /v1/projects/{project_id}/recent-activities","href":"/api-reference/projects/recent-activities"},{"title":"Get Project","api":"GET /v1/projects/{project_id}","href":"/api-reference/projects/get"},{"title":"Create Project","api":"POST /v1/projects","href":"/api-reference/projects/create"},{"title":"Link Entities by Filters","api":"POST /v1/projects/{project_id}/entities/link-by-filters","href":"/api-reference/projects/link-by-filters"},{"title":"Link Entities to Project","api":"POST /v1/projects/{project_id}/entities/link","href":"/api-reference/projects/link-entities"},{"title":"Unlink Entities from Project","api":"POST /v1/projects/{project_id}/entities/unlink","href":"/api-reference/projects/unlink-entities"},{"title":"Update Project","api":"PUT /v1/projects/{project_id}","href":"/api-reference/projects/update"},{"title":"Delete Project","api":"DELETE /v1/projects/{project_id}","href":"/api-reference/projects/delete"},{"group":"Tasks","expanded":true,"pages":[{"title":"Get Subtasks","api":"GET /v1/tasks/{task_id}/subtasks","href":"/api-reference/projects/subtasks"},{"title":"List All Tasks","api":"GET /v1/projects/tasks","href":"/api-reference/projects/list-tasks"},{"title":"List Project Tasks","api":"GET /v1/projects/{project_id}/tasks","href":"/api-reference/projects/project-tasks"},{"title":"Task Versions","api":"GET /v1/tasks/{task_id}/versions","href":"/api-reference/projects/task-versions"},{"title":"Get Task","api":"GET /v1/tasks/{task_id}","href":"/api-reference/projects/get-task"},{"title":"Create Task","api":"POST /v2/tasks","href":"/api-reference/projects/create-task"},{"title":"Update Task","api":"PATCH /v1/tasks/{task_id}","href":"/api-reference/projects/update-task"},{"title":"Delete Task","api":"DELETE /v1/tasks/{task_id}","href":"/api-reference/projects/delete-task"}]}]},{"group":"Purchases","pages":[{"title":"Purchases API","href":"/api-reference/purchases/overview"},{"title":"Get Purchase Totals","api":"GET /v1/purchases/totals","href":"/api-reference/purchases/totals"},{"title":"Get Purchase Version History","api":"GET /v1/purchases/{purchase_id}/versions","href":"/api-reference/purchases/versions"},{"title":"List Purchase Suppliers","api":"GET /v1/purchases/suppliers","href":"/api-reference/purchases/suppliers-list"},{"title":"List Purchases","api":"GET /v1/purchases","href":"/api-reference/purchases/list"},{"title":"Get Purchase","api":"GET /v1/purchases/{purchase_id}","href":"/api-reference/purchases/get"},{"title":"Create Purchase","api":"POST /v1/purchases","deprecated":true,"href":"/api-reference/purchases/create"},{"title":"Create Purchase Suppliers (v2)","api":"POST /v2/purchases/suppliers","tag":"BETA","href":"/api-reference/purchases/suppliers-create-v2"},{"title":"Create Purchases (v2)","api":"POST /v2/purchases","tag":"BETA","href":"/api-reference/purchases/create-v2"},{"title":"Delete Purchase Suppliers (v2)","api":"POST /v2/purchases/suppliers/delete","tag":"BETA","href":"/api-reference/purchases/suppliers-delete-v2"},{"title":"Delete Purchases (v2)","api":"POST /v2/purchases/delete","tag":"BETA","href":"/api-reference/purchases/delete-v2"},{"title":"Classify Purchase Suppliers (v2)","api":"PATCH /v2/purchases/suppliers","tag":"BETA","href":"/api-reference/purchases/suppliers-update-v2"},{"title":"Update Purchase","api":"PATCH /v1/purchases/{purchase_id}","href":"/api-reference/purchases/update"},{"title":"Delete Purchase","api":"DELETE /v1/purchases/{purchase_id}","deprecated":true,"href":"/api-reference/purchases/delete"},{"title":"Bulk Delete Purchases","api":"POST /v1/purchases/bulk-delete","deprecated":true,"href":"/api-reference/purchases/bulk-delete"},{"title":"Bulk Delete Purchases by Filters","api":"POST /v1/purchases/bulk-delete-by-filters","href":"/api-reference/purchases/bulk-delete-by-filters"}]},{"group":"Reports \u0026 Dashboards (v1)","pages":[{"title":"Reports \u0026 Dashboards API","href":"/api-reference/reports/overview"},{"title":"Get Kpis","deprecated":null,"version":null,"openapi":"/openapi-kpi.json get /v1/report_builder/kpis","href":"/api-reference/reportbuilder/get-kpis"}]},{"group":"Sold Products","pages":[{"title":"Sold Products API","href":"/api-reference/sold-products/overview"},{"title":"Check Period Overlap","api":"GET /v1/sold-products/periods/check-overlap","href":"/api-reference/sold-products/check-overlap"},{"title":"List Existing Country Sales","api":"GET /v1/sold-products/existing-country-sales","href":"/api-reference/sold-products/existing-country-sales"},{"title":"List Periods","api":"GET /v1/sold-products/{sold_product_id}/periods","href":"/api-reference/sold-products/list-periods"},{"title":"List Sold Products","api":"GET /v1/sold-products/","href":"/api-reference/sold-products/list"},{"title":"Period Country Sales","api":"GET /v1/sold-products/{sold_product_id}/periods/{period_id}/country-sales","href":"/api-reference/sold-products/country-sales"},{"title":"Period Emissions","api":"GET /v1/sold-products/{sold_product_id}/periods/{period_id}/emissions","href":"/api-reference/sold-products/emissions"},{"title":"Create Sold Products (v2)","api":"POST /v2/sold-products","tag":"BETA","href":"/api-reference/sold-products/create-v2"},{"title":"Delete Sold Products (v2)","api":"POST /v2/sold-products/delete","tag":"BETA","href":"/api-reference/sold-products/delete-v2"},{"title":"Delete Period","api":"DELETE /v1/sold-products/{sold_product_id}/periods/{period_id}","href":"/api-reference/sold-products/delete-period"},{"title":"Delete Sold Product","api":"DELETE /v1/sold-products/{sold_product_id}","deprecated":true,"href":"/api-reference/sold-products/delete"},{"group":"Use of Sold Products","expanded":true,"pages":[{"title":"Create Use of Sold Products (v2)","api":"POST /v2/use-of-sold-products","tag":"BETA","href":"/api-reference/use-of-sold-products/create-v2"},{"title":"Delete Use of Sold Products (v2)","api":"POST /v2/use-of-sold-products/delete","tag":"BETA","href":"/api-reference/use-of-sold-products/delete-v2"}]}]},{"group":"Transport","pages":[{"title":"Transport API","href":"/api-reference/transport/overview"},{"title":"Get Route Counts","api":"GET /v1/transports/counts","href":"/api-reference/transport/counts"},{"title":"Get Transport Route Totals","api":"GET /v1/transports/totals","href":"/api-reference/transport/totals"},{"title":"Get Transport Route Version History","api":"GET /v1/transports/{transport_route_id}/versions","href":"/api-reference/transport/versions"},{"title":"List Transport Combinations","api":"GET /v1/transports/combinations","href":"/api-reference/transport/combinations"},{"title":"List Transport Routes","api":"GET /v1/transports","href":"/api-reference/transport/list"},{"title":"Get Transport Route","api":"GET /v1/transports/{transport_route_id}","href":"/api-reference/transport/get"},{"title":"Create Freight Transports (v2)","api":"POST /v2/transports","tag":"BETA","href":"/api-reference/transport/create-v2"},{"title":"Create Transport Route","api":"POST /v1/transports","deprecated":true,"href":"/api-reference/transport/create"},{"title":"Delete Freight Transports (v2)","api":"POST /v2/transports/delete","tag":"BETA","href":"/api-reference/transport/delete-v2"},{"title":"Update Transport Route","api":"PUT /v1/transports/{transport_route_id}","href":"/api-reference/transport/update"},{"title":"Update Transport Route Attachment","api":"PATCH /v1/transports/{transport_route_id}","href":"/api-reference/transport/update-attachment"},{"title":"Delete Transport Route","api":"DELETE /v1/transports/{transport_route_id}","deprecated":true,"href":"/api-reference/transport/delete"},{"title":"Bulk Delete Transport Routes","api":"POST /v1/transports/bulk-delete","deprecated":true,"href":"/api-reference/transport/bulk-delete"},{"title":"Bulk Delete Transport Routes by Filters","api":"POST /v1/transports/bulk-delete-by-filters","href":"/api-reference/transport/bulk-delete-by-filters"},{"title":"Get Presigned Upload URL","api":"POST /v1/transports/upload/presigned-url","deprecated":true,"href":"/api-reference/transport/presigned-url"},{"title":"Upload Transport File","api":"POST /v1/transports/upload","deprecated":true,"href":"/api-reference/transport/upload"},{"title":"Transport Type Inference (do_not_know)","href":"/api-reference/transport/do-not-know-inference"}]},{"group":"Units","pages":[{"title":"List Units","api":"GET /v2/units","href":"/api-reference/units/list"}]},{"group":"Vehicles","pages":[{"title":"Vehicles API","href":"/api-reference/vehicles/overview"},{"title":"List Market Segments","api":"GET /v1/vehicles/market_segments","href":"/api-reference/vehicles/market-segments"},{"title":"List Vehicles","api":"GET /v1/vehicles","href":"/api-reference/vehicles/list"},{"title":"Vehicle Versions","api":"GET /v1/vehicles/{vehicle_id}/versions","href":"/api-reference/vehicles/versions"},{"title":"Get Vehicle","api":"GET /v1/vehicles/{vehicle_id}","href":"/api-reference/vehicles/get"},{"title":"Create Vehicle","api":"POST /v1/vehicles","deprecated":true,"href":"/api-reference/vehicles/create"},{"title":"Create Vehicles (v2)","api":"POST /v2/vehicles","tag":"BETA","href":"/api-reference/vehicles/create-v2"},{"title":"Delete Vehicles (v2)","api":"POST /v2/vehicles/delete","tag":"BETA","href":"/api-reference/vehicles/delete-v2"},{"title":"Update Vehicle","api":"PATCH /v1/vehicles/{vehicle_id}","href":"/api-reference/vehicles/update"},{"title":"Delete Vehicle","api":"DELETE /v1/vehicles/{vehicle_id}","deprecated":true,"href":"/api-reference/vehicles/delete"},{"title":"Bulk Delete Vehicles","api":"POST /v1/vehicles/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/bulk-delete"},{"title":"Bulk Delete Vehicles by Filters","api":"POST /v1/vehicles/bulk-delete-by-filters","href":"/api-reference/vehicles/bulk-delete-by-filters"},{"title":"CSV Import","api":"POST /v1/vehicles/bulk/csv","deprecated":true,"href":"/api-reference/vehicles/csv-import"},{"group":"Unknown Vehicles","expanded":true,"pages":[{"title":"Unknown Vehicles API","href":"/api-reference/unknown-vehicles/overview"},{"title":"List Unknown Vehicles","api":"GET /v1/unknown-vehicles","href":"/api-reference/unknown-vehicles/list"}]},{"group":"Vehicle Consumptions","expanded":true,"pages":[{"title":"Consumption Calculation Steps","api":"GET /v1/vehicle_consumptions/{vehicle_consumption_id}/steps","href":"/api-reference/vehicles/consumptions-steps"},{"title":"Consumption Totals (Organization)","api":"GET /v2/vehicle_consumptions/totals","href":"/api-reference/vehicles/consumptions-org-totals"},{"title":"List All Vehicle Consumptions (Organization)","api":"GET /v2/vehicle_consumptions","href":"/api-reference/vehicles/consumptions-org-list"},{"title":"List Consumption Filter Values","api":"GET /v1/vehicles/{vehicle_id}/consumptions/unique-values","href":"/api-reference/vehicles/consumptions-unique-values"},{"title":"List Consumption Filter Values (Organization)","api":"GET /v2/vehicle_consumptions/unique-values","href":"/api-reference/vehicles/consumptions-org-unique-values"},{"title":"Vehicle Consumptions","api":"GET /v1/vehicles/{vehicle_id}/consumptions","href":"/api-reference/vehicles/consumptions"},{"title":"Get Consumption","api":"GET /v1/vehicle_consumptions/{vehicle_consumption_id}","href":"/api-reference/vehicles/consumptions-get"},{"title":"Create Vehicle Consumptions (v2)","api":"POST /v2/vehicle-consumptions","tag":"BETA","href":"/api-reference/vehicles/consumptions-create-v2"},{"title":"Delete Vehicle Consumptions (v2)","api":"POST /v2/vehicle-consumptions/delete","tag":"BETA","href":"/api-reference/vehicles/consumptions-delete-v2"},{"title":"Delete Vehicle Consumption","api":"DELETE /v1/vehicle_consumptions/{vehicle_consumption_id}","deprecated":true,"href":"/api-reference/vehicles/consumptions-delete"},{"title":"Delete Vehicle Consumptions by File","api":"DELETE /v1/vehicle_consumptions/by-file/{file_id}","href":"/api-reference/vehicles/consumptions-delete-by-file"},{"title":"Bulk Delete Vehicle Consumptions","api":"POST /v1/vehicles/{vehicle_id}/consumptions/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/consumptions-bulk-delete"},{"title":"Bulk Delete Vehicle Consumptions (Organization)","api":"POST /v2/vehicle_consumptions/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/consumptions-org-bulk-delete"},{"title":"Bulk Delete Vehicle Consumptions by Filters","api":"POST /v1/vehicles/{vehicle_id}/consumptions/bulk-delete-by-filters","href":"/api-reference/vehicles/consumptions-bulk-delete-by-filters"},{"title":"Bulk Delete Vehicle Consumptions by Filters (Organization)","api":"POST /v2/vehicle_consumptions/bulk-delete-by-filters","href":"/api-reference/vehicles/consumptions-org-bulk-delete-by-filters"},{"title":"Consumptions CSV Import","api":"POST /v1/vehicle_consumptions/bulk/csv","deprecated":true,"href":"/api-reference/vehicles/consumptions-csv-import"}]},{"group":"Vehicle Fuels","expanded":true,"pages":[{"title":"Vehicle Fuels API","href":"/api-reference/vehicle-fuels/overview"},{"title":"List Vehicle Fuels","api":"GET /v1/vehicle-fuels","href":"/api-reference/vehicle-fuels/list"}]}]},{"group":"Waste Water Treatments","pages":[{"title":"Get Waste Water Treatment by ID","api":"GET /v1/waste-water-treatments/{wwt_id}/detail","href":"/api-reference/waste-water-treatments/detail"},{"title":"Get Waste Water Treatment Version History","api":"GET /v1/waste-water-treatments/{waste_water_treatment_id}/versions","href":"/api-reference/waste-water-treatments/versions"},{"title":"List Waste Water Treatments","api":"GET /v1/waste-water-treatments","href":"/api-reference/waste-water-treatments/list"},{"title":"Create Waste Water Treatment","api":"POST /v1/waste-water-treatments","deprecated":true,"href":"/api-reference/waste-water-treatments/create"},{"title":"Create Waste Water Treatments (v2)","api":"POST /v2/waste-water-treatments","tag":"BETA","href":"/api-reference/waste-water-treatments/create-v2"},{"title":"Delete Waste Water Treatments (v2)","api":"POST /v2/waste-water-treatments/delete","tag":"BETA","href":"/api-reference/waste-water-treatments/delete-v2"},{"title":"Update Waste Water Treatment","api":"PATCH /v1/waste-water-treatments/{wwt_id}","href":"/api-reference/waste-water-treatments/update"}]},{"group":"Wastes","pages":[{"title":"Wastes API","href":"/api-reference/wastes/overview"},{"title":"Get Waste","api":"GET /v1/wastes/{waste_id}/detail","href":"/api-reference/wastes/get"},{"title":"Get Waste Version History","api":"GET /v1/wastes/{waste_id}/versions","href":"/api-reference/wastes/versions"},{"title":"List LER Codes","api":"GET /v1/wastes/ler-codes","href":"/api-reference/wastes/ler-codes"},{"title":"List R/D Codes","api":"GET /v1/wastes/rd-codes","href":"/api-reference/wastes/rd-codes"},{"title":"List Waste Emission Factors","api":"GET /v1/waste-efs","href":"/api-reference/wastes/emission-factors"},{"title":"List Waste Filter Values","api":"GET /v1/waste/unique-values","href":"/api-reference/wastes/unique-values"},{"title":"List Wastes","api":"GET /v1/wastes","href":"/api-reference/wastes/list"},{"title":"Create Waste","api":"POST /v1/wastes","deprecated":true,"href":"/api-reference/wastes/create"},{"title":"Create Wastes (v2)","api":"POST /v2/wastes","tag":"BETA","href":"/api-reference/wastes/create-v2"},{"title":"Delete Wastes (v2)","api":"POST /v2/wastes/delete","tag":"BETA","href":"/api-reference/wastes/delete-v2"},{"title":"Update Waste","api":"PATCH /v1/wastes/{waste_id}","href":"/api-reference/wastes/update"},{"title":"Bulk Delete Wastes","api":"POST /v1/waste/bulk-delete","deprecated":true,"href":"/api-reference/wastes/bulk-delete"},{"title":"Bulk Delete Wastes by Filters","api":"POST /v1/waste/bulk-delete-by-filters","href":"/api-reference/wastes/bulk-delete-by-filters"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","tag":"BETA","href":"/api-reference/webhooks/overview"},{"title":"List Webhook Deliveries","api":"GET /v2/webhook-endpoints/{endpoint_id}/deliveries","tag":"BETA","href":"/api-reference/webhooks/list-deliveries"},{"title":"List Webhook Endpoints","api":"GET /v2/webhook-endpoints","tag":"BETA","href":"/api-reference/webhooks/list-endpoints"},{"title":"Get Webhook Endpoint","api":"GET /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/get-endpoint"},{"title":"Create Webhook Endpoint","api":"POST /v2/webhook-endpoints","tag":"BETA","href":"/api-reference/webhooks/create-endpoint"},{"title":"Retry Webhook Delivery","api":"POST /v2/webhook-endpoints/{endpoint_id}/deliveries/{delivery_id}/retry","tag":"BETA","href":"/api-reference/webhooks/retry-delivery"},{"title":"Rotate Webhook Secret","api":"POST /v2/webhook-endpoints/{endpoint_id}/rotate-secret","tag":"BETA","href":"/api-reference/webhooks/rotate-secret"},{"title":"Send Test Event","api":"POST /v2/webhook-endpoints/{endpoint_id}/test","tag":"BETA","href":"/api-reference/webhooks/test-endpoint"},{"title":"Update Webhook Endpoint","api":"PATCH /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/update-endpoint"},{"title":"Delete Webhook Endpoint","api":"DELETE /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/delete-endpoint"}]}]},{"version":"Legacy API","pages":[{"title":"Legacy API","href":"/api-reference/introduction"}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/docs/release-notes"}]}]},"basePath":"","title":"Create Commuting Periods (v2) - Dcycle Platform Docs","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js"]}