# Update Variant

Updates the writable fields of an existing Variant from the supplied JSON body using PATCH semantics (only the supplied fields are modified).
## Authentication
Requires a valid API key in the `X-API-KEY` header.
## Headers
### Accept-Language
Culture used to interpret the localized field values supplied in the request body.
- **omitted / null**
: tenant's default culture.
- **culture-code**
 (e.g.
`en-US`
,
`es`
): the specified culture.

## Request Body
A single JSON object with the subset of writable fields to update (PATCH semantics —
only the supplied fields are modified). Field names must match those published by
`/Variants/$metadata`. Normalization rules:
- Must be a non-empty JSON object.
- A JSON array is accepted only if it contains exactly one element.
- Values are coerced to CLR primitives, nested objects and arrays.
- A date attribute is a date and time with no time zone, stored and returned as written

(
`"frmt_date": "2026-10-21T16:22:00"`
). A value with
`Z`
 or an offset (
`2026-10-21T14:22:00Z`
) is converted to

its date and time in Spain (Europe/Madrid), the time the app shows (
`2026-10-21T16:22:00`
). System dates (
`_creation`
,
`_modify`
) are set by the service.

## Response
**204 No Content** — Update applied. The response has no body.
## Error Responses
- **400 Bad Request**
 — The body cannot be written: empty, an array of more than one

object, an attribute the entity does not have, one that cannot be assigned or a value the

attribute does not take. Answered as a message naming why, a JSON string

(
`"Value: ZZ not allowed"`
,
`"Invalid attribute name: nope_field"`
).
- **401 Unauthorized**
 — Missing or invalid API key. Returned by the API gateway as

`{ "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }`
.
- **403 Forbidden**
 — The API key does not have write permissions for this operation.
- **404 Not Found**
 — Variant with the given identifier does not exist.
- **500 Internal Server Error**
 — Unexpected technical error.

## Example
**Request:**

```http
PATCH /Variants(789) HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US
Content-Type: application/json
            
{
  "frmt_stat": "V"
}
```
**Response:**

```http
HTTP/1.1 204 No Content
```

Endpoint: PATCH /Variants({variantId})
Version: 2.0.0

## Description:

  - `Authentication` ()
    Requires a valid API key in the `X-API-KEY` header.

  - `Headers` ()

  - `Accept-Language` ()
    Culture used to interpret the localized field values supplied in the request body. - **omitted / null**
: tenant's default culture.
- **culture-code**
 (e.g.
`en-US`
,
`es`
): the specified culture.

  - `Request Body` ()
    A single JSON object with the subset of writable fields to update (PATCH semantics —
only the supplied fields are modified). Field names must match those published by
`/Variants/$metadata`. Normalization rules: - Must be a non-empty JSON object.
- A JSON array is accepted only if it contains exactly one element.
- Values are coerced to CLR primitives, nested objects and arrays.
- A date attribute is a date and time with no time zone, stored and returned as written

(
`"frmt_date": "2026-10-21T16:22:00"`
). A value with
`Z`
 or an offset (
`2026-10-21T14:22:00Z`
) is converted to

its date and time in Spain (Europe/Madrid), the time the app shows (
`2026-10-21T16:22:00`
). System dates (
`_creation`
,
`_modify`
) are set by the service.

  - `Response` ()
    **204 No Content** — Update applied. The response has no body.

  - `Error Responses` ()
    - **400 Bad Request**
 — The body cannot be written: empty, an array of more than one

object, an attribute the entity does not have, one that cannot be assigned or a value the

attribute does not take. Answered as a message naming why, a JSON string

(
`"Value: ZZ not allowed"`
,
`"Invalid attribute name: nope_field"`
).
- **401 Unauthorized**
 — Missing or invalid API key. Returned by the API gateway as

`{ "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }`
.
- **403 Forbidden**
 — The API key does not have write permissions for this operation.
- **404 Not Found**
 — Variant with the given identifier does not exist.
- **500 Internal Server Error**
 — Unexpected technical error.

  - `Example` ()
    **Request:** ```http
PATCH /Variants(789) HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US
Content-Type: application/json
            
{
  "frmt_stat": "V"
}
``` **Response:** ```http
HTTP/1.1 204 No Content
```

## Path parameters:

  - `variantId` (integer, required)
    Variant resource identifier

## Header parameters:

  - `X-API-KEY` (string)
    Tenant's API key (required)

  - `Accept-Language` (string)
    Culture for localized field values in the request body (Accept-Language header)

## Request body:

  - `application/json` (unknown)
    JSON object with the Variant fields to update

## Response 204:

  - `204` (unknown)
    No Content

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `validationFailures` (object)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `message` (string)

  - `request_id` (string)

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `message` (string)

  - `request_id` (string)

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `error` (string)

  - `details` (any)

## Response 400 examples:

  - `A status the variant cannot take (frmt_stat: "ZZ")` (unknown)

  - `An attribute the variant does not have` (unknown)

  - `An attribute the service sets itself` (unknown)

  - `An empty body` (unknown)

