---
title: "Update/create a reference entity"
method: PATCH
path: "/api/rest/v1/reference-entities/{code}"
tags: ["Reference entity"]
---

# Update/create a reference entity

`PATCH /api/rest/v1/reference-entities/{code}`

## Request

- Base URL: `http://demo.akeneo.com`
- URL: `http://demo.akeneo.com/api/rest/v1/reference-entities/{code}`
- Auth: none declared

This endpoint allows you to update a given reference entity. Note that if the reference entity does not already exist, it creates it.

## Path parameters

- `code` string, required

## Request body

- object
  - `code` string, required: Reference entity code
  - `labels` object: Reference entity labels for each locale
    - `localeCode` string: Reference entity label for the locale `localeCode`
  - `image` string: Code of the reference entity image

## Response `201`

Created

## Other responses

- `204`: No content to return
- `401`: Authentication required
- `415`: Unsupported Media type
- `422`: Unprocessable entity

---

[API](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api.md) - [All operations](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeneo/apis/akeneo-pim-rest-api/revisions/d8bda9b93b59?raw)
