# Update offer chain

Updates a particular offer chain.

Endpoint: PUT /v2/project/{project_id}/admin/offer_chain/id/{offer_chain_id}
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com//projects/.
    Example: 44056

  - `offer_chain_id` (integer, required)
    Offer chain ID.
    Example: 101

## Request fields (application/json):

  - `id` (integer)
    Unique offer chain ID.

  - `name` (object,null, required)
    Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `order` (integer)
    Defines arrangement order.

  - `description` (object,null)
    Object with localizations for item’s description. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US).  While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the [documentation](/doc/shop-builder/references/supported-languages/).

  - `date_start` (string, required)
    Date when the offer chain starts.

  - `date_end` (string,null)
    Date when the offer chain ends. Can be null. If date_end is null, the offer chain will not have a time limit.

  - `is_enabled` (boolean, required)

  - `recurrent_schedule` (any)

  - `steps` (array, required)

  - `steps.step_id` (integer,null)
    Unique chain step ID. Specify it during update to retain user progress for this step.

  - `steps.step_number` (integer, required)
    Step number.

  - `steps.is_free` (boolean, required)
    Indicates whether the offer chain step is free:If true, the step must be claimed using the Claim free offer chain step call.If false, it must be purchased using the Create order for paid offer chain step call.

  - `steps.items` (array, required)

  - `steps.items.sku` (string, required)
    Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

  - `steps.items.quantity` (integer, required)
    Reward item quantity for this chain step.

  - `steps.items.order` (integer,null)
    Reward order for the offer chain step.

  - `is_always_visible` (boolean)
    Whether the chain is visible to all users. If true, the chain is always displayed, regardless of the user's authentication status or attributes.

To configure personalization, you need to pass false. The logic of the chain display will be the following:
  * If false is passed and the visibility conditions are specified in the attribute_conditions array, the chain is considered personalized and is displayed only to authorized users who meet the specified conditions.
  * If false is passed and the attribute_conditions array isn’t passed or is empty, the chain is displayed to unauthorized users, as well as in cases when no matching chain is found for the authorized user.

  - `attribute_conditions` (array)
    Conditions for validating user attributes.
Determine chain availability based on whether user attributes match all specified conditions.

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 422

  - `errorCode` (integer)
    Example: 1102

  - `errorMessage` (string)
    Example: "[0401-1102]: Unprocessable Entity. The property `property_name` is required"

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"

  - `errorMessageExtended` (object,null)

## Response 422 fields (application/json):

  - `statusCode` (integer)
    Example: 422

  - `errorCode` (integer)
    Example: 1102

  - `errorMessage` (string)
    Example: "[0401-1102]: Unprocessable Entity. The property `property_name` is required"

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"

  - `errorMessageExtended` (object,null)


## Response 204 fields
