> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Update Product Variant Option

PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}
Content-Type: application/json

Updates a *Variant Option*.

**Read-Only Fields**
* id

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/catalog/product-variant-options/update-product-variant-option

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Products | modify | `store_v2_products` | | Products | read-only | `store_v2_products_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `product_id` (integer, required) — The ID of the `Product` to which the resource belongs.
- `option_id` (integer, required) — The ID of the `Option`.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

### Body (application/json)

This endpoint expects an object.

- `id` (integer, optional, nullable) — The unique numerical ID of the option, increments sequentially.
- `product_id` (integer, optional) — The unique numerical ID of the product to which the option belongs.
- `display_name` (string, optional) — The name of the option shown on the storefront.
- `type` (enum, optional) — The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch.
  - Allowed values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`
- `config` (CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaConfig, optional) — The values for option config can vary based on the Modifier created.
- `sort_order` (integer, optional) — Order in which the option is displayed on the storefront.
- `option_values` (list of CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaOptionValuesItems, optional)
- `image_url` (string, optional) — Publicly available image url

## Response

### 200

OK

- `data` (CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaData, optional) — Common Option properties.
- `meta` (metaEmpty_Full, optional) — Response metadata.

## Errors

### 409 Conflict Error

The `Option` was in conflict with another option. This is the result of duplicate unique fields, such as `name`.

- `errors` (CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaErrors, optional)
- `instance` (string, optional)
- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)

### 422 Unprocessable Entity Error

The `Option` was not valid. This is the result of missing required fields, or of invalid data. See the response for more details.

- `errors` (CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaErrors, optional)
- `instance` (string, optional)
- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)

## Types

### CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaConfig

The values for option config can vary based on the Modifier created.

