Skip to main content

Suggest Attribute Values

POST 

/api/v2/attribute-suggestions/run

Start a background run that suggests values for EMPTY attributes. Scope: the given product_ids, or (when omitted) every active product missing at least one of the chosen attributes. Existing values are never overwritten.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Variants are grouped by style and each group is one AI item (20 groups per provider call). The AI picks from each attribute's accepted values; values are normalised through the attribute value synonym list and anything outside the vocabulary is dropped. Footwear products never get print; closure and waterproofing are suggested for footwear only. Groups that already have a pending suggestion for an attribute are skipped. A confidence resting on the title alone is capped at 0.7.

When AI is off, not configured, or refused for the caller, the keyword engine runs instead (engine: keyword, confidence 0.6, or 0.75 for an exact multi-word phrase) unless engine is ai, which returns the refusal instead. ai_unavailable_reason is set (and the message says AI is not available) only when engine was auto and fell back; choosing engine: keyword returns ai_unavailable_reason: null. When auto-apply is on in the attribute suggestion settings, suggestions at or above the threshold are written immediately with status auto_applied.

Returns 202 with the tracked job id. A provider error fails the job but keeps the suggestions from earlier batches.

Fields:

  • product_ids (optional, array of integers, max 20000) - omit for all products missing a chosen attribute
  • attributes (required, array, min 1) - any of: print, silhouette, fabric, gender, age_group, closure, waterproofing
  • missing_only (optional, must be true) - suggestions only ever fill empty attributes
  • use_images (optional, boolean, default false) - also send each group's first product image (http(s), under 5 MB)
  • engine (optional: auto | ai | keyword, default auto)

Authentication: Requires Bearer token.

Requires permission: products.update

Request​

Responses​

Accepted

Response Headers
    Content-Type