Tractor Upsert Many Ep
POST/v1/tractor/upsert_many
Bulk Create/Update Tractors
Allows for the bulk creation of new tractors or updating existing tractors if an id is passed.
Request
id: str | None = None
depot: str | None = None
Depot Name associated with the tractor.
vin: str | None = None
VIN number of the tractor.
tractor_number: str | None = None
The number to assign to the tractor.
make: str | None = None
The make of the tractor.
model: str | None = None
The model of the tractor.
year: int | None = None
The year of the tractor.
weight: int | None = None
The weight of the tractor.
next_maintenance: datetime | None = None
The date and time of the next scheduled maintenance for the tractor.
next_tractor_maintenance_required: bool | None = None
Whether the next scheduled maintenance for the tractor is required.
source_id: str | None = None
If received from integration, the identifier inside the source system
source_system_id: str | None = None
If received from integration, the source system identifier.
Response
created: int
The number of new tractors created.
updated: int
The number of tractors updated.
errors: list
An array of the requests sent that failed, detailing the cause of the error.
Responses
- 200
- 422
Successful Response
- application/json
- Example (from schema)
{
"created": 0,
"updated": 0,
"errors": [
"string"
]
}
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}