curl 'http://localhost:9000/store/product-attributes/attr_01JB2K7A1B' \
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
const { product_attribute } = await client.store.productAttributes.$id.query({
$id: "attr_01JB2K7A1B",
})
{
"product_attribute": {
"id": "attr_01JB2K7A1B",
"name": "Material",
"handle": "material",
"description": null,
"type": "single_select",
"is_required": false,
"is_filterable": true,
"is_variant_axis": false,
"product_id": null,
"rank": 0,
"values": [
{ "id": "attrval_01JB2K7C2D", "name": "Linen", "rank": 0 }
],
"metadata": null,
"created_at": "2026-05-01T10:00:00.000Z",
"updated_at": "2026-05-01T10:00:00.000Z"
}
}
Products
Retrieve Product Attribute
Retrieve an active global product attribute by ID.
GET
/
store
/
product-attributes
/
{id}
curl 'http://localhost:9000/store/product-attributes/attr_01JB2K7A1B' \
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
const { product_attribute } = await client.store.productAttributes.$id.query({
$id: "attr_01JB2K7A1B",
})
{
"product_attribute": {
"id": "attr_01JB2K7A1B",
"name": "Material",
"handle": "material",
"description": null,
"type": "single_select",
"is_required": false,
"is_filterable": true,
"is_variant_axis": false,
"product_id": null,
"rank": 0,
"values": [
{ "id": "attrval_01JB2K7C2D", "name": "Linen", "rank": 0 }
],
"metadata": null,
"created_at": "2026-05-01T10:00:00.000Z",
"updated_at": "2026-05-01T10:00:00.000Z"
}
}
Returns a single active, global product attribute; inactive or product-scoped attributes return a
404.
Path parameters
The attribute’s ID.
Query parameters
Comma-separated fields and relations to include; prefix with
+/- to add to or remove from the defaults.Response
Show properties
Show properties
The attribute’s ID.
The attribute’s display name.
URL-safe handle.
The attribute’s description.
One of
single_select, multi_select, unit, toggle, text.Whether sellers must set a value.
Whether the attribute can drive storefront filters.
Whether the attribute defines a variant axis.
Always
null on the store API (global attributes only).Sort rank.
The attribute’s predefined values.
Custom key-value data.
Creation timestamp.
Last update timestamp.
curl 'http://localhost:9000/store/product-attributes/attr_01JB2K7A1B' \
-H 'x-publishable-api-key: pk_01JB2K3XYZ'
const { product_attribute } = await client.store.productAttributes.$id.query({
$id: "attr_01JB2K7A1B",
})
{
"product_attribute": {
"id": "attr_01JB2K7A1B",
"name": "Material",
"handle": "material",
"description": null,
"type": "single_select",
"is_required": false,
"is_filterable": true,
"is_variant_axis": false,
"product_id": null,
"rank": 0,
"values": [
{ "id": "attrval_01JB2K7C2D", "name": "Linen", "rank": 0 }
],
"metadata": null,
"created_at": "2026-05-01T10:00:00.000Z",
"updated_at": "2026-05-01T10:00:00.000Z"
}
}
⌘I