Customer attributes
The fields a website adds to its customers — typed, localized, required or not, asked on the registration form or not — put in order with :move.
List customer attributes
A field the tenant adds to the website's customers — a birth date, a loyalty number, a preferred store — with its type, its label in each language, whether it is required and whether the registration form asks for it. A customer's values are kept in their attributes under the field's key. A field is switched off with is_active rather than deleted when its values are worth keeping: deleting it removes them from every customer. At most 100 per website.
path Parameters
website_idId of the parent website.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: sort_order asc. Sortable: key, sort_order.
filterAIP-160 subset (§8). Filterable: display_name, group_id, is_active, is_required, key, show_in_account, show_in_registration, type. A field outside the list is INVALID_ARGUMENT.
List customer attributes › Responses
One page of customer_attributes.
This page of customer_attributes, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Create customer attribute
Adds a field to the website's customers. key, display_name and type are required; a key another field of the website has answers ALREADY_EXISTS, and a website that already has 100 fields answers FAILED_PRECONDITION. The new field comes last in sort_order.
path Parameters
website_idId of the parent website.
Create customer attribute › Request Body
display_nameThe field's label, shown wherever labels has none for the locale. Not blank, at most 255 characters.
keyThe name a customer's value is stored under in their attributes, and the name a registration form sends it as: a lowercase letter, then up to 63 lowercase letters, digits and underscores. Unique on the website, and none of a customer's own field names (email, display_name, tags, ...). Required on create and fixed afterwards.
labelsThe label in other languages: an object from a locale (de, pt-BR) to the label in it, each at most 255 characters. A locale it leaves out shows display_name. Replaced whole when sent.
descriptionThe hint shown under the field on a form. At most 2000 characters.
typeWhat the field holds, and so which control a form draws: TEXT, TEXTAREA, NUMBER, BOOLEAN, DATE (a YYYY-MM-DD string), SELECT (one of options) or MULTISELECT (any of them). Required on create and fixed afterwards.
optionsThe choices of a SELECT or MULTISELECT field, in the order a form lists them: each {value, display_name, labels}, where value is what a customer's attributes stores and is unique within the field. At least one and at most 100 for those two types, none for the others. Replaced whole when sent.
is_requiredWhether a form refuses to save the customer without a value for it. false when omitted.
show_in_registrationWhether the website's registration form asks for it. false when omitted — the field is then filled in the admin only.
show_in_accountWhether the customer sees and edits it in their account on the website. false when omitted — the value is then the shop's alone.
is_activeWhether the field is in use. Switching it off takes it off every form and stops new values being accepted, while the values customers already hold stay readable — the way to retire a field without losing them. true when omitted.
min_lengthThe fewest characters a TEXT or TEXTAREA value may have. Not allowed on other types.
max_lengthThe most characters a TEXT or TEXTAREA value may have — at most 1024 for TEXT and 8192 for TEXTAREA, which is also the limit when it is omitted. Not allowed on other types.
min_valueThe smallest value a NUMBER field accepts. Not allowed on other types.
max_valueThe largest value a NUMBER field accepts. Not allowed on other types.
group_idThe customer_attribute_groups section the admin's customer form shows the field in — an id of a group of the website. Without one the field is in the default section; deleting its group puts it back there.
Create customer attribute › Responses
The created resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
keyThe name a customer's value is stored under in their attributes, and the name a registration form sends it as: a lowercase letter, then up to 63 lowercase letters, digits and underscores. Unique on the website, and none of a customer's own field names (email, display_name, tags, ...). Required on create and fixed afterwards.
display_nameThe field's label, shown wherever labels has none for the locale. Not blank, at most 255 characters.
labelsThe label in other languages: an object from a locale (de, pt-BR) to the label in it, each at most 255 characters. A locale it leaves out shows display_name. Replaced whole when sent.
descriptionThe hint shown under the field on a form. At most 2000 characters.
typeWhat the field holds, and so which control a form draws: TEXT, TEXTAREA, NUMBER, BOOLEAN, DATE (a YYYY-MM-DD string), SELECT (one of options) or MULTISELECT (any of them). Required on create and fixed afterwards.
optionsThe choices of a SELECT or MULTISELECT field, in the order a form lists them: each {value, display_name, labels}, where value is what a customer's attributes stores and is unique within the field. At least one and at most 100 for those two types, none for the others. Replaced whole when sent.
is_requiredWhether a form refuses to save the customer without a value for it. false when omitted.
show_in_registrationWhether the website's registration form asks for it. false when omitted — the field is then filled in the admin only.
show_in_accountWhether the customer sees and edits it in their account on the website. false when omitted — the value is then the shop's alone.
is_activeWhether the field is in use. Switching it off takes it off every form and stops new values being accepted, while the values customers already hold stay readable — the way to retire a field without losing them. true when omitted.
min_lengthThe fewest characters a TEXT or TEXTAREA value may have. Not allowed on other types.
max_lengthThe most characters a TEXT or TEXTAREA value may have — at most 1024 for TEXT and 8192 for TEXTAREA, which is also the limit when it is omitted. Not allowed on other types.
min_valueThe smallest value a NUMBER field accepts. Not allowed on other types.
max_valueThe largest value a NUMBER field accepts. Not allowed on other types.
group_idThe customer_attribute_groups section the admin's customer form shows the field in — an id of a group of the website. Without one the field is in the default section; deleting its group puts it back there.
sort_orderWhere the field stands among the website's fields: lists and forms show them in ascending sort_order. A new field comes last; :move is the only way to change it.
Get customer attribute
A field the tenant adds to the website's customers — a birth date, a loyalty number, a preferred store — with its type, its label in each language, whether it is required and whether the registration form asks for it. A customer's values are kept in their attributes under the field's key. A field is switched off with is_active rather than deleted when its values are worth keeping: deleting it removes them from every customer. At most 100 per website.
path Parameters
website_idId of the parent website.
attribute_idId of the parent attribute.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get customer attribute › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
keyThe name a customer's value is stored under in their attributes, and the name a registration form sends it as: a lowercase letter, then up to 63 lowercase letters, digits and underscores. Unique on the website, and none of a customer's own field names (email, display_name, tags, ...). Required on create and fixed afterwards.
display_nameThe field's label, shown wherever labels has none for the locale. Not blank, at most 255 characters.
labelsThe label in other languages: an object from a locale (de, pt-BR) to the label in it, each at most 255 characters. A locale it leaves out shows display_name. Replaced whole when sent.
descriptionThe hint shown under the field on a form. At most 2000 characters.
typeWhat the field holds, and so which control a form draws: TEXT, TEXTAREA, NUMBER, BOOLEAN, DATE (a YYYY-MM-DD string), SELECT (one of options) or MULTISELECT (any of them). Required on create and fixed afterwards.
optionsThe choices of a SELECT or MULTISELECT field, in the order a form lists them: each {value, display_name, labels}, where value is what a customer's attributes stores and is unique within the field. At least one and at most 100 for those two types, none for the others. Replaced whole when sent.
is_requiredWhether a form refuses to save the customer without a value for it. false when omitted.
show_in_registrationWhether the website's registration form asks for it. false when omitted — the field is then filled in the admin only.
show_in_accountWhether the customer sees and edits it in their account on the website. false when omitted — the value is then the shop's alone.
is_activeWhether the field is in use. Switching it off takes it off every form and stops new values being accepted, while the values customers already hold stay readable — the way to retire a field without losing them. true when omitted.
min_lengthThe fewest characters a TEXT or TEXTAREA value may have. Not allowed on other types.
max_lengthThe most characters a TEXT or TEXTAREA value may have — at most 1024 for TEXT and 8192 for TEXTAREA, which is also the limit when it is omitted. Not allowed on other types.
min_valueThe smallest value a NUMBER field accepts. Not allowed on other types.
max_valueThe largest value a NUMBER field accepts. Not allowed on other types.
group_idThe customer_attribute_groups section the admin's customer form shows the field in — an id of a group of the website. Without one the field is in the default section; deleting its group puts it back there.
sort_orderWhere the field stands among the website's fields: lists and forms show them in ascending sort_order. A new field comes last; :move is the only way to change it.
Delete customer attribute
Deletes a field. Switch is_active off instead to keep the values customers hold under it.
path Parameters
website_idId of the parent website.
attribute_idId of the parent attribute.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete customer attribute › Responses
Deleted. No body (§7).
Update customer attribute
Changes a field. key and type are fixed and refused here, and sort_order is changed with :move. The result is checked as a whole: options only on SELECT and MULTISELECT, a length only on TEXT and TEXTAREA, a range only on NUMBER.
path Parameters
website_idId of the parent website.
attribute_idId of the parent attribute.
query Parameters
update_maskComma-separated field paths to merge. A field named here and sent as null is cleared; without the mask a null is dropped (§7, §11).
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Update customer attribute › Request Body
display_nameThe field's label, shown wherever labels has none for the locale. Not blank, at most 255 characters.
labelsThe label in other languages: an object from a locale (de, pt-BR) to the label in it, each at most 255 characters. A locale it leaves out shows display_name. Replaced whole when sent.
descriptionThe hint shown under the field on a form. At most 2000 characters.
optionsThe choices of a SELECT or MULTISELECT field, in the order a form lists them: each {value, display_name, labels}, where value is what a customer's attributes stores and is unique within the field. At least one and at most 100 for those two types, none for the others. Replaced whole when sent.
is_requiredWhether a form refuses to save the customer without a value for it. false when omitted.
show_in_registrationWhether the website's registration form asks for it. false when omitted — the field is then filled in the admin only.
show_in_accountWhether the customer sees and edits it in their account on the website. false when omitted — the value is then the shop's alone.
is_activeWhether the field is in use. Switching it off takes it off every form and stops new values being accepted, while the values customers already hold stay readable — the way to retire a field without losing them. true when omitted.
min_lengthThe fewest characters a TEXT or TEXTAREA value may have. Not allowed on other types.
max_lengthThe most characters a TEXT or TEXTAREA value may have — at most 1024 for TEXT and 8192 for TEXTAREA, which is also the limit when it is omitted. Not allowed on other types.
min_valueThe smallest value a NUMBER field accepts. Not allowed on other types.
max_valueThe largest value a NUMBER field accepts. Not allowed on other types.
group_idThe customer_attribute_groups section the admin's customer form shows the field in — an id of a group of the website. Without one the field is in the default section; deleting its group puts it back there.
Update customer attribute › Responses
The updated resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
keyThe name a customer's value is stored under in their attributes, and the name a registration form sends it as: a lowercase letter, then up to 63 lowercase letters, digits and underscores. Unique on the website, and none of a customer's own field names (email, display_name, tags, ...). Required on create and fixed afterwards.
display_nameThe field's label, shown wherever labels has none for the locale. Not blank, at most 255 characters.
labelsThe label in other languages: an object from a locale (de, pt-BR) to the label in it, each at most 255 characters. A locale it leaves out shows display_name. Replaced whole when sent.
descriptionThe hint shown under the field on a form. At most 2000 characters.
typeWhat the field holds, and so which control a form draws: TEXT, TEXTAREA, NUMBER, BOOLEAN, DATE (a YYYY-MM-DD string), SELECT (one of options) or MULTISELECT (any of them). Required on create and fixed afterwards.
optionsThe choices of a SELECT or MULTISELECT field, in the order a form lists them: each {value, display_name, labels}, where value is what a customer's attributes stores and is unique within the field. At least one and at most 100 for those two types, none for the others. Replaced whole when sent.
is_requiredWhether a form refuses to save the customer without a value for it. false when omitted.
show_in_registrationWhether the website's registration form asks for it. false when omitted — the field is then filled in the admin only.
show_in_accountWhether the customer sees and edits it in their account on the website. false when omitted — the value is then the shop's alone.
is_activeWhether the field is in use. Switching it off takes it off every form and stops new values being accepted, while the values customers already hold stay readable — the way to retire a field without losing them. true when omitted.
min_lengthThe fewest characters a TEXT or TEXTAREA value may have. Not allowed on other types.
max_lengthThe most characters a TEXT or TEXTAREA value may have — at most 1024 for TEXT and 8192 for TEXTAREA, which is also the limit when it is omitted. Not allowed on other types.
min_valueThe smallest value a NUMBER field accepts. Not allowed on other types.
max_valueThe largest value a NUMBER field accepts. Not allowed on other types.
group_idThe customer_attribute_groups section the admin's customer form shows the field in — an id of a group of the website. Without one the field is in the default section; deleting its group puts it back there.
sort_orderWhere the field stands among the website's fields: lists and forms show them in ascending sort_order. A new field comes last; :move is the only way to change it.
Move (customer attribute)
Moves a field to another place among the website's fields. Send {"after_id": "..."} to put it right after that field, or {"after_id": null} (or {}) to put it first. Answers the moved field with its new sort_order; the other fields are renumbered around it.
path Parameters
website_idId of the parent website.
attribute_idId of the parent attribute.
Move (customer attribute) › Request Body optional
Move (customer attribute) › Responses
The affected resource, or the method’s own response object (§10).