Options

Get Shared Options

GET /catalog/shared-product-options

Request

Get all shared options in the Catalog.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • 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.

  • id in query - integer

    Filter items by id.

  • name in query - string

    Filter items by name.

  • storefront_name in query - string

    Filter items by storefront_name.

  • type in query - string
    Filter items by type.

    Allowed: swatch | radio_buttons | rectangles | dropdown

  • sort in query - string
    Sort items.

    Allowed: id | name | storefront_name | type

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/shared-product-options' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

An array of shared options and metadata.

Body

object | application/json
  • data
    array[object]
    required

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

{
"data": [
{
"id": 3,
"name": "Sleeve length",
"storefront_name": "Sleeve length",
"type": "rectangles",
"option_type": "variant_option",
"values": [
{
"id": 5,
"label": "Long",
"sort_order": 0,
"is_default": true
},
{
"id": 6,
"label": "Short",
"sort_order": 1,
"is_default": false
}
],
"associated_products_qty": 1,
"associated_products": [
{
"id": "3"
}
]
}
],
"meta": {

Create Shared Options (Batch)

POST /catalog/shared-product-options

Request

Create shared options in bulk.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string

Body

array | application/json
  • name
    string
    required

    The unique name identifying the shared option in the control panel. Name is unique within a store.
    >= 1 characters<= 255 characters
    Example: Fabric material
  • storefront_name
    string
    required

    The text display identifying the shared option on the storefront.
    >= 1 characters<= 255 characters
    Example: Fabric
  • type
    string
    required

    Type of shared option.

    Each type has a unique display style on the storefront.

    For an explanation of each type, see the Overview.

    Allowed: dropdown | rectangles | radio_buttons | swatch

  • values
    array[object]

    Data describing option values.

example

[
{
"name": "size",
"storefront_name": "Shirt size",
"type": "rectangles",
"values": [
{
"label": "Small",
"sort_order": 1,
"is_default": true
},
{
"label": "Large",
"sort_order": 2,
"is_default": false
}
]
}
]

Response

An array of SharedProductOption objects.

Body

object | application/json
  • data
    array[object]
    required

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

{
"data": [
{
"id": 45,
"name": "size",
"storefront_name": "Shirt size",
"type": "rectangles",
"option_type": "variant_option",
"values": [
{
"id": 50,
"label": "Small",
"sort_order": 1,
"is_default": true
},
{
"id": 51,
"label": "Large",
"sort_order": 2,
"is_default": false
}
],
"associated_products_qty": 0,
"associated_products": []
}
],
"meta": {}
}

Update Shared Options (Batch)

PUT /catalog/shared-product-options

Request

Bulk update shared options using option IDs.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string

Body

array | application/json
  • name
    string
    required

    The unique name identifying the shared option in the control panel. Name is unique within a store.
    >= 1 characters<= 255 characters
    Example: Fabric material
  • storefront_name
    string
    required

    The text display identifying the shared option on the storefront.
    >= 1 characters<= 255 characters
    Example: Fabric
  • type
    string
    required

    Type of shared option.

    Each type has a unique display style on the storefront.

    For an explanation of each type, see the Overview.

    Allowed: dropdown | rectangles | radio_buttons | swatch

  • values
    array[object]

    Data describing option values.

  • id
    integer

    The unique numeric ID of the value; increments sequentially.

example

[
{
"id": 45,
"name": "size",
"storefront_name": "Shirt size",
"type": "rectangles",
"values": [
{
"id": 50,
"label": "Dual color",
"sort_order": 1,
"is_default": true
},
{
"id": 51,
"label": "Single color",
"sort_order": 2,
"is_default": false
}
]
}
]

Response

An array of SharedProductOption objects.

Body

object | application/json
  • data
    array[object]
    required

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

{
"data": [
{
"id": 45,
"name": "size",
"storefront_name": "Shirt size",
"type": "rectangles",
"option_type": "variant_option",
"values": [
{
"id": 50,
"label": "Dual color",
"sort_order": 1,
"is_default": true
},
{
"id": 51,
"label": "Single color",
"sort_order": 2,
"is_default": false
}
],
"associated_products_qty": 0,
"associated_products": []
}
],
"meta": {}
}

Delete Shared Options

DELETE /catalog/shared-product-options

Request

Delete shared options by ID, for example, ?id:in=1,2,3.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • id:in in query - string
    required

example

curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/shared-product-options' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

An empty response.

Get a Shared Option

GET /catalog/shared-product-options/{option_id}

Request

Get a shared option by option ID.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • option_id in path - integer
    required
    The ID of the Shared Option to which the resource belongs.

example

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/shared-product-options/[option_id]' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

A SharedProductOption object.

Body

object | application/json
  • data
    object
    required

    Common Option properties.
  • meta
    object
    required

    Empty meta object; may be used later.

example

{
"data": {
"id": 45,
"name": "size",
"storefront_name": "Shirt size",
"type": "rectangles",
"option_type": "variant_option",
"values": [
{
"id": 50,
"label": "Dual color",
"sort_order": 1,
"is_default": true
},
{
"id": 51,
"label": "Single color",
"sort_order": 2,
"is_default": false
}
],
"associated_products_qty": 0,
"associated_products": []
},
"meta": {}
}
Did you find what you were looking for?