Route schedules
Scheduled routes, created on a repeating basis like recurring tasks.
These operations schedule routes the same way recurring tasks schedule single tasks: the Navixy platform creates the route and its checkpoints on each day the schedule is due.
Route schedule entry
Checkpoint schedule entry
The parameters of a route schedule are the schedule parameters described on the recurring tasks page: weekdays for creation on days of the week, where 1 is Monday and 7 is Sunday, or month_days for creation on days of the month, from 1 to 31.
API actions
API base path: /task/schedule/route.
Required sub-user rights: task_update.
Create a route schedule together with its checkpoint schedules, and return its ID.
At least 2 checkpoints are required, the same rule as a real route.
Requires the task_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.
The created route schedule
true if request finished successfully.
trueID of the new route schedule entry.
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/task/schedule/route/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 473
{
"route": {
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
}
},
"checkpoints": [
{
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"parent_id": 1,
"order": 1,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"from_time": "text",
"duration": 1,
"max_delay": 1,
"min_stay_duration": 1,
"min_arrival_duration": 1,
"tags": [
1
],
"form_template_id": null,
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}{
"success": true,
"id": 1
}Errors
These errors come in addition to the general error codes:
General types.
Required sub-user rights: task_update.
Delete a route schedule and its checkpoint schedules by ID.
Also accepts GET with the same parameters as query-string values.
Requires the task_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 the route schedule.
Route schedule 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/task/schedule/route/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 8
{
"id": 1
}{
"success": true
}Errors
These errors come in addition to the general error codes:
General types.
If a checkpoint is being created, then it should have no id. If a checkpoint is being updated, then it should have an ID. If an old checkpoint is not present in the request, then it will be deleted.
Required sub-user rights: task_update.
Update a route schedule and its checkpoint schedules.
A checkpoint carrying an id is updated, one without an id is created, and any existing checkpoint absent from the request is deleted. When checkpoints is given it must still hold at least 2.
Requires the task_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.
Route schedule 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 response object
POST /v2/task/schedule/route/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 473
{
"route": {
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
}
},
"checkpoints": [
{
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"parent_id": 1,
"order": 1,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"from_time": "text",
"duration": 1,
"max_delay": 1,
"min_stay_duration": 1,
"min_arrival_duration": 1,
"tags": [
1
],
"form_template_id": null,
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}{
"success": true
}Errors
These errors come in addition to the general error codes:
General types.
Last updated
Was this helpful?