Listing Vehicles
Read the vehicles on the orders your token can already list, one vehicle per item.
Endpoint
/api/vehicles
Pass page the same way you do for GET /api/orders. Vehicles come newest first. There is no other filter or sort. The page is a page of vehicles. It is not the vehicles from one page of orders. An order with three vehicles is three items. The response uses data, links, and meta.
One vehicle
/api/vehicles/{id}
Replace {id} with the vehicle's public id. The response data object is that same vehicle nested on its order. An unknown public id, a public id for a vehicle this token cannot list, or a public id shared by more than one vehicle this token can list returns 404. The body does not include the vehicle. The database id is not the public id.
Who is included
The customer is the customer on the token, the same customer GET /api/orders uses. Delivered and canceled vehicles are included. A vehicle with no order, or whose order this token cannot list, is not in the page.
- A child token lists only vehicles on orders billed to that child.
- A parent token lists vehicles on its own orders and on its child orders, including orders the child created. A child vehicle is included even though its customer is the child.
Fields
Each item is the same vehicle object nested on a single order. id, order_id, and customer_id are public ids. status is the API status. Origin and destination use the order location shape and are the vehicle's own locations. Dates use month/day/year. A missing date is null. estimated_delivery_date is always present.
| Field | Meaning |
|---|---|
| id | Public vehicle id. |
| status | API status. |
| year, make, model, vin, color | Vehicle description. |
| value | Declared value. This is not the transport fee. |
| operable, oversized | Whether the vehicle runs, and whether it is oversized. |
| tracking_url | Signed tracking link for this vehicle. |
| order_id | Public id of the vehicle's order. |
| customer_id | Public id of the vehicle's customer. For a child order this is the child, not the parent. |
| origin, destination | The vehicle's own locations, in the order location shape. |
| distance | Lane miles, or null when no lane exists. |
| order_date, first_available_date, due_date, pickup_eta, delivery_date, estimated_delivery_date | Month/day/year. A missing date is null. estimated_delivery_date is always present. |
| transport_fee | The customer's quoted price. |
| bill_to | Bill-to name. |
| load_id | Load ID from the customer vehicle list. |
| po_number | PO number. |
| check_in_name | Check-in name. |
Empty page
A customer with no vehicles in that set gets an empty page, not an error. data is an empty array.