Create Attribute

Beta
POST/v1/catalog/properties/{property_id}/attributes

Idempotent with Idempotency-Key header. Learn more

Creates an attribute under a property.

Permissions requiredValues:properties:create
The role behind your API key or agent must grant every one of these permissions.
property_idstring

Property ID.

valuestring

The selectable value this attribute represents, such as Red.

Must be unique across all attributes in the account, not just within the property. Leading and trailing whitespace is trimmed.

coloroptional stringenumValues:bluebrowndefault

Swatch color used to display this attribute in the UI.

When omitted, one of the nine named colors (everything except default) is assigned at random.

sort_orderoptional integer

Position of the new attribute relative to its siblings within the property, starting at 1.

Must be at most the property's current attribute count plus one; siblings at or after this position are shifted one position later. Defaults to the last position if not provided.

idstring

Attribute ID.

objectstringenumValues:attribute

Resource type identifier.

valuestring

The selectable value this attribute represents, such as Red for a Color property or Large for a Size property.

colorstringenumValues:bluebrowndefault

Swatch color used to display this attribute in the UI.

The named colors are arbitrary display choices; default is a neutral fallback used when no specific swatch applies.

sort_orderinteger

Position of this attribute relative to its siblings within the property, starting at 1.

Positions are kept contiguous: creating, reordering, or deleting an attribute automatically shifts its siblings.

propertypropertynullable

The property this attribute belongs to.

Populated only when the attribute is returned under an item's attributes list.

idstring

Property ID.

objectstringenumValues:property

Resource type identifier.

namestring

Display name of the property, such as Color or Size.

attributeslistnullable

Attributes belonging to this property.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of attribute

Resources in this page.

idstring

Attribute ID.

objectstringenumValues:attribute

Resource type identifier.

valuestring

The selectable value this attribute represents, such as Red for a Color property or Large for a Size property.

colorstringenumValues:bluebrowndefault

Swatch color used to display this attribute in the UI.

The named colors are arbitrary display choices; default is a neutral fallback used when no specific swatch applies.

sort_orderinteger

Position of this attribute relative to its siblings within the property, starting at 1.

Positions are kept contiguous: creating, reordering, or deleting an attribute automatically shifts its siblings.

propertypropertynullable

The property this attribute belongs to.

Populated only when the attribute is returned under an item's attributes list.

idstring

Property ID.

objectstringenumValues:property

Resource type identifier.

namestring

Display name of the property, such as Color or Size.

attributeslistnullable

Attributes belonging to this property.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

dataarray of attribute

Resources in this page.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

Responses

201

Successful response for Create Attribute