For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Brands
        • Categories
        • Category Trees
        • Products
        • Product Modifiers
        • Product Variants
        • Product Variant Options
            • GETList Product Variant Options
            • POSTCreate Product Variant Option
            • GETGet Product Variant Option
            • PUTUpdate Product Variant Option
            • DELDelete Product Variant Option
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminCatalogProduct Variant Options

Update Product Variant Option

PUT
https://api.bigcommerce.com/stores/:store_hash/v3/catalog/products/:product_id/options/:option_id
PUT
/stores/:store_hash/v3/catalog/products/:product_id/options/:option_id
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options/1 \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "data": {
3 "id": 220,
4 "product_id": 192,
5 "display_name": "Color",
6 "type": "swatch",
7 "config": {},
8 "sort_order": 0,
9 "option_values": [
10 {
11 "label": "Beige",
12 "sort_order": 1,
13 "is_default": false,
14 "value_data": {
15 "colors": [
16 "#FAFAEB"
17 ]
18 },
19 "id": 174
20 },
21 {
22 "label": "Grey",
23 "sort_order": 2,
24 "is_default": false,
25 "value_data": {
26 "colors": [
27 "#BDBDBD"
28 ]
29 },
30 "id": 175
31 },
32 {
33 "label": "Black",
34 "sort_order": 3,
35 "is_default": false,
36 "value_data": {
37 "colors": [
38 "#000000"
39 ]
40 },
41 "id": 176
42 },
43 {
44 "label": "Black-Walnut",
45 "sort_order": 4,
46 "is_default": false,
47 "value_data": {
48 "colors": [
49 "#e80ee8"
50 ]
51 },
52 "id": 189
53 }
54 ],
55 "name": "Color (Colors only)"
56 },
57 "meta": {}
58}
Updates a *Variant Option*. **Read-Only Fields** * id
Was this page helpful?
Previous

Get Product Variant Option

Next

Delete Product Variant Option

Built with

Updates a Variant Option.

Read-Only Fields

  • id

Authentication

X-Auth-Tokenstring
### 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).

Path parameters

product_idintegerRequired

The ID of the Product to which the resource belongs.

option_idintegerRequired

The ID of the Option.

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

The model for a PUT to update options on a product.
idinteger or nullOptional
The unique numerical ID of the option, increments sequentially.
product_idintegerOptional
The unique numerical ID of the product to which the option belongs.
display_namestringOptional1-255 characters
The name of the option shown on the storefront.
typeenumOptional
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.
configobjectOptional
The values for option config can vary based on the Modifier created.
sort_orderintegerOptional
Order in which the option is displayed on the storefront.
option_valueslist of objectsOptional
image_urlstringOptional
Publicly available image url

Response

dataobject
Common Option properties.
metaobject
Response metadata.

Errors

409
Conflict Error
422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Productsmodifystore_v2_products
Productsread-onlystore_v2_products_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

The MIME type of the response body.

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.