Update an attribute definition

Identified by the path key + entity_type in the body. Provide only the fields to change; array fields replace wholesale.

Scope: write:attributes.

patch/attributes/{key}

Request

  • Base URL
    https://www.merchkit.com/api/v1
  • Auth
    HTTP bearer

Request body

entity_typestring required
namestring
data_type'single_line_text_field' | 'multi_line_text_field' | 'rich_text_field' | 'number' | 'boolean' | 'date' | 'url' | 'json' | 'single_select_list' | 'multi_select_list' | 'image' | 'video' | 'formula' | 'web_preview' | 'status' | 'progress' | 'rank'
ai_generatedboolean
custom_instructionsstring
formula_expressionstring

New template of a computed column. A formula or web_preview attribute keeps its data type; any other attribute becomes a formula. Recomputes every row.

acceptable_valuesstring
default_valuestring
is_primaryboolean
selected_toolsstring[]
source_attribute_keysstring[]
required_dependenciesstring[]
image_model'gpt-image-1' | 'nano-banana'
image_source_attribute_keystring[]
aspect_ratio'1:1' | '4:3' | '3:4' | '16:9' | '9:16'

Image generation aspect ratio. Legacy values (Square→1:1, Landscape→16:9, Portrait→9:16) are still accepted for backward compatibility but are deprecated.

video_model'veo3.1'
video_source_attribute_keystring[]
vision_image_source_attribute_keystring[]
inheritance_mode'off' | 'inherit_from_parent' | 'rollup_from_children'
rollup_aggregation'unique' | 'all'

Response

The updated attribute definition (full config).

Example response

{
  "data": {
    "id": "a3d81c22-5f6e-4b09-8d17-c40a92e5b613",
    "name": "Material",
    "key": "material",
    "data_type": "single_select_list",
    "tool": "manual",
    "entity_type": "product",
    "channel": null,
    "is_primary": false,
    "custom_instructions": null,
    "acceptable_values": "White Oak,Smoked Oak,Walnut",
    "default_value": null,
    "constraints": {},
    "source_attributes": null
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.