Content | Create and update routes

A) Create route

Prerequisite:

You have created a guidebook or library which shall contain the route. This example creates a new route in the guidebook with the internal ID "bbbbbb".

  • Replace bbbbbb with your guidebook-ID, you can find this in your guidebook > Actions > Edit > Internal ID

  • Replace xxxxxx-xxxxxx-xxxxxx-xxxxxx with the API key, you can find this under Account Settings > General Settings > API Key

curl --location --request POST 'https://services.schneidergeo.com/content/guidebook/bbbbbbb/route' 
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data-raw '{
    "externalid": "aa-bb-cc",
    "remark":"This is a test route",
    "names": {
        "en": "Testroute in Arnhem",
        "de": ""
    },
    "descriptions": {
        "en": "",
        "de": ""
    },
    "color": "1c21e1",
    "icon": {
            "name": "hiking"
    },
    "category": {
        "names": {
            "en": "Imported",
            "de": ""
        }    
    },
    "enabled": true,
    "waypoints": [
        {
            "lat": 51.96252,
            "lon": 5.88772,
            "ele": 13
        },
        {
            "lat": 51.96253,
            "lon": 5.88772,
            "ele": 13
        },
        {
            "lat": 51.9628,
            "lon": 5.88796,
            "ele": 13
        },
        {
            "lat": 51.96359,
            "lon": 5.88833,
            "ele": 14
        },
        {
            "lat": 51.96438,
            "lon": 5.88871,
            "ele": 11
        },
        {
            "lat": 51.96495,
            "lon": 5.88885,
            "ele": 9
        },
        {
            "lat": 51.96552,
            "lon": 5.889,
            "ele": 9
        }
        
    ]
}'

B) Update route

This example updates the route with internal ID "rrrrrr" .

  • Replace rrrrrr with the route ID, you can find it in the Edit Route > Identifiers section.

  • Replace xxxxxx-xxxxxx-xxxxxx-xxxxxx with the API key, you can find this in Account Settings > General Settings > API Key

curl --location --request PUT 'https://services.schneidergeo.com/content/geodata/route/rrrrrr' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data-raw '{
    "externalid": "aa-bb-cc",
    "remark":"This is a test route",
    "names": {
        "en": "Testroute in Arnhem",
        "de": ""
    },
    "descriptions": {
        "en": "",
        "de": ""
    },
    "color": "1c21e1",
    "icon": {
            "name": "hiking"
    },
    "category": {
        "names": {
            "en": "Imported",
            "de": ""
        }    
    },
    "enabled": true,
    "waypoints": [
        {
            "lat": 51.96252,
            "lon": 5.88772,
            "ele": 13
        },
        {
            "lat": 51.96253,
            "lon": 5.88772,
            "ele": 13
        },
        {
            "lat": 51.9628,
            "lon": 5.88796,
            "ele": 13
        },
        {
            "lat": 51.96359,
            "lon": 5.88833,
            "ele": 14
        },
        {
            "lat": 51.96438,
            "lon": 5.88871,
            "ele": 11
        },
        {
            "lat": 51.96495,
            "lon": 5.88885,
            "ele": 9
        },
        {
            "lat": 51.96552,
            "lon": 5.889,
            "ele": 9
        }
        
    ]
}'

Last updated