Skip to main content
POST
/
admin
/
product-attributes
/
{id}
/
values
/
{value_id}
curl -X POST 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF/values/pattrval_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Belgian Linen"}'
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Material",
    "type": "single_select",
    "values": [
      { "id": "pattrval_01HXYZABCDEF", "name": "Belgian Linen", "rank": 0 }
    ]
  }
}
Updates the value and returns the parent attribute.

Path parameters

id
string
required
The attribute’s ID.
value_id
string
required
The value’s ID.

Body parameters

name
string
Value name.
handle
string
Unique URL-safe handle.
rank
number
Sort rank; must be non-negative.
is_active
boolean
Whether the value is active.
metadata
object
Custom key-value data.
additional_data
object
Custom data passed to workflow hooks.

Response

product_attribute
object
curl -X POST 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF/values/pattrval_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Belgian Linen"}'
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Material",
    "type": "single_select",
    "values": [
      { "id": "pattrval_01HXYZABCDEF", "name": "Belgian Linen", "rank": 0 }
    ]
  }
}