> For the complete documentation index, see [llms.txt](https://docs.guibo.travel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guibo.travel/developers/content-api/content-or-create-and-update-routes.md).

# Content | 2. Routes

Create, Read, Update, Delete and List Routes in a geodata library. Methods may require your **account ID** and **API Key**.  In the curl examples on this page:&#x20;

* Replace <mark style="color:orange;">CCCCCC</mark> or `{account}` with your **account ID**. See [Overview](https://docs.guibo.travel/developers/overview#prerequisites) to find your **account ID**.
* Replace <mark style="color:orange;">xxxxxx-xxxxxx-xxxxxx-xxxxxx</mark> with the **API key**.  See [Overview](https://docs.guibo.travel/developers/overview#prerequisites) to find your **API key**.
* Replace `{link}` with the route ID (from the route's metadata, the create response, or see [List Routes](#e-list-routes)).

### A) Create Route

Create a **route** with a **Custom ID**. The `customId` is the stable id for this route when you update, delete or reference it from other GUIBO APIs (for example an **On-Demand Release** or a **Guidebook**).

Prerequisite: an existing geodata library with a **Custom ID** (`library.customId`, see [Create Geodata Library](https://docs.guibo.travel/developers/content-api/content-or-create-library-or-guidebook#a-create-geodata-library)), or an existing **Guidebook** with a **Custom ID** (`guidebook.customId`, see [Create Guidebook](https://docs.guibo.travel/developers/content-api/content-or-create-library-or-guidebook-1#a-create-guidebook)) and at least one stage (see [Content | 7. Stage](https://docs.guibo.travel/developers/content-api/content-or-create-category)).

#### Create Route in a Library

* Set `library.customId` in the request to that library's **Custom ID**.  In the following example the **Custom ID** is `MY_ROUTES_LIB`.&#x20;
* Required in body:  **account ID**, `library.customId` , `names`, `icon`, and `descriptions`.&#x20;
* Optional fields: `attributes` (`altitudeUp` / `altitudeDown` in m, `routeDistance` in km, `time` in h), `waypoints`, `remark`, and `color`. If `attributes` values are supplied, GUIBO uses these values for the route.

```json
curl --location --request POST 'https://services.schneidergeo.com/content/geodata/route' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account":"CCCCCC",
    "library": {
        "customId":"MY_ROUTES_LIB"
    },
    "customId":"CYCLE_23143534",
    "remark":"This is a test route",
    "names": {
        "en": "Testroute in Arnhem",
        "de": ""
    },
    "descriptions": {
        "en": "",
        "de": ""
    },
    "color": "1c21e1",
    "icon": {
            "name": "hiking"
    },
    "attributes": {
        "altitudeUp":"210", 
        "altitudeDown":"300", 
        "routeDistance":"12.5",
        "time":"2.5" 
    },
    "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
        }
        
    ]
}'
```

#### Create Route in a Guidebook

* Set `guidebook.customId` in the request to that guidebook's **Custom ID**.
* Required in body:  **account ID**,  `guidebook.customId`,  the target stage's `category.link`, `names`, `icon`, and `descriptions`.
* Optional fields are the same as creating routes in a Library

```json
curl --location --request POST 'https://services.schneidergeo.com/content/geodata/route' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account":"CCCCCC",
    "guidebook": {
        "customId":"MY_GUIDEBOOK"
    },
    "category": {
        "link":"catXXXXXX"
    },
    "customId":"CYCLE_4425531",
    "remark":"This is a test route",
    "names": {
        "en": "Testroute in Arnhem",
        "de": ""
    },
    "descriptions": {
        "en": "",
        "de": ""
    },
    "color": "1c21e1",
    "icon": {
            "name": "hiking"
    },
    "attributes": {
        "altitudeUp":"210", 
        "altitudeDown":"300", 
        "routeDistance":"12.5",
        "time":"2.5" 
    },
    "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
        }
        
    ]
}'
```

#### Supported Icon Names for routes:

* Motorbike
* Sledding
* Ski touring
* Hiking
* Cycling
* Ferry route
* Bus tour
* Canoeing
* Mountaineering
* Snowshoeing
* Cross-country skiing
* Running
* Driving
* Transfer
* Walking
* Segment
* E-bike
* Nordic walking
* Mountain biking

### B) Read Route

Read a Route using its `link` .&#x20;

```shellscript
curl --location --request GET 'https://services.schneidergeo.com/content/geodata/route/{link}/raw' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: application/json' 
```

### C) Update Route

Update a route using the same request body as Create.  Put the route ID in the URL as `{link}` and your **account ID** in the body.

```shellscript
curl --location --request PUT 'https://services.schneidergeo.com/content/geodata/route/{link}' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account":"CCCCCC",
    "library": {
        "customId":"RWR_ROUTES"
    },
    "customId": "CYCLE_23143534",
    "remark":"This is a test route",
    "names": {
        "en": "Testroute in Arnhem",
        "de": ""
    },
    "descriptions": {
        "en": "",
        "de": ""
    },
    "color": "1c21e1",
    "icon": {
            "name": "hiking"
    },
    "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
        }
        
    ]
}'
```

### D) Delete Route

Delete a route using your **account ID** and the route's **Custom ID**. Delete moves the route to trash.  Add the query parameter `force=true` to the URL to permanently delete it.

```bash
curl --location --request DELETE 'https://services.schneidergeo.com/content/geodata/account/{account}/external/{customId}' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx' \
--header 'Content-Type: application/json' 
```

### E) List Routes

List Routes in a library using your **account ID** and the library's **Custom ID**. List returns a lightweight metadata for each route, including: `link`, `customId`, `names`, and `lastUpdate`. To retrieve full details, content, and geometry for a specific route, see [Read Route](#b-read-route).

```shellscript
curl --location --request GET 'https://services.schneidergeo.com/content/library/{account}/{customId}/routes/metadata' \
--header 'Authorization: xxxxxx-xxxxxx-xxxxxx-xxxxxx'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.guibo.travel/developers/content-api/content-or-create-and-update-routes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
