Skip to navigation

Create Product Modifier Value

Creates a modifier value.

Read-Only Fields

  • is_default

Setting an option value image adjusters.image_url is read-only on this endpoint. To attach the image shown on the storefront for the value, upload it via Create Product Modifier Image after creating the value.

is_default is derived from the parent modifier configuration and cannot be set on individual values. To change which value is the default, use Update Product Modifier and include the full option_values array with the desired is_default flags.

Authentication

X-Auth-Tokenstring

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.

Path parameters

product_idintegerRequired
The ID of the product to which the resource belongs.
modifier_idintegerRequired
The ID of the product modifier.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

The model for a POST to create a modifier value on a product.
labelstringRequired

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

sort_orderintegerRequired

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

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 hexadecimal 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.

adjustersobjectOptional

Response

OK
dataobjectOptional

Product modifier option_value.

metaobjectOptional
Response metadata.

Errors

422
Unprocessable Entity Error