Listing Vehicles

Read the vehicles on the orders your token can already list, one vehicle per item.

Endpoint

GET /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

GET /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
idPublic vehicle id.
statusAPI status.
year, make, model, vin, colorVehicle description.
valueDeclared value. This is not the transport fee.
operable, oversizedWhether the vehicle runs, and whether it is oversized.
tracking_urlSigned tracking link for this vehicle.
order_idPublic id of the vehicle's order.
customer_idPublic id of the vehicle's customer. For a child order this is the child, not the parent.
origin, destinationThe vehicle's own locations, in the order location shape.
distanceLane miles, or null when no lane exists.
order_date, first_available_date, due_date, pickup_eta, delivery_date, estimated_delivery_dateMonth/day/year. A missing date is null. estimated_delivery_date is always present.
transport_feeThe customer's quoted price.
bill_toBill-to name.
load_idLoad ID from the customer vehicle list.
po_numberPO number.
check_in_nameCheck-in name.

Empty page

A customer with no vehicles in that set gets an empty page, not an error. data is an empty array.