Schedule
Schedule entries that create tasks automatically, each day they are due.
A task schedule creates tasks automatically instead of someone creating the same task by hand every week. Shortly after midnight in the user's timezone, the Navixy platform checks the schedule, and any task due to start that day is created and assigned to its employee.
A schedule entry looks much like a task, with one difference that matters when writing one. A task carries from and to as specific dates and times; a schedule entry carries from_time, duration, and parameters instead, because it describes a shape rather than an occurrence.
Task schedule entry object
API actions
API base path: /task/schedule.
Operations that list no errors of their own return only the general error codes.
Required sub-user rights: task_update.
Create a task schedule, and return its ID.
Just after midnight in the user's own time zone, the platform checks every schedule and creates the tasks due that day, assigning them where an assignee is set.
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 schedule
true if request finished successfully.
trueID of the new 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 236: the tracker's plan does not allow tasks.
Error 208: the tracker exists but is blocked, normally because its tariff ended.
Error 204: schedule.form_template_id names a form template that does not exist.
Error response object
POST /v2/task/schedule/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 373
{
"schedule": {
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"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,
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
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:
201 - Not found in the database - if schedule.tracker_id belongs to nonexistent tracker.
204 - Entity not found - if schedule.form_template_id belongs to nonexistent form template.
208 - Device blocked - if tracker exists but was blocked due to tariff restrictions or some other reason.
236 - Feature unavailable due to tariff restrictions - if device's tariff does not allow usage of tasks.
Required sub-user rights: task_update.
Delete a task schedule by ID. Tasks it has already generated are left alone.
Note the parameter is schedule_id, not id, unlike task/schedule/read.
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 task schedule to delete.
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/delete HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"schedule_id": 1
}{
"success": true
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database - if there is no task schedule with such an ID.
This call also returns all unassigned task schedules.
List the task or route schedules of the current user, including every unassigned one.
Callable with an empty body. 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.
Optional. IDs of the trackers the schedules are assigned to.
Optional. Filter over schedule label and description.
Optional. Tag IDs. A schedule must carry all the tags in the list to be returned.
Matching schedules
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/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"trackers": [
1
],
"filter": "text",
"tag_ids": [
1
],
"types": [
"task"
]
}{
"success": true,
"list": [
{
"id": 1,
"user_id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"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,
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
},
"tags": [
1
],
"form_template_id": null,
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"type": "task",
"files": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
]
}Return a task, route or checkpoint schedule by ID.
checkpoints is present only when the ID belongs to a route schedule.
Note the parameter is id, not schedule_id, unlike task/schedule/delete.
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 task, route or checkpoint schedule.
The schedule
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/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 8
{
"id": 1
}{
"success": true,
"value": {
"id": 1,
"user_id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"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,
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
},
"tags": [
1
],
"form_template_id": null,
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"type": "task",
"files": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
},
"checkpoints": [
{
"id": 1,
"user_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"
}
}
]
}Required sub-user rights: task_update.
Update a task schedule. Pass a full schedule object including its id.
Changing a schedule does not touch tasks it has already generated.
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.
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 236: the tracker's plan does not allow tasks.
Error 208: the tracker exists but is blocked, normally because its tariff ended.
Error 204: no task schedule with this ID exists.
Error response object
POST /v2/task/schedule/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 373
{
"schedule": {
"id": 1,
"tracker_id": null,
"label": "text",
"description": "text",
"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,
"parameters": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
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:
201 - Not found in the database - if schedule.tracker_id belongs to nonexistent tracker.
204 - Entity not found - if there is no task schedule with specified ID.
208 - Device blocked - if tracker exists but was blocked due to tariff restrictions or some other reason.
236 - Feature unavailable due to tariff restrictions - if device's tariff does not allow usage of tasks.
More in this section
Task schedule checkpoints
Schedule proposals
Route schedules
Last updated
Was this helpful?