Service task
Scheduled maintenance on a vehicle, due by date, mileage, or engine hours.
A service task is a piece of maintenance due on a vehicle: an oil change, a brake replacement, an inspection. It is what turns tracking data into a maintenance schedule, because the Navixy platform can watch a vehicle's mileage and engine hours and raise the task when either passes its threshold.
A task carries a status through its life, changed with set_status, and can carry files such as an invoice or a photograph of the work. For a walkthrough, see how to manage vehicles and service works.
Service task object
Task status
Task status may be one of:
created- initial state of task.notified- one of conditions exceed notification limit.expired- one of conditions exceeded.done- user set task as "done".
API actions
API base path: /vehicle/service_task.
Operations that list no errors of their own return only the general error codes.
The conditions parameter of service_task/list and service_task/download filters the task list and takes entity search conditions. It is not the task's own conditions object, which holds the thresholds that make a task due.
Creates the same service work for a batch of vehicles. At least one of conditions.mileage, conditions.date or conditions.engine_hours must be passed.
Create the same service work for several vehicles at once.
At least one of conditions.mileage, conditions.date, or conditions.engine_hours must be given.
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.
Vehicles to create the service work for.
The created service works
true if request finished successfully.
trueIDs of the new service works.
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/service_task/batch/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 738
{
"task": {
"id": 1,
"vehicle_id": 1,
"vehicle_label": "text",
"description": "text",
"comment": "text",
"status": "created",
"repeat": true,
"unplanned": true,
"cost": 1,
"completion_date": null,
"start": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"completion": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"current_position": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"conditions": {
"mileage": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
},
"date": {
"end": "text",
"notification_interval": 1,
"repeat_interval": 1
},
"engine_hours": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
}
},
"notifications": {
"sms_phones": [
"text"
],
"emails": [
"text"
],
"push_enabled": true
},
"file_ids": [
1
],
"prediction": {
"end_date": "text",
"wear_percentage": 1
}
},
"vehicle_ids": [
1
]
}{
"success": true,
"ids": [
1
]
}Creates a service work for one vehicle. At least one of conditions.mileage, conditions.date or conditions.engine_hours must be passed.
Create a service work for one vehicle.
At least one of conditions.mileage, conditions.date, or conditions.engine_hours must be given.
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.
The created service work
true if request finished successfully.
trueID of the new service work.
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/service_task/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 720
{
"task": {
"id": 1,
"vehicle_id": 1,
"vehicle_label": "text",
"description": "text",
"comment": "text",
"status": "created",
"repeat": true,
"unplanned": true,
"cost": 1,
"completion_date": null,
"start": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"completion": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"current_position": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"conditions": {
"mileage": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
},
"date": {
"end": "text",
"notification_interval": 1,
"repeat_interval": 1
},
"engine_hours": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
}
},
"notifications": {
"sms_phones": [
"text"
],
"emails": [
"text"
],
"push_enabled": true
},
"file_ids": [
1
],
"prediction": {
"end_date": "text",
"wear_percentage": 1
}
}
}{
"success": true,
"id": 1
}Errors
These errors come in addition to the general error codes:
201, 214.
Deletes a service work.
Delete a service work. 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.
Optional. ID of a single service work. Give this or task_ids.
Optional. IDs of service works. Give this or task_id.
Service work 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/service_task/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"task_id": 1,
"task_ids": [
1
]
}{
"success": true
}Downloads a report of service works, using the same filters as list.
Download a report of service works, using the same filters as the list operation, plus report-shaping parameters. 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.
Optional. Default false. If true, only unplanned service works are included.
Optional. Restrict to these vehicles.
Optional. Text filter. Used together with conditions, both must match.
Optional. Sort options, each a property and direction such as status=asc. Sortable and filterable properties: id, vehicle, vehicle_id, description, status, cost, comment, creation_date, completion_date, predicted_date.
Optional. Maximum number of service works to return.
Optional. Offset for pagination.
Optional. Default false. If true, a Content-Disposition header is appended to the response.
Optional. Default true. Include the legacy prediction field.
Optional. Default pdf. Report format.
Optional. Group the report by vehicle or by status.
The report as a file.
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/service_task/download HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 287
{
"only_unplanned": true,
"vehicle_ids": [
1
],
"statuses": [
"created"
],
"conditions": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"filter": "text",
"sort": [
"text"
],
"limit": 1,
"offset": 1,
"add_filename_header": true,
"return_prediction": true,
"format": "pdf",
"group_by": "vehicle",
"columns": [
"vehicle_label"
]
}textLists service works across all of the user's vehicles.
List service works across all of the user's vehicles. 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.
Optional. Default false. If true, only unplanned service works are included.
Optional. Restrict to these vehicles.
Optional. Text filter. Used together with conditions, both must match.
Optional. Sort options, each a property and direction such as status=asc. Sortable and filterable properties: id, vehicle, vehicle_id, description, status, cost, comment, creation_date, completion_date, predicted_date.
Optional. Maximum number of service works to return.
Optional. Offset for pagination.
Optional. Default false. If true, a Content-Disposition header is appended to the response.
Optional. Default true. Include the legacy prediction field.
Matching service works
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/service_task/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"only_unplanned": true,
"vehicle_ids": [
1
],
"statuses": [
"created"
],
"conditions": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"filter": "text",
"sort": [
"text"
],
"limit": 1,
"offset": 1,
"add_filename_header": true,
"return_prediction": true
}{
"success": true,
"list": [
{
"id": 1,
"vehicle_id": 1,
"vehicle_label": "text",
"description": "text",
"comment": "text",
"status": "created",
"repeat": true,
"unplanned": true,
"cost": 1,
"completion_date": null,
"start": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"completion": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"current_position": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"conditions": {
"mileage": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
},
"date": {
"end": "text",
"notification_interval": 1,
"repeat_interval": 1
},
"engine_hours": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
}
},
"notifications": {
"sms_phones": [
"text"
],
"emails": [
"text"
],
"push_enabled": true
},
"file_ids": [
1
],
"prediction": {
"end_date": "text",
"wear_percentage": 1
}
}
]
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database.
Reads one service work by ID.
Return one service work by ID. 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.
ID of the service work.
Optional. Default true. Include the legacy prediction field.
The service work
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/service_task/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"task_id": 1,
"return_prediction": true
}{
"success": true,
"value": {
"id": 1,
"vehicle_id": 1,
"vehicle_label": "text",
"description": "text",
"comment": "text",
"status": "created",
"repeat": true,
"unplanned": true,
"cost": 1,
"completion_date": null,
"start": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"completion": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"current_position": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"conditions": {
"mileage": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
},
"date": {
"end": "text",
"notification_interval": 1,
"repeat_interval": 1
},
"engine_hours": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
}
},
"notifications": {
"sms_phones": [
"text"
],
"emails": [
"text"
],
"push_enabled": true
},
"file_ids": [
1
],
"prediction": {
"end_date": "text",
"wear_percentage": 1
}
}
}Updates a task status. On done, the current date and the counter values used in its conditions are saved, which freezes the wear percentage.
Set a service work's status. On done, the current date and the counter values used in its conditions are saved, which freezes the wear percentage.
Only done is accepted at present. 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.
ID of the service work.
The new status. Only done is allowed for now.
Status set
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 204: entity not found.
Error response object
POST /v2/vehicle/service_task/set_status HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"task_id": 1,
"status": "done"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201, 204.
Updates a service work. Pass a full task object including its id. completion is not editable.
Update a service work. Pass a full task object including its id.
completion is not editable.
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.
Service work 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 204: entity not found.
Error response object
POST /v2/vehicle/service_task/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 720
{
"task": {
"id": 1,
"vehicle_id": 1,
"vehicle_label": "text",
"description": "text",
"comment": "text",
"status": "created",
"repeat": true,
"unplanned": true,
"cost": 1,
"completion_date": null,
"start": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"completion": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"current_position": {
"mileage": 1,
"date": "text",
"engine_hours": 1
},
"conditions": {
"mileage": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
},
"date": {
"end": "text",
"notification_interval": 1,
"repeat_interval": 1
},
"engine_hours": {
"limit": 1,
"notification_interval": 1,
"repeat_interval": 1
}
},
"notifications": {
"sms_phones": [
"text"
],
"emails": [
"text"
],
"push_enabled": true
},
"file_ids": [
1
],
"prediction": {
"end_date": "text",
"wear_percentage": 1
}
}
}{
"success": true
}Errors
These errors come in addition to the general error codes:
204, 214.
More in this section
Service task file
Last updated
Was this helpful?