Driver Schedule Special Event Upsert Many Ep
POST/v1/driver_schedule/special_event/upsert_many
Upsert Many Special Events
Creates or updates multiple special events. Events are updated when an id is provided
that matches an existing event; otherwise a new event is created.
Request Body
list[SpecialEventUpsertRequest]
SpecialEventUpsertRequest Fields
id: str | None = None
The internal identifier of an existing special event to update. If omitted, a new event is created.
driver: Driver
The driver hierarchy key for the event.
start_date: datetime
The start date of the event.
end_date: datetime
The end date of the event.
type: str
The event type. Available types can be retrieved from the /driver_schedule/special_event/types endpoint.
Response
insert_count: int
The number of events successfully created.
update_count: int
The number of events successfully updated.
errors: list[SpecialEventUpsertError]
A list of errors for events that could not be created or updated.
Responses
- 200
- 422
Successful Response
- application/json
- Example (from schema)
{
"insert_count": 0,
"update_count": 0,
"errors": [
{
"id": "string",
"driver": {
"id": "string",
"name": "string",
"source_system": "string",
"source_id": "string"
},
"start_date": "2026-05-11T19:25:52.554Z",
"end_date": "2026-05-11T19:25:52.554Z",
"timezone": "UTC",
"type": "string",
"error": "string"
}
]
}
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}