Wiki source code of plan_sequence.php
Last modified by YellowFox_RD on 2025/01/23 10:07
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | (% class="box" %) |
![]() |
3.1 | 2 | ((( |
3 | Table of Contents | ||
4 | ))) | ||
5 | |||
![]() |
1.1 | 6 | {{toc/}} |
7 | |||
![]() |
3.1 | 8 | Route optimization function (only for customers with PTV as map provider or customers who have booked the Multi Map Option) |
![]() |
1.1 | 9 | |
10 | = Beschreibung = | ||
![]() |
3.1 | 11 | |
12 | (% class="blue mark" %)**POST**(%%)** plan_sequence.php?company**=//COMPANY_RTIKEY//**&vehicle**=//VEHICLE_RTIKEY//**&profile=**truck**&points=points_json_array** | ||
13 | |||
![]() |
1.1 | 14 | = Parameters = |
![]() |
3.1 | 15 | |
16 | |=Parameter|=Description|=Type|=Notes|=Mandatory | ||
17 | |company|RTI Company key|string| |Yes | ||
18 | |vehicle|RTI Vehicle key|string|One of the parameters vehicle, group or import must always be given!|(Yes) | ||
19 | |group|RTI Group key|string|One of the parameters vehicle, group or import must always be given!|(Yes) | ||
20 | |import|RTI Import key (All vehicles)|string|One of the parameters vehicle, group or import must always be given!|(Yes) | ||
![]() |
1.1 | 21 | |profile|((( |
22 | * truck | ||
23 | * car | ||
![]() |
3.1 | 24 | )))|string|Standard is "car"|No |
25 | |points|The orders / destinations which should be optimized|json-array|See description "points_json_array"|Yes | ||
![]() |
1.1 | 26 | |
![]() |
3.1 | 27 | == **points_json_array** == |
28 | |||
29 | |=Parameter|=Description|=Type|=Notes|=Mandatory | ||
30 | |id| |int| |Yes | ||
31 | |lat|Latitude of the point|double| |Yes | ||
32 | |lon|Longitude of the point|double| |Yes | ||
33 | |meta| |string| |No | ||
![]() |
1.1 | 34 | |type|((( |
35 | * start | ||
36 | * end | ||
![]() |
3.1 | 37 | )))|string|with this you can set the start and/or the end of the tour|No |
![]() |
1.1 | 38 | |
![]() |
3.1 | 39 | = Return = |
40 | |||
41 | A string is returned. If successful, "**OK**" is returned as response. Otherwise an "**ERROR:Description**" is returned. | ||
42 | |||
![]() |
1.1 | 43 | == JSON Format == |
![]() |
3.1 | 44 | |
45 | |=Parameter|=Description|=Type | ||
46 | |id|passed id|int | ||
![]() |
1.1 | 47 | |type|"start", "end" oder ""|string |
48 | |lat|Latitude|float | ||
49 | |lon|Longitude|float | ||
![]() |
3.1 | 50 | |meta|passed Meta Description|string |
![]() |
1.1 | 51 | |
![]() |
3.1 | 52 | **example** |
![]() |
1.1 | 53 | {{code language="js"}}{ |
![]() |
3.1 | 54 | [ |
55 | { | ||
56 | "id": 1, | ||
57 | "type": "start", | ||
58 | "lat": 51.0311742, | ||
59 | "lon": 13.6034718, | ||
60 | "meta": "YF" | ||
61 | }, | ||
62 | { | ||
63 | "id": 3, | ||
64 | "type": "", | ||
65 | "lat": 51.042972, | ||
66 | "lon": 13.794998, | ||
67 | "meta": "Dresden" | ||
68 | }, | ||
69 | { | ||
70 | "id": 2, | ||
71 | "type": "", | ||
72 | "lat": 51.268333, | ||
73 | "lon": 14.326741, | ||
74 | "meta": "Neschwitz" | ||
75 | }, | ||
76 | { | ||
77 | "id": 4, | ||
78 | "type": "", | ||
79 | "lat": 51.305518, | ||
80 | "lon": 13.295992, | ||
81 | "meta": "Riesa" | ||
82 | }, | ||
83 | { | ||
84 | "id": 5, | ||
85 | "type": "end", | ||
86 | "lat": 51.0311742, | ||
87 | "lon": 13.6034718, | ||
88 | "meta": "YF" | ||
89 | } | ||
90 | ] | ||
![]() |
1.1 | 91 | }{{/code}} |
92 | |||
![]() |
3.1 | 93 | = Example = |
94 | |||
95 | **with fixed start and end** | ||
![]() |
1.1 | 96 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}] |
97 | |||
98 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}]{{/code}} | ||
99 | |||
![]() |
3.1 | 100 | **without fixed points** |
![]() |
1.1 | 101 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}] |
102 | |||
103 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}]{{/code}} | ||
104 | |||
![]() |
3.1 | 105 | **with fixed starting point** |
![]() |
1.1 | 106 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}] |
107 | |||
108 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}]{{/code}} | ||
109 | |||
![]() |
3.1 | 110 | **with fixed ending point** |
![]() |
1.1 | 111 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}] |
112 | |||
113 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}]{{/code}} | ||
114 | |||
![]() |
3.1 | 115 | = Error = |
116 | |||
117 | |=Error|=Description | ||
118 | |ERROR:PTV_OR_MULTI_MAP_IS_REQUIRED|You need PTV as a card provider or the paid option "multi card", please contact our sales department | ||
119 | |ERROR:NO_CAR_IN_MIN_BUSINESS_TARIFF|At least 1 vehicle must have a business tariff or higher | ||
120 | |ERROR:NOT_POINTS_GIVEN|No points passed | ||
121 | |ERROR:INVALID_POINTS|It is not an array of points | ||
![]() |
1.1 | 122 |