Values

Get all product modifier values

GET /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

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 product modifier.

  • include_fields in query - array
    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
    Type: array[string]
  • exclude_fields in query - array
    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
    Type: array[string]
  • page in query - integer

    Specifies the page number in a limited (paginated) list of products.

  • limit in query with default of 50 - integer

    Controls the number of items per page in a limited (paginated) list of products.

example

Response

Body

object | application/json
Returns for GET All Modifier Values on a Product
  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create product modifier value

POST /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

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 product modifier.

  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
The model for a POST to create a modifier value on a product.
  • is_default
    boolean

    The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.

  • label
    string
    required

    The text display identifying the value on the storefront. Required in a /POST.

    Example: Green
  • sort_order
    integer
    required

    The order in which the value will be displayed on the product page. Required in a /POST.

    Min: -2147483648
    Max: 2147483647
  • value_data
    object

    Extra data describing the value, based on the type of option or modifier with which the value is associated. The swatch type option can accept an array of colors, with up to three hexadecimal color keys; or an image_url, which is a full image URL path including protocol. The product list type option requires a product_id. The checkbox type option requires a boolean flag, called checked_value, to determine which value is considered to be the checked state.

  • adjusters
    object

example

Response

Body

object | application/json
  • data
    object

    Part of Modifier Value Response
  • meta
    object

    Response metadata.

example

Get a product modifier value

GET /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

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 product modifier.

  • value_id in path - integer
    required

    The ID of the product modifier value.

  • include_fields in query - array
    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
    Type: array[string]
  • exclude_fields in query - array
    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
    Type: array[string]

example

Response

Body

object | application/json
  • data
    object

    Product modifier option_value.
  • meta
    object

    Response metadata.

example

Update a product modifier value

PUT /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

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 product modifier.

  • value_id in path - integer
    required

    The ID of the product modifier value.

  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
The model for a PUT to update a modifier value on a product.
  • is_default
    boolean

    The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.

  • label
    string
    required

    The text display identifying the value on the storefront. Required in a /POST.

    Example: Green
  • sort_order
    integer
    required

    The order in which the value will be displayed on the product page. Required in a /POST.

    Min: -2147483648
    Max: 2147483647
  • value_data
    object

    Extra data describing the value, based on the type of option or modifier with which the value is associated. The swatch type option can accept an array of colors, with up to three hexadecimal color keys; or an image_url, which is a full image URL path including protocol. The product list type option requires a product_id. The checkbox type option requires a boolean flag, called checked_value, to determine which value is considered to be the checked state.

  • adjusters
    object

  • id
    integer

    The unique numeric ID of the value; increments sequentially.

example

Response

Body

object | application/json
  • data
    object

    Part of Modifier Value Response
  • meta
    object

    Response metadata.

example

Delete product modifier value

DELETE /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}

Request

Deletes a modifier value.

Authentication

  • X-Auth-Token in header

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 product modifier.

  • value_id in path - integer
    required

    The ID of the product modifier value.

example

Response

Did you find what you were looking for?