query · Module: Fleet · Requires fleet:read
Arguments
| Argument | Type | Description |
|---|---|---|
type | String | Filter by type. |
status | String | Filter by status. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
Returns
VehicleList!
| Field | Type |
|---|---|
data | [Vehicle!]! |
has_more | Boolean |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Vehicles($limit: Int) {
vehicles(limit: $limit) {
data {
id
object
name
type
status
livemode
created
updated
registration {
plate
country
}
capacity {
weight {
value
unit
}
volume {
value
unit
}
handling_units
pallets
}
features
home_facility
range {
value
unit
}
telematics {
provider
device_id
}
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"vehicles": {
"data": [
{
"id": "veh_1a2B3c",
"object": "vehicle",
"name": "Example",
"type": "car",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"registration": {
"plate": "LX26 ABC",
"country": "GB"
},
"capacity": {
"weight": {
"value": 1.5,
"unit": "g"
},
"volume": {
"value": 1.5,
"unit": "kg"
},
"handling_units": 2,
"pallets": 2
},
"features": [
"example"
],
"home_facility": "fac_lon_hub",
"range": {
"value": 1.5,
"unit": "kg"
},
"telematics": {
"provider": "example",
"device_id": "example"
}
}
],
"has_more": true
}
}
}