StorefrontAttribute
Type: schema
Description
A customer attribute the store shows to shoppers.
TypeScript Definition
typescript
StorefrontAttribute: {{
id: string;
/** @description The attribute's key, unique in the store. */
slug: string;
name: string;
attribute_type: components["schemas"]["CustomerAttributeType"];
kind: components["schemas"]["AttributeKind"];
/** @description Shoppers can't change the value. Always `true` for `linked` and `system` attributes. */
is_readonly: boolean;
/** @description `true` when `kind` is `linked`. Kept for existing integrations: use `kind`. */
is_linked: boolean;
/** @description Where a `linked` attribute's values come from; `null` for the other kinds. */
link: null | components["schemas"]["AttributeLink"];
};
/**
* StorefrontResponseEvent
* @description A single analytics event to emit for a mutation you just made, returned in a response's `events` array. Each entry pairs a human-readable `event` name with a server-issued `event_id` (ULID): forward that id with your own client-side copy (pixel, tag, SDK) so both copies of the same action dedupe to one and downstream destinations count it once. `event` is the discriminator; the keys beside `event` and `event_id` identify the entity the event is about.
*/
}Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CustomerAttributeType"] | CustomerAttributeType |
components["schemas"]["AttributeKind"] | AttributeKind |
components["schemas"]["AttributeLink"] | AttributeLink |
OpenAPI Schema
json
{
"title": "StorefrontAttribute",
"description": "A customer attribute the store shows to shoppers.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/StorefrontAttribute",
"description": "API reference for the StorefrontAttribute schema"
},
"required": [
"id",
"slug",
"name",
"attribute_type",
"kind",
"is_readonly",
"is_linked",
"link"
],
"properties": {
"id": {
"type": "string"
},
"slug": {
"description": "The attribute's key, unique in the store.",
"type": "string"
},
"name": {
"type": "string"
},
"attribute_type": {
"$ref": "#/components/schemas/CustomerAttributeType"
},
"kind": {
"$ref": "#/components/schemas/AttributeKind"
},
"is_readonly": {
"description": "Shoppers can't change the value. Always `true` for `linked` and `system` attributes.",
"type": "boolean"
},
"is_linked": {
"description": "`true` when `kind` is `linked`. Kept for existing integrations: use `kind`.",
"type": "boolean"
},
"link": {
"description": "Where a `linked` attribute's values come from; `null` for the other kinds.",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AttributeLink"
}
]
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions