Skip to content

Create Vehicle

Create a new vehicle in Last Mile Intelligence.

createVehicle

vehicle

ParameterTypeRequiredDefaultDescription
Vehicle DataJSONYes-Vehicle object with required fields
FieldTypeRequiredDescription
namestringYesVehicle name/identifier
vinstringNoVehicle Identification Number
licensePlatestringNoLicense plate number
makestringNoVehicle manufacturer
modelstringNoVehicle model
yearstringNoManufacturing year
capacitynumberYesVehicle capacity
capacityUnitstringYesUnit for capacity (gallon, pound, etc.)
terminalIdstringNoAssociated terminal ID
{
"id": "veh_new123",
"name": "Truck 003",
"vin": "1HGBH41JXMN109187",
"licensePlate": "DEF-9012",
"capacity": 4500,
"capacityUnit": "gallon",
"status": "available",
"createdAt": "2024-06-21T09:00:00Z"
}
{
"success": false,
"error": "Validation failed",
"details": {
"vin": "VIN already exists"
}
}
  • Missing API Token: LMI credential is missing API token
  • Duplicate VIN: Vehicle with this VIN already exists
  • Invalid Terminal: Terminal ID does not exist
  • Validation Error: Required fields missing or invalid
  • Permission Denied: API token lacks permission for this operation