Report schedule
Deliver a report to a user's mailbox on a repeating schedule.
A report schedule runs a report on a repeating basis and emails the result, so a weekly mileage summary arrives without anyone asking for it.
A schedule holds the same report definition that report/tracker/generate takes, plus when to run it and where to send it.
Schedule entry object
The report block takes the same parameters as report/tracker/generate, including the optional include_places_in_address and include_zones_in_address flags. Both are boolean and default to true, and they decide whether place and geofence names are prefixed to addresses in the generated report.
API actions
API base path: /report/schedule.
Every operation on this page requires the reports sub-user right.
Create a schedule that generates a report regularly and emails it, and return its ID.
The parameters.report block takes the same fields as report/tracker/generate, minus the period, which comes from parameters.period instead.
Requires the reports 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
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: one of the trackers is on a plan with reports disabled.
Error 217: one or more tracker IDs do not exist or belong to another user. Error 222: the report plugin was not found.
Error response object
Always false.
POST /v2/report/schedule/create HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 313
{
"schedule": {
"id": 1,
"enabled": true,
"parameters": {
"period": "text",
"schedule": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
},
"report": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"emails": [
"text"
],
"email_format": "pdf",
"email_zip": true,
"sending_time": "text"
},
"fire_time": "text",
"last_result": {
"success": true,
"id": 1
}
}
}{
"success": false,
"status": {
"code": 201,
"description": "Not found in database"
},
"errors": [
{
"parameter": "limit",
"error": "must not be null"
}
]
}Errors
These errors come in addition to the general error codes:
217 - List contains nonexistent entities, when a tracker ID belongs to no tracker or to another user's.
222 - Plugin not found, when no report plugin has the given ID.
236 - Feature unavailable due to tariff restrictions.
Update a report schedule. Pass a full schedule object including its id.
fire_time and last_result are ignored: both are set by the platform.
Requires the reports 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
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: one of the trackers is on a plan with reports disabled.
Error 217: one or more tracker IDs do not exist or belong to another user. Error 222: the report plugin was not found.
Error response object
Always false.
POST /v2/report/schedule/update HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 313
{
"schedule": {
"id": 1,
"enabled": true,
"parameters": {
"period": "text",
"schedule": {
"type": "weekdays",
"weekdays": [
1
],
"month_days": [
1
]
},
"report": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"emails": [
"text"
],
"email_format": "pdf",
"email_zip": true,
"sending_time": "text"
},
"fire_time": "text",
"last_result": {
"success": true,
"id": 1
}
}
}{
"success": false,
"status": {
"code": 201,
"description": "Not found in database"
},
"errors": [
{
"parameter": "limit",
"error": "must not be null"
}
]
}Errors
These errors come in addition to the general error codes:
217 - List contains nonexistent entities, when a tracker ID belongs to no tracker or to another user's.
222 - Plugin not found, when no report plugin has the given ID.
236 - Feature unavailable due to tariff restrictions, when a device's tariff does not allow reports.
List the report schedules of the current user.
Requires the reports right.
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.
The schedules
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
Always false.
POST /v2/report/schedule/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": false,
"status": {
"code": 201,
"description": "Not found in database"
},
"errors": [
{
"parameter": "limit",
"error": "must not be null"
}
]
}Delete a report schedule. Reports it has already generated are left alone.
Requires the reports right.
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 the report schedule to delete.
Schedule deleted
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
Always false.
POST /v2/report/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": false,
"status": {
"code": 201,
"description": "Not found in database"
},
"errors": [
{
"parameter": "limit",
"error": "must not be null"
}
]
}Errors
These errors come in addition to the general error codes:
201 - Not found in the database, when no schedule has the given ID.
Last updated
Was this helpful?