Route optimization function (only for customers with PTV as map provider or customers who have booked the Multi Map Option)
Beschreibung
POST plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=points_json_array
Parameters
Parameter | Description | Type | Notes | Mandatory |
---|---|---|---|---|
company | RTI Company key | string | Yes | |
vehicle | RTI Vehicle key | string | One of the parameters vehicle, group or import must always be given! | (Yes) |
group | RTI Group key | string | One of the parameters vehicle, group or import must always be given! | (Yes) |
import | RTI Import key (All vehicles) | string | One of the parameters vehicle, group or import must always be given! | (Yes) |
profile |
| string | Standard is "car" | No |
points | The orders / destinations which should be optimized | json-array | See description "points_json_array" | Yes |
points_json_array
Parameter | Description | Type | Notes | Mandatory |
---|---|---|---|---|
id | int | Yes | ||
lat | Latitude of the point | double | Yes | |
lon | Longitude of the point | double | Yes | |
meta | string | No | ||
type |
| string | with this you can set the start and/or the end of the tour | No |
Return
A string is returned. If successful, "OK" is returned as response. Otherwise an "ERROR:Description" is returned.
JSON Format
Parameter | Description | Type |
---|---|---|
id | passed id | int |
type | "start", "end" oder "" | string |
lat | Latitude | float |
lon | Longitude | float |
meta | passed Meta Description | string |
example
{ [ { "id": 1, "type": "start", "lat": 51.0311742, "lon": 13.6034718, "meta": "YF" }, { "id": 3, "type": "", "lat": 51.042972, "lon": 13.794998, "meta": "Dresden" }, { "id": 2, "type": "", "lat": 51.268333, "lon": 14.326741, "meta": "Neschwitz" }, { "id": 4, "type": "", "lat": 51.305518, "lon": 13.295992, "meta": "Riesa" }, { "id": 5, "type": "end", "lat": 51.0311742, "lon": 13.6034718, "meta": "YF" } ] }
Example
with fixed start and end
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"}] 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"}]
without fixed points
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}] 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}]
with fixed starting point
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}] 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}]
with fixed ending point
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"}] 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"}]
Error
Error | Description |
---|---|
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 |
ERROR:NO_CAR_IN_MIN_BUSINESS_TARIFF | At least 1 vehicle must have a business tariff or higher |
ERROR:NOT_POINTS_GIVEN | No points passed |
ERROR:INVALID_POINTS | It is not an array of points |