# Update a product

Partially updates a product. Only provided fields are modified.
**Criteria:** When `criteria` is provided, only the specified criteria are updated.
Existing criteria not included in the array are preserved (not reset).
**Rooms:** When `rooms` is provided, rooms can be updated by including their `id`,
or new rooms can be added without an `id`. In update mode, `vue` and `sol` are
mutually exclusive on a given room.
**Additional updatable fields:**
- `model`
 — Change product reference
- `agency_id`
 — Transfer to another agency (must remain in scope)
- `user_id`
 — Change assigned agent
- `web_status`
 — Enable/disable web publishing (boolean)
- `intercabinet`
 — Enable/disable inter-agency sharing (boolean)
- `seller_statistics`
 — Enable/disable seller statistics (boolean)
- `next_contact`
 — Next follow-up date (format
`YYYY-MM-DD`
)
- `color`
 — Color code (1-5)

Endpoint: PATCH /products/{productId}
Version: 1.6.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer opaque

## Path parameters:

  - `productId` (integer, required)
    Unique identifier of the product to update.

## Request fields (application/json):

  - `product_id` (integer)
    **Deprecated, ignored.** The product is identified by the `productId` path
parameter.
    Example: 12345

  - `agency_id` (integer | null)
    Transfer product to another agency (must remain in scope).
    Example: 456

  - `model` (string | null)
    Change product reference.
    Example: REF-2025-002

  - `user_id` (integer | null)
    Change assigned agent.
    Example: 789

  - `intercabinet` (boolean | null)
    Enable/disable inter-agency sharing.

  - `color` (integer | null)
    Color code (1-5) for visual categorization.

  - `next_contact` (string | null)
    Next follow-up date (format `YYYY-MM-DD`).
    Example: 2026-02-15

  - `seller_statistics` (boolean | null)
    Enable/disable seller statistics.

  - `web_status` (boolean | null)
    Enable/disable web publication.

  - `rooms` (array | null)
    Room list update. Include `id` to update existing rooms, omit `id` to add new ones.
In update mode, `vue` and `sol` are **mutually exclusive** on a given room.

  - `rooms.id` (number | null)
    Existing room ID (for update). Omit for new rooms.

  - `rooms.type` (string | null)
    Room type from list 1 (nullable in update).

  - `rooms.niveau` (string | null)

  - `rooms.surface` (number | null)

  - `rooms.exposition` (string | null)

  - `rooms.vue` (string | null)
    View (mutually exclusive with `sol` in update).

  - `rooms.sol` (string | null)
    Floor type (mutually exclusive with `vue` in update).

  - `rooms.commentaire` (string | null)

  - `descriptions` (array | null)
    Web descriptions (same format as create).

  - `descriptions.title` (string | null)

  - `descriptions.description` (string | null)

  - `descriptions.language_code` (string)

  - `criteria` (array | null)
    Criteria to update. Only provided criteria are modified — existing
criteria not in this array are **preserved** (not reset).
Format is same as create, except `value` can be `null` (to clear a criterion).

  - `criteria.id` (string, required)
    Criteria identifier (XML key or numeric ID).

  - `criteria.value` (any)
    New value (null to clear).

## Response 204:

  - `204` (unknown)
    Updated successfully

## Response 400:

  - `400` (unknown)
    Invalid criteria. Response contains details about which criteria
value was not recognized.

## Response 403:

  - `403` (unknown)
    Access denied. The error `code` is always `FORBIDDEN`; the `message` gives the cause:
- `You do not have permission to perform this action.`
 — the access does not

hold the API pack / right required by the endpoint.
- `Insufficient scope for this request.`
 — the resource targeted by the request

(user, customer, product, agency, transaction, ...) is outside the scope of

the authenticated access.
- `Access denied for this editor.`
 /
`Your IP address has been blocked.`
 —

editor or IP restriction.

## Response 403 fields (application/json):

  - `error` (object)

  - `error.code` (string, required)

  - `error.message` (string, required)

## Response 422:

  - `422` (unknown)
    Validation failed

## Response 422 fields (application/json):

  - `error` (object)

  - `error.code` (string)
    Enum: "VALIDATION_ERROR"

  - `error.message` (string)

  - `error.details` (array)

  - `error.details.field` (string)

  - `error.details.message` (string)

## Response 403 examples:

  - `Missing API pack / right` (unknown)

  - `Resource outside the scope of the access` (unknown)

