> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bold-factory.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Partial updates with PATCH

> Change only the fields you send with PATCH, and keep the rest of the resource as it is.

Edit endpoints that use `PATCH` change only the fields in the request body. Each field can be in one of three states:

| Body | Result |
| - | - |
| The field is absent | The field keeps its current value. |
| `"field": null` | The field is cleared. Only fields that accept `null` in the API reference can be cleared. |
| `"field": value` | The field takes the new value. |

Send only what you want to change. A field that you do not know about, or that a later version of the API adds, is never overwritten.

## Change one field

For example, to rename an equipment and keep its code, data, parent asset, and holder:

```bash theme={null}
curl -X PATCH "https://api.bold-factory.com/v1/maintenance/assets/equipments/<asset-id>" \
  -H "X-Api-Key: $BOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Prensa 2" }'
```

## Clear a field

Send `null` to remove a value. This request removes the equipment's holder and leaves every other field as it was:

```bash theme={null}
curl -X PATCH "https://api.bold-factory.com/v1/maintenance/assets/equipments/<asset-id>" \
  -H "X-Api-Key: $BOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "holderId": null }'
```

Sending `null` for a field that cannot be cleared, such as `name`, returns `400 Bad Request`.

> [!WARNING]
>
> Some HTTP clients and generated SDKs omit properties whose value is `null`. Check that yours sends the `null` when you need to clear a field; otherwise the field keeps its value.

## Endpoints that replace the whole resource

Some edit endpoints only have a `PUT`, which replaces every editable field: a field you omit can be cleared. Where a resource has both, the `PUT` keeps working as it does today. Before a `PUT` is removed, it is marked as deprecated in the [API reference](https://docs.bold-factory.com/en/developers/api-reference/introduction.md) and keeps working for a while, so move your integration to the `PATCH` endpoint when one is available.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.