- `default_value` (string, optional) — (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
- `checked_by_default` (boolean, optional) — (checkbox) Flag for setting the checkbox to be checked by default.
- `checkbox_label` (string, optional) — (checkbox) Label displayed for the checkbox option.
- `date_limited` (boolean, optional) — (date) Flag to limit the dates allowed to be entered on a date option.
- `date_limit_mode` (enum, optional) — (date) The type of limit that is allowed to be entered on a date option.
  - Allowed values: `earliest`, `range`, `latest`
- `date_earliest_value` (datetime, optional) — (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `date_latest_value` (datetime, optional) — (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `file_types_mode` (enum, optional) — (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types.
  - Allowed values: `specific`, `all`
- `file_types_supported` (list of string, optional) — (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). `other` - Allows file types defined in the `file_types_other` array.
- `file_types_other` (list of string, optional) — (file) A list of other file types allowed with the file upload option.
- `file_max_size` (integer, optional) — (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
- `text_characters_limited` (boolean, optional) — (text, multi_line_text) Flag to validate the length of a text or multi-line text input.
- `text_min_length` (integer, optional) — (text, multi_line_text) The minimum length allowed for a text or multi-line text option.
- `text_max_length` (integer, optional) — (text, multi_line_text) The maximum length allowed for a text or multi line text option.
- `text_lines_limited` (boolean, optional) — (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
- `text_max_lines` (integer, optional) — (multi_line_text) The maximum number of lines allowed on a multi-line text input.
- `number_limited` (boolean, optional) — (numbers_only_text) Flag to limit the value of a number option.
- `number_limit_mode` (enum, optional) — (numbers_only_text) The type of limit on values entered for a number option.
  - Allowed values: `lowest`, `highest`, `range`
- `number_lowest_value` (double, optional) — (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true.
- `number_highest_value` (double, optional) — (numbers_only_text) The highest allowed value for a number option if `number_limited` is true.
- `number_integers_only` (boolean, optional) — (numbers_only_text) Flag to limit the input on a number option to whole numbers only.
- `product_list_adjusts_inventory` (boolean, optional) — (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
- `product_list_adjusts_pricing` (boolean, optional) — (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
- `product_list_shipping_calc` (enum, optional) — (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions.
  - Allowed values: `none`, `weight`, `package`

### CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaOptionValuesItems

Common Option Value properties.

- `label` (string, required) — The text display identifying the value on the storefront. Required in a /POST.
- `sort_order` (integer, required) — The order in which the value will be displayed on the product page. Required in a /POST.
- `is_default` (boolean, optional) — The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
- `value_data` (CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaOptionValuesItemsValueData, optional) — Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.
- `id` (integer, optional) — The unique numeric ID of the value; increments sequentially.

### CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaData

Common Option properties.

- `id` (integer, optional) — The unique numerical ID of the option, increments sequentially.
- `product_id` (integer, optional) — The unique numerical ID of the product to which the option belongs.
- `display_name` (string, optional) — The name of the option shown on the storefront.
- `type` (enum, optional) — The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch.
  - Allowed values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`
- `config` (CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataConfig, optional) — The values for option config can vary based on the Modifier created.
- `sort_order` (integer, optional) — Order in which the option is displayed on the storefront.
- `option_values` (list of CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataOptionValuesItems, optional)
- `image_url` (string, optional) — Publicly available image url
- `name` (string, optional) — The unique option name, auto-generated from the display name, a timestamp, and the product ID.

### metaEmpty_Full

Response metadata.

### CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaErrors

### CatalogProductsProductIdOptionsOptionIdPutRequestBodyContentApplicationJsonSchemaOptionValuesItemsValueData

Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.

### CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataConfig

The values for option config can vary based on the Modifier created.

- `default_value` (string, optional) — (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
- `checked_by_default` (boolean, optional) — (checkbox) Flag for setting the checkbox to be checked by default.
- `checkbox_label` (string, optional) — (checkbox) Label displayed for the checkbox option.
- `date_limited` (boolean, optional) — (date) Flag to limit the dates allowed to be entered on a date option.
- `date_limit_mode` (enum, optional) — (date) The type of limit that is allowed to be entered on a date option.
  - Allowed values: `earliest`, `range`, `latest`
- `date_earliest_value` (date, optional) — (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `date_latest_value` (date, optional) — (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `file_types_mode` (enum, optional) — (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types.
  - Allowed values: `specific`, `all`
- `file_types_supported` (list of string, optional) — (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). `other` - Allows file types defined in the `file_types_other` array.
- `file_types_other` (list of string, optional) — (file) A list of other file types allowed with the file upload option.
- `file_max_size` (integer, optional) — (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
- `text_characters_limited` (boolean, optional) — (text, multi_line_text) Flag to validate the length of a text or multi-line text input.
- `text_min_length` (integer, optional) — (text, multi_line_text) The minimum length allowed for a text or multi-line text option.
- `text_max_length` (integer, optional) — (text, multi_line_text) The maximum length allowed for a text or multi line text option.
- `text_lines_limited` (boolean, optional) — (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
- `text_max_lines` (integer, optional) — (multi_line_text) The maximum number of lines allowed on a multi-line text input.
- `number_limited` (boolean, optional) — (numbers_only_text) Flag to limit the value of a number option.
- `number_limit_mode` (enum, optional) — (numbers_only_text) The type of limit on values entered for a number option.
  - Allowed values: `lowest`, `highest`, `range`
- `number_lowest_value` (double, optional) — (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true.
- `number_highest_value` (double, optional) — (numbers_only_text) The highest allowed value for a number option if `number_limited` is true.
- `number_integers_only` (boolean, optional) — (numbers_only_text) Flag to limit the input on a number option to whole numbers only.
- `product_list_adjusts_inventory` (boolean, optional) — (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
- `product_list_adjusts_pricing` (boolean, optional) — (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
- `product_list_shipping_calc` (enum, optional) — (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions.
  - Allowed values: `none`, `weight`, `package`

### CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataOptionValuesItems

Common Option Value properties.

- `label` (string, required) — The text display identifying the value on the storefront. Required in a /POST.
- `sort_order` (integer, required) — The order in which the value will be displayed on the product page. Required in a /POST.
- `is_default` (boolean, optional) — The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
- `value_data` (CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataOptionValuesItemsValueData, optional) — Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.
- `id` (integer, optional) — The unique numeric ID of the value; increments sequentially.

### CatalogProductsProductIdOptionsOptionIdPutResponsesContentApplicationJsonSchemaDataOptionValuesItemsValueData

Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "id": 220,
    "product_id": 192,
    "display_name": "Color",
    "type": "swatch",
    "config": {},
    "sort_order": 0,
    "option_values": [
      {
        "label": "Beige",
        "sort_order": 1,
        "is_default": false,
        "value_data": {
          "colors": [
            "#FAFAEB"
          ]
        },
        "id": 174
      },
      {
        "label": "Grey",
        "sort_order": 2,
        "is_default": false,
        "value_data": {
          "colors": [
            "#BDBDBD"
          ]
        },
        "id": 175
      },
      {
        "label": "Black",
        "sort_order": 3,
        "is_default": false,
        "value_data": {
          "colors": [
            "#000000"
          ]
        },
        "id": 176
      },
      {
        "label": "Black-Walnut",
        "sort_order": 4,
        "is_default": false,
        "value_data": {
          "colors": [
            "#e80ee8"
          ]
        },
        "id": 189
      }
    ],
    "name": "Color (Colors only)"
  },
  "meta": {}
}
```

**SDK Code**

```python Response
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1"

payload = {}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Response
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Response
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Response
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1', [
  'body' => '{}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Response
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Response
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```