---
title: "Update/create a family variant"
method: PATCH
path: "/api/rest/v1/families/{family_code}/variants/{code}"
tags: ["Family variant"]
---

# Update/create a family variant

`PATCH /api/rest/v1/families/{family_code}/variants/{code}`

This endpoint allows you to update a given family variant. Know more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no family variant exists for the given code, it creates it.

## Path parameters

- `family_code` string, required
- `code` string, required

## Request body

- object
  - `code` string, required — Family variant code
  - `variant_attribute_sets` object[], required — Attributes distribution according to the enrichment level
    - `level` integer, required — Enrichment level
    - `axes` string[], required — Codes of attributes used as variant axes
    - `attributes` string[] — Codes of attributes bind to this enrichment level
  - `labels` object — Family variant labels for each locale
    - `localeCode` string — Family variant label for the locale `localeCode`

## Response `201`

Created

## Other responses

- `204` — No content to return
- `400` — Bad request
- `401` — Authentication required
- `403` — Access forbidden
- `415` — Unsupported Media type
- `422` — Unprocessable entity

---

[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)
