Depending on set flags format of response can differ.
This chapter describes flags that can be applied to routes and parts of resulting JSON which they are responsible for. If you specify several flags, then parts will be gathered into one JSON.
Route flags:
Value | Description |
---|---|
0x00000001 | base flag |
0x00000002 | custom properties |
0x00000004 | billing properties |
0x00000040 | GUID |
0x00000080 | administrative fields |
0x00000100 | configuration |
0x00000200 | check points |
0x00000400 | schedules |
0x00000800 | rounds |
0x3FFFFFFFFFFFFFFF | set all possible flags to route |
Flag - 0x00000001
{ "nm":<text>, /* name */ "cls":<uint>, /* superclass ID: "avl_route" */ "id":<unit>, /* route ID */ "uacl":<unit> /* current user access level for route */ }
Flag - 0x00000002
You can store any route data you need in custom properties.
{ "prp":{} /* custom properties */ }
Flag - 0x00000004
{ "crt":<uint>, /* creator ID */ "bact":<unit> /* account ID */ }
Flag - 0x00000040
{ "gd":<text> /* route GUID */ }
Flag - 0x00000080
{ "aflds":{ /* administrative fields */ <text>:{ /* sequence number */ "id":<uint>, /* ID */ "n":<text>, /* name */ "v":<text> /* value */ }, ... }, "afldsmax":<long>, /* maximal count of administrative fields (-1 - unlimited) */ }
Flag - 0x00000100
{ "rcfg":{ /* configuration */ "color":<long>, /* color (ARGB) */ "descr":<text>, /* description */ "units":[<long>] /* array of units IDs */ } }
Flag - 0x00000200
{ "rpts":[ /* check points */ { "n":<text>, /* name */ "f":<uint>, /* type (see below) */ "u":<long>, /* unit ID, 0 - if check point not of type "check point from units" */ "y":<double>, /* longitude */ "x":<double>, /* latitude */ "r":<uint> /* radius, m */ }, ... ] }
Types of check points:
Flag - 0x00000400
{ "rs":{ /* list of schedules */ <text>:{ /* sequence number of schedule */ "id":<long>, /* schedule ID */ "n":<text>, /* name */ "f":<uint>, /* type */ "tz":<uint>, /* time zone */ "cfg":{ /* custom configuration (example) */ "autoName":<byte>, /* use automatically generated name: 0 - no, 1 - yes */ "enabled":<byte>, /* auto create rounds for current schedule: 1 - enable, 0 - disable */ "name":<text>, /* round name */ "roundFlags":<uint>, /* round flags */ "units":[<long>], /* array of units IDs */ "validityPeriod":<uint> /* validity period */ }, "tm":[ /* time of passing points */ { "at":<uint>, /* arrival time */ "ad":<uint>, /* deviation from arrival time */ "dt":<uint>, /* departure time */ "dd":<uint> /* deviation from departure time */ } ], "sch":{ /* time limitation */ "f1":<uint>, /* beginning of interval 1 */ "f2":<uint>, /* beginning of interval 2 */ "t1":<uint>, /* ending of interval 1 */ "t2":<uint>, /* ending of interval 2 */ "m":<uint>, /* days of month mask */ "y":<uint>, /* months mask */ "w":<uint> /* days of week mask */ } }, ... } }
Types of schedules are described in the chapter Schedules: create, edit, delete.
Flag - 0x00000800
{ "rr":{ /* rounds */ <text>:{ /* sequence number of round */ "id":<long>, /* round ID */ "n":<text>, /* name */ "d":<text>, /* description */ "sh":<text>, /* schedule name */ "f":<uint>, /* round flags */ "tz":<uint>, /* time zone */ "u":<long>, /* unit, assigned on this round: if not specified - first unit of array "cu", which go out from first check point, will be assigned */ "at":<uint>, /* activation time */ "vt":<uint>, /* time from which validity period begins */ "vp":<uint>, /* validity period */ "sts":<uint>, /* state flags */ "st":{ /* round state */ "st":{ /* general round state */ "pi":<uint>, /* check point index, if 4294967295 - round isn't started */ "ps":<uint>, /* state flags + event flags (see below) */ "ut":<uint> /* last event time */ }, "pts":{ /* состояние по точкам */ <text>:{ /* check point ID */ "st": <uint>, /* event flags */ "tm": <uint> /* last event time */ }, ... } } }, ... } }
Values of round, state and event flags are described in the chapter Round information.