# Upsert upsell configuration for a merchant and one or more countries

> `PUT https://api.kustom.co/config/checkout/v1/config/upsell`

## Parameters

- `X-merchant-id` (string, header, required) — Merchant identifier
- `countries` (array<string>, query) — ISO 3166-1 alpha-2 country codes (omit for merchant-level default)

## Request body

`application/json`

- `value` (object) — The configuration for upsell features.
  - `disabled` (boolean) — Indicates whether the upsell feature is disabled. This takes precedence over the alwaysEnable flag.
  - `alwaysEnable` (boolean) — Indicates whether the upsell feature should be enabled even if the upsell configs are missing on orders.
  - `displayOptions` (object) — Display options for the upsell feature.
    - `uiTimerDisabled` (boolean) — Indicates whether the timer should not be shown during upsell.
    - `uiTimerDisabledCountries[]` (array<string>) — The countries in which the timer should not be shown during upsell.
    - `imageAspectRatio` (string) — The aspect ratio of images shown on the upsell page.
  - `durationSeconds` (integer) — The duration (in seconds) for which upsell will be available.
- `changeReason` (string)
- `updatedBy` (string)

### Example request

```json
{
  "value": {
    "disabled": false,
    "alwaysEnable": false,
    "displayOptions": {
      "uiTimerDisabled": false,
      "uiTimerDisabledCountries": [
        "US",
        "GB"
      ],
      "imageAspectRatio": "2:3"
    },
    "durationSeconds": 120
  },
  "changeReason": "<string>",
  "updatedBy": "<string>"
}
```

## Responses

### 200

OK

`*/*`

- `merchantId` (string)
- `country` (string)
- `upsellConfig` (object) — The configuration for upsell features.
  - `disabled` (boolean) — Indicates whether the upsell feature is disabled. This takes precedence over the alwaysEnable flag.
  - `alwaysEnable` (boolean) — Indicates whether the upsell feature should be enabled even if the upsell configs are missing on orders.
  - `displayOptions` (object) — Display options for the upsell feature.
    - `uiTimerDisabled` (boolean) — Indicates whether the timer should not be shown during upsell.
    - `uiTimerDisabledCountries[]` (array<string>) — The countries in which the timer should not be shown during upsell.
    - `imageAspectRatio` (string) — The aspect ratio of images shown on the upsell page.
  - `durationSeconds` (integer) — The duration (in seconds) for which upsell will be available.
- `revision` (integer)
- `updatedBy` (string)
- `updatedAt` (string)

```json
[
  {
    "merchantId": "<string>",
    "country": "<string>",
    "upsellConfig": {
      "disabled": false,
      "alwaysEnable": false,
      "displayOptions": {
        "uiTimerDisabled": false,
        "uiTimerDisabledCountries": [
          "US",
          "GB"
        ],
        "imageAspectRatio": "2:3"
      },
      "durationSeconds": 120
    },
    "revision": 0,
    "updatedBy": "<string>",
    "updatedAt": "<date-time>"
  }
]
```

### 400

Schema validation failure

`*/*`

- `merchantId` (string)
- `country` (string)
- `upsellConfig` (object) — The configuration for upsell features.
  - `disabled` (boolean) — Indicates whether the upsell feature is disabled. This takes precedence over the alwaysEnable flag.
  - `alwaysEnable` (boolean) — Indicates whether the upsell feature should be enabled even if the upsell configs are missing on orders.
  - `displayOptions` (object) — Display options for the upsell feature.
    - `uiTimerDisabled` (boolean) — Indicates whether the timer should not be shown during upsell.
    - `uiTimerDisabledCountries[]` (array<string>) — The countries in which the timer should not be shown during upsell.
    - `imageAspectRatio` (string) — The aspect ratio of images shown on the upsell page.
  - `durationSeconds` (integer) — The duration (in seconds) for which upsell will be available.
- `revision` (integer)
- `updatedBy` (string)
- `updatedAt` (string)

```json
[
  {
    "merchantId": "<string>",
    "country": "<string>",
    "upsellConfig": {
      "disabled": false,
      "alwaysEnable": false,
      "displayOptions": {
        "uiTimerDisabled": false,
        "uiTimerDisabledCountries": [
          "US",
          "GB"
        ],
        "imageAspectRatio": "2:3"
      },
      "durationSeconds": 120
    },
    "revision": 0,
    "updatedBy": "<string>",
    "updatedAt": "<date-time>"
  }
]
```
