Option Values
Option Values
Values that can be selected for an option.
This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.
Option Value Object Properties
List Option Values
Gets the values belonging to an option. (Default sorting is by option-value id, from lowest to highest.)
GET /stores/{store_hash}/v2/options/{option_id}/values
Pagination
Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 option_values are returned by default.
Response
Example JSON returned in the response:
Get an Option Value
Gets an option value.
GET /stores/{store_hash}/v2/options/{option_id}/values/{id}
Response
Example JSON returned in the response:
Create an Option Value
Creates a new option value.
POST /stores/{store_hash}/v2/options/{option_id}/values
Read-only Properties
The following properties of the option value are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- option_id
Requirements
The following properties of the option value are required. The request won’t be fulfilled unless these properties are valid.
- label
- value
Note
To maximize system performance, BigCommerce caps the total number of values per option at 250. IF the option has 250 values and you try to create another one, BigCommerce will return a 403 error.
When you POST an is_defaultproperty of true, all other option values on the parent option will have their is_default property set to false.
Request
Example request object:
Response
Example JSON returned in the response:
Update an Option Value
Updates an existing option value.
PUT /stores/{store_hash}/v2/options/{option_id}/values/{id}
Read-only Properties
The following properties of the option value are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- option_id
Requirements
The following properties of the option value are required. The request won’t be fulfilled unless these properties are valid.
Notes
When you PUT an is_default property of true, all other option values on the parent option will have their is_default property set to false.
Request
Example request object:
Response
Example JSON returned in the response:
Delete an Option Value
Deletes an option value.
DELETE /stores/{store_hash}/v2/options/{option_id}/values/{id}
Delete Multiple Option Values
Deletes multiple values belonging to an option.
DELETE /stores/{store_hash}/v2/options/{option_id}/values
Pagination
Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 option_values are returned by default.