plan_sequence.php
Inhaltsverzeichnis
Funktion zur Wegoptimierung (nur für Kunden mit PTV als Kartenanbieter bzw. Kunden welche die Multi Karten Option gebucht haben)
Beschreibung
POST plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=points_json_array
Parameters
Parameter | Beschreibung | Typ | Hinweis | Pflicht |
---|---|---|---|---|
company | RTI Firmenschlüssel | string | ja | |
vehicle | RTI Fahrzeugschlüssel | string | Es muss immer einer der Parameter vehicle, group oder import angegeben werden! | (ja) |
group | RTI Gruppenschlüssel | string | Es muss immer einer der Parameter vehicle, group oder import angegeben werden! | (ja) |
import | RTI Importschlüssel (alle Fahrzeuge) | string | Es muss immer einer der Parameter vehicle, group oder import angegeben werden! | (ja) |
profile |
| string | Standard ist "car" | nein |
points | Die Aufträge/ Anfahrtsziele welche optimiert werden sollen | json-array | Beschreibung siehe points_json_array | ja |
points_json_array
Parameter | Beschreibung | Typ | Hinweis | Pflicht |
---|---|---|---|---|
id | int | ja | ||
lat | Latitude des punktes | double | ja | |
lon | Longitude des punktes | double | ja | |
meta | string | nein | ||
type |
| string | damit kann man den Start und/oder das Ende festlegen | nein |
Rückgabe
Es wird ein String zurückgegeben. Bei Erfolg wird als Antwort "OK" zurückgegeben. Ansonsten wird ein "ERROR:Beschreibung" zurückgegeben
JSON Format
Parameter | Beschreibung | Typ |
---|---|---|
id | übergebene id | int |
type | "start", "end" oder "" | string |
lat | Latitude | float |
lon | Longitude | float |
meta | übergeben Meta Beschreibung | string |
Beispiel
{
[
{
"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"
}
]
}
Beispiele
Mit festem Start und Ende
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"}]
Ohne feste Punkte
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}]
Mit festem Startpunkt
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}]
Mit festem Endpunkt
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"}]
Fehler
Fehler | Beschreibung |
---|---|
ERROR:PTV_OR_MULTI_MAP_IS_REQUIRED | Sie brauchen PTV als Kartenanbieter bzw. die kostenpflichtige Option "Mulit Karte", bitte wenden Sie sich an unseren Vertrieb |
ERROR:NO_CAR_IN_MIN_BUSINESS_TARIFF | Es muss mind. 1 Fahrzeug einen Business Tarif oder höher haben |
ERROR:NOT_POINTS_GIVEN | Keine Punkte übergeben |
ERROR:INVALID_POINTS | Es ist kein Array an Punkten |