Skip to content

Option values

View as Markdown

An Option Value is one possible value of a Product Option - for example Medium for a Size option, or Red for a Color option. Option values are ordered by position within their option, and their combinations across a product’s options define its Variants.

The value field is translatable, so the same value can read Medium in one locale and Moyen in another.

PropertyTypeRequiredDescription
idstring-
valuestring | nullrequiredThis property supports translations.

The value of the option.
positioninteger | null-The position of the option value. Use -1 to put the option value at the end.
productOptionstringrequiredThe Product Option to which this option value belongs.
variantsstring[]-A list of Variant, each one representing a variant associated with the option value.
createdAtstring-The date and time when the resource was created (ISO 8601 format).
updatedAtstring-The date and time when the resource was last modified (ISO 8601 format).

Unlike options and variants, option values are created through a single top-level endpoint and read through their parent option:

  • Create - POST /option_values, passing the productOption IRI the value belongs to.
  • List, retrieve, update, delete - nested under /product_options/{productOptionId}/option_values.
  • Populate an option. After creating a Size option, add S, M and L with three POST /option_values calls, each pointing at the same productOption.
  • Reorder values. PATCH the position to change the display order within the option.
  • Localize a value. Send X-Flowkiwi-Locale on write to set the value for that locale.