Modifier Values

Get Shared Modifier Values

GET /catalog/shared-modifiers/{modifier_id}/values

Request

Get modifier values for a shared modifier.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • modifier_id in path - integer
    required
    The ID of the Shared Modifier to which the resource belongs.
  • 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.

  • label in query - string

    Filter items by label.

  • sort_order in query - string
    Filter items by sort order.

example

Response

An array of shared modifier values and metadata.

Body

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

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

Create Shared Modifier Values (Batch)

POST /catalog/shared-modifiers/{modifier_id}/values

Request

Bulk create modifier values for a shared modifier.

Authentication

  • X-Auth-Token in header

Parameters

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

Body

array | application/json
  • label
    string
    required

    The unique text display within one option identifying the value on the storefront. Unique within a modifier.
    >= 1 characters<= 255 characters
    Example: Yes
  • sort_order
    integer
    required

    The order in which the value displays on the storefront and in response bodies.
    Min: -2147483648
    Max: 2147483647
  • value_data
    object

    Additional data describing values for swatch and checkbox modifier types.

    Returned in the response for checkbox modifiers, but not needed in requests for checkbox modifiers.

    One of:
    • colors
      array[string]
      required

      Contains up to three hexidecimal color keys or an image_url, which is a full image URL path including the protocol.
      Type: array[string]
      Example: ["#954B4B","#211651","#314344"]
  • is_default
    boolean

    The flag for preselecting a value as the default on the storefront. Up to one default per modifier. This field is not supported for swatch modifiers.

example

Response

An array of SharedModifierValue objects.

Body

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

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

Update Shared Modifier Values (Batch)

PUT /catalog/shared-modifiers/{modifier_id}/values

Request

Bulk update modifier values for a shared modifier, using value IDs.

Authentication

  • X-Auth-Token in header

Parameters

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

Body

array | application/json
  • label
    string
    required

    The unique text display within one option identifying the value on the storefront. Unique within an option.
    >= 1 characters<= 255 characters
    Example: Cotton
  • sort_order
    integer
    required

    The order in which the value displays on the storefront or in response bodies.
    Min: -2147483648
    Max: 2147483647
    Example: 2
  • value_data
    object

    Additional data describing values for swatch option types.

  • is_default
    boolean

    The flag for preselecting a value as the default on the storefront. Up to one default per option. This field is not supported for swatch options.
    Example: true
  • id
    integer
    required

    The unique numeric ID of the shared modifier value; increments sequentially.
    Example: 3

example

Response

An array of SharedModifierValue objects.

Body

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

  • meta
    object
    required

    Data about the response, including pagination and collection totals.

example

Delete Shared Modifier Values

DELETE /catalog/shared-modifiers/{modifier_id}/values

Request

Delete modifier values for a shared modifier. Use value IDs in the query parameter, for example, ?id:in=1,2,3.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • modifier_id in path - integer
    required
    The ID of the Shared Modifier to which the resource belongs.
  • id:in in query - string
    required

example

Response

An empty response.

Get a Shared Modifier Value

GET /catalog/shared-modifiers/{modifier_id}/values/{id}

Request

Get a modifier value for a shared modifier by using a value ID and modifier ID.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • modifier_id in path - integer
    required
    The ID of the Shared Modifier to which the resource belongs.
  • id in path - integer
    required
    The ID of the Shared Modifier Value to which the resource belongs.

example

Response

A SharedModifierValue object.

Body

object | application/json
  • data
    object
    required

    Common shared modifier value properties.
  • meta
    object
    required

    Empty meta object; may be used later.

example

Did you find what you were looking for?