put

/catalog/products/{product_id}/options/{option_id}

Updates a Variant Option.

Read-Only Fields

  • id

Authorization

apiKey - X-Auth-Token

Request Parameters

2 Path Parameters
2 Headers

Request Body

1 Example
Schema
object

The model for a PUT to update options on a product.

config
object

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

display_name
string

The name of the option shown on the storefront.

4 validations
id
integer

The unique numerical ID of the option, increments sequentially.

2 validations
image_url
string

Publicly available image url

option_values
array[object]
2 validations
product_id
integer

The unique numerical ID of the product to which the option belongs.

2 validations
sort_order
integer

Order in which the option is displayed on the storefront.

1 validation
type
string

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.

2 validations

Responses

1 Example
Schema
object
data
object

Common Option properties.

meta
object

Empty meta object; may be used later.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
Path Params
2 path params not set
product_id
option_id
$$.env
1 variable not set
store_hash
X-Auth-Token