Create Vehicle
Create a new vehicle in Last Mile Intelligence.
Operation
Section titled “Operation”createVehicle
Resource
Section titled “Resource”vehicle
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Vehicle Data | JSON | Yes | - | Vehicle object with required fields |
Vehicle Data Fields
Section titled “Vehicle Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Vehicle name/identifier |
| vin | string | No | Vehicle Identification Number |
| licensePlate | string | No | License plate number |
| make | string | No | Vehicle manufacturer |
| model | string | No | Vehicle model |
| year | string | No | Manufacturing year |
| capacity | number | Yes | Vehicle capacity |
| capacityUnit | string | Yes | Unit for capacity (gallon, pound, etc.) |
| terminalId | string | No | Associated terminal ID |
Response
Section titled “Response”Success
Section titled “Success”{ "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" }}Error Handling
Section titled “Error Handling”- 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