---
title: "Update/create several categories"
method: PATCH
path: "/api/rest/v1/categories"
tags: ["Category"]
---

# Update/create several categories

`PATCH /api/rest/v1/categories`

This endpoint allows you to update several categories at once.

## Request body

- object
  - `code` string, required — Category code
  - `parent` string — Category code of the parent's category
  - `updated` string, dateTime — Date of the last update
  - `position` integer — Position of the category in its level, start from 1 (only available since the 7.0 version and when query parameter "with_position" is set to "true")
  - `labels` object — Category labels for each locale
    - `localeCode` string — Category label for the locale `localeCode`
  - `values` object[] — Attribute values.
    - `data` string — Attribute value. It should be a `string` for Text and Text Area attributes, a `boolean` for Yes/No attribute and for Image attribute use the <a href="api-reference.html#post_category_media_files">create category media file endpoint</a>. It can also be `null` to remove the value.
    - `locale` string — <a href="api-reference-paas.html#Locale">Locale</a> code of the attribute value.
    - `channel` string — <a href="api-reference-paas.html#Channel">Channel</a> code of the attribute value.
    - `attribute_code` string — The attribute code.
  - `validations` object — Category validations
    - `max_categories_per_product` integer — Set maximum number of categories per product
    - `only_leaves` boolean — Restrict categorization to the lowest level
    - `is_mandatory` boolean — Set category as mandatory for every product
  - `channel_requirements` string[] — List of <a href='api-reference-paas.html#Channel'>Channel</a> codes on which the category is required for products completeness. Only category trees can be required, not child categories.

## Response `200`

OK

- object
  - `line` integer — Line number
  - `identifier` string — Resource identifier, only filled when the resource is a product
  - `code` string — Resource code, only filled when the resource is not a product
  - `status_code` integer — HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code
  - `message` string — Message explaining the error

## Other responses

- `401` — Authentication required
- `403` — Access forbidden
- `413` — Request Entity Too Large
- `415` — Unsupported Media type

---

[API](https://skmtc.net/akeneo/apis/akeneo-pim-rest-api.md) · [All operations](https://skmtc.net/akeneo/apis/akeneo-pim-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeneo/akeneo-pim-rest-api/versions/d8bda9b93b59/schema)
