query · Module: Fleet · Requires fleet:read
Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
Returns
Vehicle!
| Field | Type |
|---|---|
id | String! |
object | VehicleObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
name | String! |
type | VehicleType! |
class | JSON |
status | VehicleStatus! |
registration | VehicleRegistration |
capacity | VehicleCapacity |
features | [String!] |
home_facility | String |
range | VehicleRange |
telematics | VehicleTelematics |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Vehicle($id: ID!) {
vehicle(id: $id) {
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
}
}
}
{
"id": "veh_1a2B3c"
}
{
"data": {
"vehicle": {
"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"
}
}
}
}