Scheduling routes
These actions allow creating scheduled routes similarly to regular routes.
Route schedule entry
{
"id": 111,
"user_id": 3,
"tracker_id": 22,
"label": "Shop",
"description": "Buy things",
"parameters": {
"type": "month_days",
"month_days": [1, 10, 31]
}
}id- int. Primary key. Used in the update call, IGNORED in create.user_id- int. User id. IGNORED in create/update.tracker_id- int. An ID of the tracker to which all generated tasks assigned. Nullable.parameters- schedule parameters can be "weekdays" or "month_days". Described below.
Checkpoint schedule entry
id- int. Primary key. Used in the update call, IGNORED in create.user_id- int. User id. IGNORED in create/update.tracker_id- int. An ID of the tracker to which all generated tasks assigned. Nullable.location- location associated with this task. Cannot be null.address- string. Address of the location.radius- int. Radius of location zone in meters.
max_delay- int. Maximum allowed task completion delay in minutes.min_stay_duration- int. Minimum duration of stay in task zone for task completion, minutes.min_arrival_duration- int. Visits less than these values will be ignored, minutes.from_time- string time. Time of day which defines start of the task within the days.duration- int. Total duration in minutes between "from" and "to" for generated tasks.tags- int array. List of tag IDs.form_template_id- int. Form template id. Nullable.
<schedule_parameters> can be one of the following:
weekdays - task creation based on week day.
month_days - task creation based on day of month.
API actions
API base path: /task/schedule/route.
create
Creates route schedule with checkpoints.
Parameters
Example
cURL
Response
id- int. An ID of the created route schedule entry.
Errors
General types.
delete
Deletes route schedule with checkpoints.
Parameters
id
Route schedule ID.
int
Examples
Response
Errors
General types.
update
Updates route schedule with checkpoints. If checkpoint is being created, then it should have no id. If checkpoint is being updated, then it should have an ID. If old checkpoint is not present in request, then it will be deleted.
Parameters
Example
cURL
Response
Errors
General types.
Last updated
Was this helpful?