Get All Modifier Values
GET /stores/{store_hash}/v3/catalog/products/{product_id}/modifiers/{modifier_id}/values
Request
Returns a list of all product Modifier Values. Optional parameters can be passed in.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - modifier_id in path - integer - required
The ID of the
Modifier
. - modifier_id in path - integer - required
The ID of the
Modifier
. - include_fields in query - string
Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
- exclude_fields in query - string
Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/modifiers/[modifier_id]/values' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
Returns for GET All Modifier Values on a Product
dataarray[object]
metaobject
Data about the response, including pagination and collection totals.
example
{ "data": [ { "id": 190, "option_id": 222, "label": "Yes", "sort_order": 0, "value_data": { "checked_value": true }, "is_default": false, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": {}, "image_url": "", "purchasing_disabled": { "status": false, "message": "" } } }, { "id": 191, "option_id": 222, "label": "No", "sort_order": 1, "value_data": { "checked_value": false }, "is_default": true, "adjusters": { "price": {}, "weight": {}, "image_url": "", "purchasing_disabled": { "status": false, "message": "" } } } ], "meta": { "pagination": { "total": 2, "count": 2, "per_page": 50, "current_page": 1, "total_pages": 1, "links": { "current": "?page=1&limit=50" } } } }
Create Modifier Value
POST /stores/{store_hash}/v3/catalog/products/{product_id}/modifiers/{modifier_id}/values
Request
Creates a Modifier Value.
Required Fields
- label
- sort_order
Read-Only Fields
- id
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
- modifier_id in path - integer - required
The ID of the
Modifier
.
Body
The model for a POST to create a modifier value on a product.
example
{ "is_default": false, "label": "Green", "sort_order": 0, "value_data": {}, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": { "adjuster": "relative", "adjuster_value": 5 }, "image_url": "https://cdn8.bigcommerce.com/s-{{store_hash}}/products/184/images/445/naturalcanvascart2_1024x1024__92347__29648.1534344533.1280.1280.jpg?c=2", "purchasing_disabled": { "status": true, "message": "string" } } }
Response
Body
dataobject
Part of Modifier Value Response
metaobject
Response metadata.
example
{ "data": { "id": 190, "option_id": 222, "label": "Yes", "sort_order": 0, "value_data": {}, "is_default": false, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": {}, "image_url": "", "purchasing_disabled": { "status": false, "message": "" } } }, "meta": {} }
Get a Modifier Value
GET /stores/{store_hash}/v3/catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}
Request
Returns a single Modifier Value. Optional parameters can be passed in.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - modifier_id in path - integer - required
The ID of the
Modifier
. - value_id in path - integer - required
The ID of the
Modifier/Option Value
. - modifier_id in path - integer - required
The ID of the
Modifier
. - value_id in path - integer - required
The ID of the
Modifier/Option Value
. - include_fields in query - string
Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
- exclude_fields in query - string
Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/modifiers/[modifier_id]/values/[value_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
data
Product Modifer
option_value
.metaobject
Response metadata.
example
{ "data": { "id": 190, "option_id": 222, "label": "Yes", "sort_order": 0, "value_data": {}, "is_default": false, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": {}, "image_url": "", "purchasing_disabled": { "status": false, "message": "" } } }, "meta": {} }
Update a Modifier Value
PUT /stores/{store_hash}/v3/catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}
Request
Updates a Modifier Value.
Required Fields
- none
Read-Only Fields
- id
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
- modifier_id in path - integer - required
The ID of the
Modifier
. - value_id in path - integer - required
The ID of the
Modifier/Option Value
.
Body
The model for a PUT to update a modifier value on a product.
idinteger
The unique numeric ID of the value; increments sequentially.
example
{ "is_default": false, "label": "Green", "sort_order": 0, "value_data": {}, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": { "adjuster": "relative", "adjuster_value": 5 }, "image_url": "https://cdn8.bigcommerce.com/s-{{store_hash}}/products/184/images/445/naturalcanvascart2_1024x1024__92347__29648.1534344533.1280.1280.jpg?c=2", "purchasing_disabled": { "status": true, "message": "string" } }, "id": 0 }
Response
Body
dataobject
Part of Modifier Value Response
metaobject
Response metadata.
example
{ "data": { "id": 190, "option_id": 222, "label": "Yes", "sort_order": 0, "value_data": {}, "is_default": false, "adjusters": { "price": { "adjuster": "relative", "adjuster_value": 5 }, "weight": {}, "image_url": "", "purchasing_disabled": { "status": false, "message": "" } } }, "meta": {} }
Delete Modifier Value
DELETE /stores/{store_hash}/v3/catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}
Request
Deletes a Modifier Value.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - modifier_id in path - integer - required
The ID of the
Modifier
. - value_id in path - integer - required
The ID of the
Modifier/Option Value
. - modifier_id in path - integer - required
The ID of the
Modifier
. - value_id in path - integer - required
The ID of the
Modifier/Option Value
.
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/modifiers/[modifier_id]/values/[value_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'