Routen anlegen und aktualisieren
A) Route anlegen
Voraussetzung:
Du hast einen Reiseplan angelegt, in der die neue Route gespeichert werden soll
Das Anlegen erfolgt über RESTful Service per http. Dieses Beispiel legt eine neue Route im Reiseplan mit der internen ID "bbbbbb" an. Der Body des Requests kann Daten im GPX Format ODER im Schneider Geo JSON Format beinhalten.
-
Ersetze bbbbbb mit der Reiseplan-ID, diesen findest du im Reiseplan unter > Bearbeiten > Interne ID
-
Ersetze xxxxxx-xxxxxx-xxxxxx-xxxxxx mit dem API Schlüssel, diesen findest du unter Kontoeinstellungen > Allgemeine Einstellungen > API Schlüssel
curl --location --request POST 'https://api.schneidergeo.com/rest/track/bbbbbb' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data-raw '{
"name": {
"de": "Niederdorf\/Villabassa bis Toblach\/ Dobbiaco ",
"en": "Niederdorf\/Villabassa to Toblach\/ Dobbiaco "
},
"description": {
"de": "<p>Starting at the watershed of the rivers Drau and Rienz on the\nToblacher Sattel, you ride alongside the Drau through South\nTyrol and on to East Tyrol and the town of Lienz. The impressive\nmountains of the Dolomites line the route.<\/p>",
"en": "<p>Starting at the watershed of the rivers Drau and Rienz on the\nToblacher Sattel, you ride alongside the Drau through South\nTyrol and on to East Tyrol and the town of Lienz. The impressive\nmountains of the Dolomites line the route.<\/p>"
},
"centerlng": 12.569021974681855,
"centerlat": 46.7764295,
"color": "1c21e1",
"geotype": 2,
"icon": "cycling",
"zoom": 11,
"waypoints": [
{
"lon": 12.168974,
"lat": 46.738134,
"ele": 1147.1
}
]
}
],
"supplements": [
{
"lng": 12.282629013061525,
"type": "star",
"title": "Stiftskirche Innichen\/Collegiate Church San Candido",
"lat": 46.7329340067877
},
],
"meta": {
"author": "schneidergeo.com",
"version": 2
},
"attributes": {
"elevationChart": "1",
"phone": "",
"navi": "1",
"web": "https:\/\/www.similaunhuette.com",
},
"category": {
"name": {
"de": "Radtouren",
"en": "Cycling"
}
}
}'
B) Route aktualisieren
Voraussetzung:
Du hast einen Reiseplan mit einer Route angelegt in die Route.
Das Anlegen erfolgt über RESTful Service per http. Dieses Beispiel verändert die Route mit der internen ID "rrrrrr" Reiseplan mit der internen ID "bbbbbb" an.
-
Ersetze bbbbbb mit der Reiseplan-ID, diesen findest du im Reiseplan unter > Bearbeiten > Interne ID
-
Ersete rrrrrr mit der Routen-ID, diese findest du im unter Route bearbeiten > Identifikatoren
-
Ersetze xxxxxx-xxxxxx-xxxxxx-xxxxxx mit dem API Schlüssel, diesen findest du unter Kontoeinstellungen > Allgemeine Einstellungen > API Schlüssel
curl --location --request PUT 'https://api.schneidergeo.com/rest/track/bbbbbb/rrrrrr' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data-raw '{
"name": {
"de": "Niederdorf\/Villabassa bis Toblach\/ Dobbiaco ",
"en": "Niederdorf\/Villabassa to Toblach\/ Dobbiaco "
},
"description": {
"de": "<p>Starting at the watershed of the rivers Drau and Rienz on the\nToblacher Sattel, you ride alongside the Drau through South\nTyrol and on to East Tyrol and the town of Lienz. The impressive\nmountains of the Dolomites line the route.<\/p>",
"en": "<p>Starting at the watershed of the rivers Drau and Rienz on the\nToblacher Sattel, you ride alongside the Drau through South\nTyrol and on to East Tyrol and the town of Lienz. The impressive\nmountains of the Dolomites line the route.<\/p>"
},
"centerlng": 12.569021974681855,
"centerlat": 46.7764295,
"color": "1c21e1",
"geotype": 2,
"icon": "cycling",
"zoom": 11,
"waypoints": [
{
"lon": 12.168974,
"lat": 46.738134,
"ele": 1147.1
}
]
}
],
"supplements": [
{
"lng": 12.282629013061525,
"type": "star",
"title": "Stiftskirche Innichen\/Collegiate Church San Candido",
"lat": 46.7329340067877
},
],
"meta": {
"author": "schneidergeo.com",
"version": 2
},
"attributes": {
"elevationChart": "1",
"phone": "",
"navi": "1",
"web": "https:\/\/www.similaunhuette.com",
},
"category": {
"name": {
"de": "Radtouren",
"en": "Cycling"
}
}
}'