For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 service tasks for vehicles

post
/vehicle/service_task/batch/create

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.

Authorizations
AuthorizationstringRequired

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.

Body
vehicle_idsinteger[]Required

Vehicles to create the service work for.

Responses
200

The created service works

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idsinteger[]Optional

IDs of the new service works.

post/vehicle/service_task/batch/create
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 service task

post
/vehicle/service_task/create

Create a service work for one vehicle.

At least one of conditions.mileage, conditions.date, or conditions.engine_hours must be given.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

The created service work

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idintegerOptional

ID of the new service work.

post/vehicle/service_task/create
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 service task

post
/vehicle/service_task/delete

Delete a service work. Also accepts GET.

Authorizations
AuthorizationstringRequired

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.

Body
task_idintegerOptional

Optional. ID of a single service work. Give this or task_ids.

task_idsinteger[]Optional

Optional. IDs of service works. Give this or task_id.

Responses
200

Service work deleted

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/delete
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 service task report

post
/vehicle/service_task/download

Download a report of service works, using the same filters as the list operation, plus report-shaping parameters. Also accepts GET.

Authorizations
AuthorizationstringRequired

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.

Body
only_unplannedbooleanOptional

Optional. Default false. If true, only unplanned service works are included.

vehicle_idsinteger[]Optional

Optional. Restrict to these vehicles.

filterstringOptional

Optional. Text filter. Used together with conditions, both must match.

sortstring[]Optional

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.

limitintegerOptional

Optional. Maximum number of service works to return.

offsetintegerOptional

Optional. Offset for pagination.

add_filename_headerbooleanOptional

Optional. Default false. If true, a Content-Disposition header is appended to the response.

return_predictionbooleanOptional

Optional. Default true. Include the legacy prediction field.

formatstring · enumOptional

Optional. Default pdf. Report format.

Possible values:
group_bystring · enumOptional

Optional. Group the report by vehicle or by status.

Possible values:
Responses
200

The report as a file.

text/csv
stringOptional
post/vehicle/service_task/download
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"
  ]
}
text

Lists service works across all of the user's vehicles.

List service tasks

post
/vehicle/service_task/list

List service works across all of the user's vehicles. Callable with an empty body. Also accepts GET.

Authorizations
AuthorizationstringRequired

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.

Body
only_unplannedbooleanOptional

Optional. Default false. If true, only unplanned service works are included.

vehicle_idsinteger[]Optional

Optional. Restrict to these vehicles.

filterstringOptional

Optional. Text filter. Used together with conditions, both must match.

sortstring[]Optional

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.

limitintegerOptional

Optional. Maximum number of service works to return.

offsetintegerOptional

Optional. Offset for pagination.

add_filename_headerbooleanOptional

Optional. Default false. If true, a Content-Disposition header is appended to the response.

return_predictionbooleanOptional

Optional. Default true. Include the legacy prediction field.

Responses
200

Matching service works

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/list
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.

Read service task

post
/vehicle/service_task/read

Return one service work by ID. Also accepts GET.

Authorizations
AuthorizationstringRequired

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.

Body
task_idintegerRequired

ID of the service work.

return_predictionbooleanOptional

Optional. Default true. Include the legacy prediction field.

Responses
200

The service work

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/read
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 service task status

post
/vehicle/service_task/set_status

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.

Authorizations
AuthorizationstringRequired

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.

Body
task_idintegerRequired

ID of the service work.

statusstring · enumRequired

The new status. Only done is allowed for now.

Possible values:
Responses
200

Status set

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/set_status
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 service task

post
/vehicle/service_task/update

Update a service work. Pass a full task object including its id.

completion is not editable.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

Service work updated

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/service_task/update
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

Endpoint
Method
What it does

POST

Create service task file

Last updated

Was this helpful?