> For the complete documentation index, see [llms.txt](https://docs.mapsindoors.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mapsindoors.com/sdks-and-frameworks/integration-api/updating-data.md).

# Updating Data

The Integration API changes existing data with PUT. Every PUT endpoint takes an array of objects, even when you only change one object, and every object needs its `id`.

The PUT endpoints differ in what happens to a field you leave out of the body. Some keep the stored value, others clear it.

## Read, modify, write

This pattern is safe on every PUT endpoint:

1. Read the objects with the GET of the same endpoint.
2. Change only the fields you want to change.
3. Send the whole objects back with the PUT.

Every GET returns the fields its PUT reads, so sending back what you read never clears a field by accident.

{% hint style="warning" %}
Do not build a PUT body from scratch with only the fields you want to change. On most endpoints, a field you leave out is cleared.
{% endhint %}

## Fields left out, per endpoint

* `PUT /{apiKey}/api/geodata` keeps the top-level fields you leave out. A field you send replaces the stored value whole. Send `properties` and `baseTypeProperties` complete, as read from the GET, even when you change only one value in them.
* `PUT /{apiKey}/api/categories` replaces every field. A field you leave out is cleared.
* `PUT /{apiKey}/api/displaytypes` replaces every field except `properties`, which is merged per language. A property template you leave out is deleted, and its values are removed from locations.
* `PUT /{apiKey}/api/routing/routeelements` replaces `waitTime`, `restrictions` and `onewayDirection`. See [Route Access](https://docs.mapsindoors.com/sdks-and-frameworks/integration-api/route-access.md) for how to open and close route elements.

The [OpenAPI Specification](https://docs.mapsindoors.com/sdks-and-frameworks/integration-api/openapi-specification.md) describes each endpoint in detail.


---

# 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.mapsindoors.com/sdks-and-frameworks/integration-api/updating-data.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.
