Option values
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.
The Option Value object
Section titled “The Option Value object”| Property | Type | Required | Description |
|---|---|---|---|
id | string | - | |
value | string | null | required | This property supports translations. The value of the option. |
position | integer | null | - | The position of the option value. Use -1 to put the option value at the end. |
productOption | string | required | The Product Option to which this option value belongs. |
variants | string[] | - | A list of Variant, each one representing a variant associated with the option value. |
createdAt | string | - | The date and time when the resource was created (ISO 8601 format). |
updatedAt | string | - | The date and time when the resource was last modified (ISO 8601 format). |
Endpoints
Section titled “Endpoints”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 theproductOptionIRI the value belongs to. - List, retrieve, update, delete - nested under
/product_options/{productOptionId}/option_values.
Common workflows
Section titled “Common workflows”- Populate an option. After creating a Size option, add S, M and L with three
POST /option_valuescalls, each pointing at the sameproductOption. - Reorder values.
PATCHthepositionto change the display order within the option. - Localize a value. Send
X-Flowkiwi-Localeon write to set thevaluefor that locale.