Skip to content

Attribute definitions

View as Markdown

An Attribute definition declares a property that products can describe themselves with - a material, a color, a care note. It is attached to one or more categories, and products of those categories (or of their descendants) carry a value for it in their attributes.

A definition has one of two types:

  • string - the value is free, translatable text (a care note, say).
  • list - the value must be one of the definition’s attribute options (Red, Black, …). When multiple is true, a product can carry several options of the same definition.

The code is the stable, machine-readable identifier of the definition. code, type and multiple are immutable once created; the translatable name and the categories can change.

No properties.

  • Describe products with free text. Create a string definition, attach it to a category, then set a value for it in the attributes of the category’s products.
  • Offer a fixed set of choices. Create a list definition, add its options, then reference an option in the products’ attributes.
  • Audit usage. Each definition reports a valuesCount - how many product attribute values currently reference it.

This resource is only available in the unstable version. Select it with the request header:

Flowkiwi-Api-Version: unstable

All requests require an OAuth 2.0 bearer token:

Authorization: Bearer <token>

Reading requires the categories:read scope; writing also requires categories:write.

Set the active locale for translatable fields:

Flowkiwi-Locale: fr-FR

PATCH uses JSON Merge Patch with Content-Type: application/merge-patch+json.