Create or update a vehicle
Create or update a vehicle. This is a single upsert: omit id to create a new vehicle, or pass the id of an existing vehicle owned by your company to update it in place. Passing an id that does not exist, is soft-deleted, or belongs to another company returns 404 — this endpoint never creates a vehicle at a caller-chosen id.
On create, make, model and license_plate_number are required. Updates are sparse: only the fields you send are changed, and any field you omit keeps its current value. There is no way to clear a field back to null through this endpoint — sending a field always overwrites it with the value you provide, and omitting it leaves the stored value intact. make, model and license_plate_number can never be blank.
If your company has the BioTrack compliance integration enabled, this endpoint also pushes the vehicle to the state traceability system (BioTrack) as part of the same request. That sync is synchronous, so no polling is needed: a 200 means BioTrack accepted the vehicle too, and if BioTrack rejects it the whole call fails and nothing is saved (create and BioTrack sync commit or roll back together). For BioTrack-enabled companies the following fields become required in addition to the three above: year, color, vin, license_plate_state and description. Companies without BioTrack are not synced anywhere and only need make, model and license_plate_number.
On validation failure (missing required field, BioTrack rejection) the response is a 400 whose body is { "errors": [...] }, each entry carrying a human-readable message pointing at the offending body field.
Vehicles are a settings-level record referenced by transfers and manifests; upserting one does not touch inventory, orders, or purchases.
Required permission: settings_permissions_vehicles.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
application/json- body
id?stringID of the vehicle to update. Omit to create a new vehicle; when present it must identify a vehicle owned by your company.
make?stringManufacturer of the vehicle (e.g. "Ford"). Required on create and can never be cleared; on update, omit to leave unchanged.
model?stringModel of the vehicle (e.g. "Transit"). Required on create and can never be cleared; on update, omit to leave unchanged.
year?stringModel year of the vehicle, sent as a free-form string (e.g. "2021") — it is stored verbatim and never validated or coerced to a number. Optional for companies without BioTrack, but required when your company has BioTrack enabled. Omit to leave unchanged on update.
color?stringColor of the vehicle (e.g. "White"). Optional, but required when your company has BioTrack enabled. Omit to leave unchanged on update.
license_plate_number?stringLicense plate number. Required on create and can never be cleared; on update, omit to leave unchanged.
license_plate_state?stringState the license plate is registered in, as a two-letter US state code (e.g. "CA"); must be one of the recognized US state/territory codes. Optional for companies without BioTrack, but required when your company has BioTrack enabled. Omit to leave unchanged on update.
vin?stringVehicle identification number (VIN). Optional, but required when your company has BioTrack enabled. Omit to leave unchanged on update.
description?stringFree-text name or description for the vehicle. Optional, but required when your company has BioTrack enabled. Omit to leave unchanged on update.
The created or updated vehicle
*/*- response
A single vehicle envelope
data?A vehicle
curl -X POST 'https://app.distru.com/public/v1/vehicles' \ -H 'Content-Type: application/json' \ -d '{ "color": "Red", "description": "Delivery truck", "license_plate_number": "XYZ789", "license_plate_state": "TX", "make": "Ford", "model": "F-150", "vin": "ABCDEFGHIJ1234567", "year": "2024"}'{ "data": { "color": "Red", "description": "Delivery truck", "id": "00000000-0000-0000-0000-000000000008", "inserted_datetime": "2026-08-24T16:01:04.111870Z", "license_plate_number": "XYZ789", "license_plate_state": "TX", "make": "Ford", "model": "F-150", "updated_datetime": "2026-08-24T16:01:04.111870Z", "vin": "ABCDEFGHIJ1234567", "year": "2024" }}