Values
Get All Product Variant Option Values
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}/valuesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - option_id in path - integerrequired
The ID of the
Option
. - page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query with default of 50 - integer
Controls the number of items per page in a limited (paginated) list of products.
- include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[string]
example
Response
Body
dataarray[object]
example
Create a Product Variant Option Value
POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}/valuesRequest
Creates a Variant Option Value.
Required Fields
- label
- sort_order
Read-Only Fields
- id
Limits
- 250 option values per option limit.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - option_id in path - integerrequired
The ID of the
Option
. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
is_defaultboolean
The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
labelstring
requiredThe text display identifying the value on the storefront. Required in a /POST.
Example: Greensort_orderinteger
requiredThe order in which the value will be displayed on the product page. Required in a /POST.
Min: -2147483648Max: 2147483647value_dataobject
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 ofcolors
, with up to three hexidecimal color keys; or animage_url
, which is a full image URL path including protocol. Theproduct list
type option requires aproduct_id
. Thecheckbox
type option requires a boolean flag, calledchecked_value
, to determine which value is considered to be the checked state.
example
Response
Body
dataobject
Common Option Value properties.
example
Get a Product Variant Option Value
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}/values/{value_id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - option_id in path - integerrequired
The ID of the
Option
. - value_id in path - integerrequired
The ID of the
Modifier/Option Value
. - include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[string]
example
Response
Body
dataobject
Common Option Value properties.
example
Update a Product Variant Option Value
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}/values/{value_id}Request
Updates a Variant Option Value.
Read-Only Fields
- id
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - option_id in path - integerrequired
The ID of the
Option
. - value_id in path - integerrequired
The ID of the
Modifier/Option Value
. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
A BigCommerce OptionValue
object.
Body
is_defaultboolean
The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
labelstring
requiredThe text display identifying the value on the storefront. Required in a /POST.
Example: Greensort_orderinteger
requiredThe order in which the value will be displayed on the product page. Required in a /POST.
Min: -2147483648Max: 2147483647value_dataobject
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 ofcolors
, with up to three hexidecimal color keys; or animage_url
, which is a full image URL path including protocol. Theproduct list
type option requires aproduct_id
. Thecheckbox
type option requires a boolean flag, calledchecked_value
, to determine which value is considered to be the checked state.idinteger
The unique numeric ID of the value; increments sequentially.
example
Response
Body
dataobject
Common Option Value properties.
example
Delete a Product Variant Option Value
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options/{option_id}/values/{value_id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - option_id in path - integerrequired
The ID of the
Option
. - value_id in path - integerrequired
The ID of the
Modifier/Option Value
.