# Update Product

Updates an existing Product resource, applying only the fields supplied in the JSON body (PATCH semantics).
## 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
`/Products/$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.
- The `cat_id` field is accepted as either a single integer or an array of integers
to assign the product to one or several categories.

## Response
**200 OK** — Update applied.
## Error Responses
- **400 Bad Request** — Payload normalization or validation failure
(returns `ValidationFailureRepresentation` for validation errors).
- **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** — Product with the given identifier does not exist.
- **500 Internal Server Error** — Unexpected technical error.

## Example
**Request:**

```http
PATCH /Products(456) HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US
Content-Type: application/json
            
{
  "prod_description": "Updated description",
  "cat_id": [123, 124]
}
```
**Response:**

```http
HTTP/1.1 200 OK
```

Endpoint: PATCH /Products({productId})
Version: 2.0.0

## Path parameters:

  - `productId` (integer, required)
    Product 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)

## Response 200 fields (application/json):

  - `readLink` (object)

  - `readLink.uri` (string)

  - `value` (any)

## Response 401 fields (application/json):

  - `message` (string)

  - `request_id` (string)

## Response 403 fields (application/json):

  - `message` (string)

  - `request_id` (string)

## Response 404 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 500 fields (application/json):

  - `error` (string)

  - `details` (any)

