POST
/
admin
/
attributes
/
{id}
{
  "attribute": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "handle": "<string>",
    "is_filterable": true,
    "ui_component": "select",
    "metadata": {},
    "possible_values": [
      {
        "id": "<string>",
        "value": "<string>",
        "rank": 123,
        "metadata": {},
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "values": [
      {
        "id": "<string>",
        "value": "<string>"
      }
    ],
    "product_categories": [
      {
        "id": "<string>",
        "name": "<string>"
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the attribute to update.

Body

application/json
name
string

The name of the attribute.

description
string

A description of the attribute.

handle
string

A unique handle for the attribute.

is_filterable
boolean

Whether the attribute can be used for filtering products.

ui_component
enum<string>

The UI component type for this attribute.

Available options:
select,
multivalue,
unit,
toggle,
text_area,
color_picker
metadata
object

Additional metadata for the attribute.

product_category_ids
string[]

Array of product category IDs to associate with this attribute.

possible_values
object[]

Array of possible values for the attribute.

Response

OK

attribute
object

Attribute object