Skip to main content

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.

Required Scopes (ia.w)

Request​

id: str | None = None
Internal tractor identifier. If the id is provided, the request will be considered an update instead of a create.


depot: str | None = None
Depot Name associated with the tractor.


depot_id: str | None = None
Internal identifier of the depot associated with the tractor. Takes precedence over depot when both are sent.


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.


has_pump: bool | None = None
Whether the tractor has a pump. Forced to True when pump_rate is set.


pump_rate: int | None = None
The tractor's pump flow rate, expressed per minute. Setting it implies the tractor has a pump (has_pump is forced to True). May not be negative.


trailer_config: str | None = None
The tractor's tank-wagon configuration name.


product_groups: list[str] = []
The product groups the tractor is designated to carry.


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.


attributes: dict[str, bool | float | str] = {}
Custom attributes applied to the tractor, keyed by attribute definition id. Attribute definitions are managed in the application; each definition fixes the value type of its entry (boolean, number, string, or presence-only exists).


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​

Successful Response

{
"created": 0,
"updated": 0,
"errors": [
"string"
]
}
Loading...