Update Product Variant Option Value

Updates a Variant Option Value.

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-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/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_idstringRequired
option_idstringRequired
value_idstringRequired

Request

A BigCommerce OptionValue object.

labelstringRequired

The text display identifying the value on the storefront. Required in a /POST.

sort_orderintegerRequired-2147483648-2147483647

The order in which the value will be displayed on the product page. Required in a /POST.

is_defaultbooleanOptional

The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.

value_dataobjectOptional
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.
idintegerOptional

The unique numeric ID of the value; increments sequentially.

Response

dataobject
Common Option Value properties.
metaobject
Response metadata.

Errors

422
Unprocessable Entity Error