Vehicle
The vehicle behind a tracker, carrying its VIN, consumption figures, and other details a device cannot report.
A vehicle records what the Navixy platform knows about the thing being tracked rather than about the device tracking it: its VIN, its registration, its fuel consumption norms, and the rest.
A vehicle is linked to a tracker, and that link is what lets the platform combine the two. A track's norm_fuel_consumed, for example, is only calculated when a vehicle with normAvgFuelConsumption is attached to the tracker that produced it.
Vehicle object
API actions
API base path: /vehicle.
Operations that list no errors of their own return only the general error codes.
Creates a vehicle from a vehicle object without an id.
Required sub-user rights: vehicle_update.
Create a vehicle. Pass a vehicle object without its id.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Optional. Default true. Reassign the device to this vehicle even if it was assigned to another one.
The created vehicle
true if request finished successfully.
trueID of the new vehicle.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 247: a device cannot be assigned, or a uniqueness constraint failed.
Error response object
POST /v2/vehicle/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 943
{
"vehicle": {
"id": 1,
"tracker_id": 1,
"tracker_label": "text",
"label": "text",
"icon_color": "1E96DC",
"status_id": null,
"trailer_reg_number": "text",
"max_speed": null,
"model": "text",
"type": "truck",
"subtype": null,
"garage_id": null,
"garage_organization_name": "text",
"trailer": "text",
"manufacture_year": null,
"color": "text",
"additional_info": "text",
"reg_number": "text",
"vin": "text",
"chassis_number": "text",
"frame_number": "text",
"payload_weight": null,
"payload_height": null,
"payload_length": null,
"payload_width": null,
"passengers": null,
"gross_weight": null,
"fuel_type": "petrol",
"fuel_grade": "text",
"norm_avg_fuel_consumption": null,
"fuel_tank_volume": null,
"fuel_cost": null,
"wheel_arrangement": "text",
"tyre_size": "text",
"tyres_number": null,
"liability_insurance_policy_number": "text",
"liability_insurance_valid_till": null,
"free_insurance_policy_number": "text",
"free_insurance_valid_till": null,
"icon_id": null,
"avatar_file_name": null,
"tags": [
1
]
},
"force_reassign": true
}{
"success": true,
"id": 1
}Errors
These errors come in addition to the general error codes:
247 - a device cannot be assigned, or a uniqueness constraint failed.
Deletes vehicles with the specified IDs. Only one of vehicle_id or vehicle_ids must be specified.
Required sub-user rights: vehicle_update.
Delete vehicles by ID.
Exactly one of vehicle_id or vehicle_ids must be given. A request with neither reports a missing parameter named has_at_least_one_vehicle_id, which is the internal name of the validation group enforcing that choice, not a parameter you can send.
Also accepts GET with the same parameters as query-string values.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a single vehicle to delete. Use this or vehicle_ids, not both.
IDs of vehicles to delete. Use this or vehicle_id, not both.
Vehicles deleted
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/vehicle/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"vehicle_id": 1,
"vehicle_ids": [
1
]
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database.
Lists the vehicles of the current user.
List the vehicles of the current user, with pagination, sorting and a text filter.
Callable with an empty body. Also accepts GET.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Pagination. Maximum number of vehicle records to return.
Pagination. Return vehicles starting from this offset.
Optional. Sort options, each a property and direction such as type=desc. At most 2 options per request. Sortable properties: id, label, reg_number, model, type, garage_organization_name, vin, tracker_label, fuel_type, fuel_grade, norm_avg_fuel_consumption, fuel_tank_volume, payload_weight, chassis_number, subtype, wheel_arrangement, tyres_number, tyres_size, max_speed, passengers.
Optional. Filter by VIN, reg_number or label. Up to 100 characters, or null.
Matching vehicles
true if request finished successfully.
trueTotal number of vehicles matching the request, ignoring pagination.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/vehicle/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 54
{
"limit": 1,
"offset": 1,
"sort": [
"text"
],
"filter": "text"
}{
"success": true,
"list": [
{
"id": 1,
"tracker_id": 1,
"tracker_label": "text",
"label": "text",
"icon_color": "1E96DC",
"status_id": null,
"trailer_reg_number": "text",
"max_speed": null,
"model": "text",
"type": "truck",
"subtype": null,
"garage_id": null,
"garage_organization_name": "text",
"trailer": "text",
"manufacture_year": null,
"color": "text",
"additional_info": "text",
"reg_number": "text",
"vin": "text",
"chassis_number": "text",
"frame_number": "text",
"payload_weight": null,
"payload_height": null,
"payload_length": null,
"payload_width": null,
"passengers": null,
"gross_weight": null,
"fuel_type": "petrol",
"fuel_grade": "text",
"norm_avg_fuel_consumption": null,
"fuel_tank_volume": null,
"fuel_cost": null,
"wheel_arrangement": "text",
"tyre_size": "text",
"tyres_number": null,
"liability_insurance_policy_number": "text",
"liability_insurance_valid_till": null,
"free_insurance_policy_number": "text",
"free_insurance_valid_till": null,
"icon_id": null,
"avatar_file_name": null,
"tags": [
1
]
}
],
"count": 1
}Reads one vehicle by ID.
Return one vehicle by ID.
Also accepts GET with the same parameters as query-string values.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a vehicle.
The vehicle
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/vehicle/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"vehicle_id": 1
}{
"success": true,
"value": {
"id": 1,
"tracker_id": 1,
"tracker_label": "text",
"label": "text",
"icon_color": "1E96DC",
"status_id": null,
"trailer_reg_number": "text",
"max_speed": null,
"model": "text",
"type": "truck",
"subtype": null,
"garage_id": null,
"garage_organization_name": "text",
"trailer": "text",
"manufacture_year": null,
"color": "text",
"additional_info": "text",
"reg_number": "text",
"vin": "text",
"chassis_number": "text",
"frame_number": "text",
"payload_weight": null,
"payload_height": null,
"payload_length": null,
"payload_width": null,
"passengers": null,
"gross_weight": null,
"fuel_type": "petrol",
"fuel_grade": "text",
"norm_avg_fuel_consumption": null,
"fuel_tank_volume": null,
"fuel_cost": null,
"wheel_arrangement": "text",
"tyre_size": "text",
"tyres_number": null,
"liability_insurance_policy_number": "text",
"liability_insurance_valid_till": null,
"free_insurance_policy_number": "text",
"free_insurance_valid_till": null,
"icon_id": null,
"avatar_file_name": null,
"tags": [
1
]
}
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database.
Updates a vehicle. Pass a full vehicle object including its id. icon_id can only be changed through avatar/assign.
Required sub-user rights: vehicle_update.
Update a vehicle. Pass a full vehicle object including its id.
Note icon_id cannot be set here: it is changed through vehicle/avatar/assign.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Optional. Default true. Reassign the device to this vehicle even if it was assigned to another one.
Vehicle updated
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 247: a device cannot be assigned. Error 261: the vehicle is referenced by something that prevents the change.
Error response object
POST /v2/vehicle/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 943
{
"vehicle": {
"id": 1,
"tracker_id": 1,
"tracker_label": "text",
"label": "text",
"icon_color": "1E96DC",
"status_id": null,
"trailer_reg_number": "text",
"max_speed": null,
"model": "text",
"type": "truck",
"subtype": null,
"garage_id": null,
"garage_organization_name": "text",
"trailer": "text",
"manufacture_year": null,
"color": "text",
"additional_info": "text",
"reg_number": "text",
"vin": "text",
"chassis_number": "text",
"frame_number": "text",
"payload_weight": null,
"payload_height": null,
"payload_length": null,
"payload_width": null,
"passengers": null,
"gross_weight": null,
"fuel_type": "petrol",
"fuel_grade": "text",
"norm_avg_fuel_consumption": null,
"fuel_tank_volume": null,
"fuel_cost": null,
"wheel_arrangement": "text",
"tyre_size": "text",
"tyres_number": null,
"liability_insurance_policy_number": "text",
"liability_insurance_valid_till": null,
"free_insurance_policy_number": "text",
"free_insurance_valid_till": null,
"icon_id": null,
"avatar_file_name": null,
"tags": [
1
]
},
"force_reassign": true
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201, 247, 261.
Converts a batch of tab-delimited vehicles and returns the list of checked vehicles with errors. If file_id is set, batch is ignored.
Required sub-user rights: vehicle_update.
Parse a tab-delimited batch of vehicles and return them checked, with per-row errors. Does not create anything.
Give either batch or file_id. If file_id is set, batch is ignored. A request with neither returns error 7 with no errors array, because the rule is cross-field rather than per-parameter.
Requires the vehicle_update right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Batch of tab-delimited vehicles.
Preloaded file ID. Takes precedence over batch.
Optional. Field names, in column order. Defaults to ["label", "model", "reg_number", "fuel_grade"].
Geocoder type.
The checked batch
true if request finished successfully.
truetrue if the given batch was constrained by a limit.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 234: the file or batch exceeds a size limit.
Error response object
POST /v2/vehicle/batch_convert HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 69
{
"batch": "text",
"file_id": "text",
"fields": [
"text"
],
"geocoder": "text"
}{
"success": true,
"list": [
{
"id": 1,
"tracker_id": 1,
"tracker_label": "text",
"label": "text",
"icon_color": "1E96DC",
"status_id": null,
"trailer_reg_number": "text",
"max_speed": null,
"model": "text",
"type": "truck",
"subtype": null,
"garage_id": null,
"garage_organization_name": "text",
"trailer": "text",
"manufacture_year": null,
"color": "text",
"additional_info": "text",
"reg_number": "text",
"vin": "text",
"chassis_number": "text",
"frame_number": "text",
"payload_weight": null,
"payload_height": null,
"payload_length": null,
"payload_width": null,
"passengers": null,
"gross_weight": null,
"fuel_type": "petrol",
"fuel_grade": "text",
"norm_avg_fuel_consumption": null,
"fuel_tank_volume": null,
"fuel_cost": null,
"wheel_arrangement": "text",
"tyre_size": "text",
"tyres_number": null,
"liability_insurance_policy_number": "text",
"liability_insurance_valid_till": null,
"free_insurance_policy_number": "text",
"free_insurance_valid_till": null,
"icon_id": null,
"avatar_file_name": null,
"tags": [
1
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"limit_exceeded": true
}Errors
These errors come in addition to the general error codes:
More in this section
Vehicle avatar
Vehicle import
Service task
Service task file
Vehicle status listing
Last updated
Was this helpful?