Skip to main content

Driver Schedule Upsert Many Ep

POST 

/v1/driver_schedule/upsert_many

Upsert Many Driver Schedules

Creates or updates driver schedules in batch. Matching is done by ID or by driver+date. Only one schedule per driver per date is allowed. The driver cannot be changed on an existing schedule.

Required Scopes (ids.w)

Request

id: str | None = None
The internal identifier for an existing schedule. If provided, the schedule will be updated. If not, matching falls back to driver+date.


shift__start: datetime
The start of the driver's shift.


shift__end: datetime
The end of the driver's shift. Must be after shift__start.


timezone: string = utc
The timezone of the shift__start and shift__end values.


shift: Shift
The shift designation (e.g. day, night).


driver: Driver
The driver to assign to the schedule. Cannot be changed on an existing schedule.

Show Child Attributes

Matched in the following hierarchy: (source__system and source__id), id, name.

id: str | None = None
Unique identifier for the driver.

name: str | None = None
Name of the driver.

source__system: str | None = None
The name of the external system this driver is integrated from.

source__id: str | None = None
The unique identifier for this driver in the source__system.


depot: Depot | None = None
The depot for the schedule. If not provided, the driver's default depot is used.

Show Child Attributes

Matched in the following hierarchy: (source__system and source__id), id, name.

id: str | None = None
Unique identifier for the depot.

name: str | None = None
Name of the depot.

source__system: str | None = None
The name of the external system this depot is integrated from.

source__id: str | None = None
The unique identifier for this depot in the source__system.


tractor: Tractor | None = None
The tractor to assign. If not provided, the driver's default tractor is used.

Show Child Attributes

Matched in the following hierarchy: (source__system and source__id), id, name.

id: str | None = None
Unique identifier for the tractor.

name: str | None = None
Name of the tractor.

source__system: str | None = None
The name of the external system this tractor is integrated from.

source__id: str | None = None
The unique identifier for this tractor in the source__system.


trailer: Trailer | None = None
The trailer to assign. If not provided, the driver's default trailer is used.

Show Child Attributes

Matched in the following hierarchy: (source__system and source__id), id, name.

id: str | None = None
Unique identifier for the trailer.

name: str | None = None
Name of the trailer.

source__system: str | None = None
The name of the external system this trailer is integrated from.

source__id: str | None = None
The unique identifier for this trailer in the source__system.

Responses

Successful Response

{
"insert_count": 0,
"update_count": 0,
"errors": [
{
"id": "string",
"shift_start": "2026-05-11T19:25:52.545Z",
"shift_end": "2026-05-11T19:25:52.545Z",
"timezone": "UTC",
"shift": "am",
"driver": {
"id": "string",
"name": "string",
"source_system": "string",
"source_id": "string"
},
"depot": {
"id": "string",
"name": "string",
"source_system": "string",
"source_id": "string"
},
"tractor": {
"id": "string",
"name": "string",
"source_system": "string",
"source_id": "string"
},
"trailer": {
"id": "string",
"name": "string",
"source_system": "string",
"source_id": "string"
},
"error": "string"
}
]
}
Loading...