Contact us LoginLIVE DEMOFREE TRIAL

create(…)

Create new route.

required subuser rights: task_update

parameters:

namedescriptiontype
route<route> object without fields which are IGNOREDJSON object
checkpoints<checkpoints> array of checkpoints object without fields which are IGNOREDJSON array

Minimal route object to create a new route must contain:

{
"tracker_id": 22, //optional, if the field is specified then the task will be assigned to the employee associated with the tracker, otherwise it won't be assigned to anybody
"label": "Name", //task name, length 1-200 characters
"description": "Description example" //task description, length 0-1024 characters
}

Also need checkpoints list in order of execution, checkpoints from and to must be agreed with each other i.e. checkpoint to cannot be before ‘from’ of preceding items.

{
"tracker_id": 22, //optional, if the field is specified then the task will be assigned to the employee associated with the tracker, otherwise it won't be assigned to anybody
"location": { //area (circle geofence), entering and leaving of geofence will be controlled
"lat": 56.83717295, //latitude
"lng": 60.59761920, //longitude
"radius": 150 //radius in meters
},
"label": "Name", //task name, length 1-200 characters
"description": "Description example", //task description, length 0-1024 characters
"from": "2014-02-03 04:05:06", //start date of the interval - when the specified location has to be visited (in the user's time zone)
"to": "2014-03-04 05:06:07"//end date of the interval - when the specified location has to be visited (in the user's time zone)
}

Call returns JSON object of the created route.

<route> =
   {
        "id": 111,   
        "user_id": 3, 
        "tracker_id": 22,
        "label": "Deliver parcels",  
        "description": "Quickly",
        "creation_date": "2014-01-02 03:04:05", 
        "from": "2014-02-03 04:05:06",
        "to": "2014-03-04 05:06:07",
        "external_id": null, 
        "status": "assigned",
        "status_change_date": "2014-01-02 03:04:05",
        "origin": "manual",
        "checkpoint_ids": [2977,2978], //array of route checkpoint ids in order of execution
        "type": "route"
    }

errors:

  • 201 – Not found in database (if task.tracker_id is not null and belongs to nonexistent tracker)
  • 236 – Feature unavailable due to tariff restrictions (if device’s tariff does not allow usage of tasks)

If you have more questions please contact our support team

Contacts

USA: +1 858 225 46 88

Mexico: +52 558 526 11 25

UK: +44 203 807 64 62

Russia: +7 495 128 35 56

We use сookies to improve our website, products and related services, analyze site traffic, and serve targeted advertisements. If you continue to use our services, you consent to our use of сookies. Read more

Log in