# Update a taxonomy term

`PATCH https://api.cademi.com.br/api/v3/products/{product_id}/taxonomies/{taxonomy_id}/terms/{taxonomy_term_id}`

Operation ID: `taxonomies.terms.update` · API v3

Updates the `name` and `image` of a taxonomy term. Omitted fields remain unchanged; setting `image` to `null` removes the image. `image` accepts the ID of a file previously uploaded to the account.

Send the `ETag` returned by the retrieve operation in the `If-Match` header to avoid overwriting a newer version.

Terms of replicated products are read-only. Attempts to update them return `403 Forbidden` with the `replica_readonly` error code.

Required permissions: `taxonomies.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `product_id` | path | string | yes |  |
| `taxonomy_id` | path | string | yes |  |
| `taxonomy_term_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `image` | string or null | no |  |
| `name` | string | no |  |

## Responses

### 200

Returns the updated term.

Body: `data`: TaxonomyTerm.

Fields of TaxonomyTerm:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `id` | string | yes | Public ID, with the ttm_ prefix. |
| `image` | string or null | yes |  |
| `lessons_count` | integer | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `taxonomy_term` | yes |  |
| `revision` | string | yes |  |
| `taxonomy_id` | string | yes | Public ID, with the tax_ prefix. |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The term was not found in this taxonomy or is not accessible with the current credentials.

Body: Error.

### 412

The resource has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
