Option Sets
This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.
Option Sets
A reusable set of option facets that can be applied to products.
Option Set Object Properties
List Option Sets
Gets the collection of option sets. (Default sorting is by option-set id, from lowest to highest.)
GET /stores/{store_hash}/v2/option_sets
Filters
Filter parameters can be added to the URL query string to select specific option_sets in the collection.
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_sets are returned by default.
Response
Example JSON returned in the response:
Get an Option Set
Gets an option set.
GET /stores/{store_hash}/v2/option_sets/{id}
Response
Example JSON returned in the response:
Get a Count of Option Sets
Gets a count of the number of option sets in the store.
GET /stores/{store_hash}/v2/option_sets/count
Response
Example JSON returned in the response:
Create an Option Set
Creates a new Option set.
POST /stores/{store_hash}/v2/option_sets
Read-only Properties
The following properties of the option set are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- options
Requirements
The following properties of the option set are required. The request won’t be fulfilled unless these properties are valid.
- name
Request
Example request object:
Response
Example JSON returned in the response:
Update an Option Set
Updates an existing option set.
PUT /stores/{store_hash}/v2/option_sets/{id}
Read-only Properties
The following properties of the option set are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- options
Requirements
The following properties of the option set are required. The request won’t be fulfilled unless these properties are valid.
- name
Request
Example request object:
Response
Example JSON returned in the response:
Delete an Option Set
Deletes an option set.
DELETE /stores/{store_hash}/v2/option_sets/{id}
Delete All Option Sets
Deletes all option sets in the store.
DELETE /stores/{store_hash}/v2/option_sets