Customers
The visitors who have an account on a website. A customer belongs to one website, and signs in to it on the site itself; what is managed here is who they are, which groups they are in, and whether they may sign in at all.
List customers
A visitor who has an account on the website — registered on the site itself or added here by the tenant. A customer belongs to one website: the same address on another website is another customer. Groups are assigned by hand in manual_group_ids; group_ids is the resulting membership. The fields the website adds to its customers are filled in attributes.
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: create_time desc. Sortable: create_time, email.
filterAIP-160 subset (§8). Filterable: create_time, display_name, email, is_active, tags. A field outside the list is INVALID_ARGUMENT.
List customers › Responses
One page of customers.
This page of customers, 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
Adds a customer to the website, as if they had registered on it: email is required, and an address the website already has answers ALREADY_EXISTS. password is optional at creation — a customer added without one signs in with a code sent to their email where the website offers it, or chooses a password through a password reset link. Groups are given in manual_group_ids and must be MANUAL groups of the same website.
path Parameters
website_idId of the parent website.
Create customer › Request Body
emailThe address the customer signs in to the website with. Unique on the website, compared and stored lowercase with surrounding spaces dropped. Required on create; the shop cannot change it afterwards — the customer changes it in their account on the website.
display_nameThe name the customer is greeted by on the website and listed under in the admin. At most 255 characters.
tagsFree-form labels to segment customers by, each 1 to 64 characters; a repeated one is kept once. filter=tags:"vip" lists the customers carrying a tag.
manual_group_idsThe groups this customer was put in by hand — ids of customer_groups of the website whose type is MANUAL. A deleted group drops out of it on its own.
is_activeWhether the customer may sign in. A new customer is active; switching it off keeps the account but stops its sessions from being renewed.
attributesThe customer's values of the fields the website defines in customer_attributes: an object from a field's key to its value — a string for TEXT, TEXTAREA, SELECT and DATE (YYYY-MM-DD), a number for NUMBER, true or false for BOOLEAN, an array of option values for MULTISELECT. Replaced whole when sent: a field it leaves out, or sends as null, an empty string or an empty array, has no value, and a field with is_required must have one — on create too, where an absent object counts as an empty one. A key the website has no field for, or a value its field does not accept, is refused on attributes.<key>. The value of a field switched off with is_active is kept as it is: sent back unchanged it is accepted, changed it is refused. Deleting a field removes its value from every customer. Omitted when empty.
passwordThe customer's password: at least 8 characters with a letter and a digit. Optional on create: a customer created without one cannot sign in with a password until they choose one through a password reset link, and signs in with a code sent to their email where the website offers it. On update it sets a new one and signs the customer out of every session. Write-only — never returned.
Create customer › 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).
emailThe address the customer signs in to the website with. Unique on the website, compared and stored lowercase with surrounding spaces dropped. Required on create; the shop cannot change it afterwards — the customer changes it in their account on the website.
display_nameThe name the customer is greeted by on the website and listed under in the admin. At most 255 characters.
tagsFree-form labels to segment customers by, each 1 to 64 characters; a repeated one is kept once. filter=tags:"vip" lists the customers carrying a tag.
manual_group_idsThe groups this customer was put in by hand — ids of customer_groups of the website whose type is MANUAL. A deleted group drops out of it on its own.
group_idsEvery group the customer is in: the ones in manual_group_ids and the DYNAMIC ones whose rule they match, derived again whenever the customer is written and whenever such a rule changes. This is the membership the website decides by, and it is maintained by the server.
is_activeWhether the customer may sign in. A new customer is active; switching it off keeps the account but stops its sessions from being renewed.
attributesThe customer's values of the fields the website defines in customer_attributes: an object from a field's key to its value — a string for TEXT, TEXTAREA, SELECT and DATE (YYYY-MM-DD), a number for NUMBER, true or false for BOOLEAN, an array of option values for MULTISELECT. Replaced whole when sent: a field it leaves out, or sends as null, an empty string or an empty array, has no value, and a field with is_required must have one — on create too, where an absent object counts as an empty one. A key the website has no field for, or a value its field does not accept, is refused on attributes.<key>. The value of a field switched off with is_active is kept as it is: sent back unchanged it is accepted, changed it is refused. Deleting a field removes its value from every customer. Omitted when empty.
Get customer
A visitor who has an account on the website — registered on the site itself or added here by the tenant. A customer belongs to one website: the same address on another website is another customer. Groups are assigned by hand in manual_group_ids; group_ids is the resulting membership. The fields the website adds to its customers are filled in attributes.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get customer › 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).
emailThe address the customer signs in to the website with. Unique on the website, compared and stored lowercase with surrounding spaces dropped. Required on create; the shop cannot change it afterwards — the customer changes it in their account on the website.
display_nameThe name the customer is greeted by on the website and listed under in the admin. At most 255 characters.
tagsFree-form labels to segment customers by, each 1 to 64 characters; a repeated one is kept once. filter=tags:"vip" lists the customers carrying a tag.
manual_group_idsThe groups this customer was put in by hand — ids of customer_groups of the website whose type is MANUAL. A deleted group drops out of it on its own.
group_idsEvery group the customer is in: the ones in manual_group_ids and the DYNAMIC ones whose rule they match, derived again whenever the customer is written and whenever such a rule changes. This is the membership the website decides by, and it is maintained by the server.
is_activeWhether the customer may sign in. A new customer is active; switching it off keeps the account but stops its sessions from being renewed.
attributesThe customer's values of the fields the website defines in customer_attributes: an object from a field's key to its value — a string for TEXT, TEXTAREA, SELECT and DATE (YYYY-MM-DD), a number for NUMBER, true or false for BOOLEAN, an array of option values for MULTISELECT. Replaced whole when sent: a field it leaves out, or sends as null, an empty string or an empty array, has no value, and a field with is_required must have one — on create too, where an absent object counts as an empty one. A key the website has no field for, or a value its field does not accept, is refused on attributes.<key>. The value of a field switched off with is_active is kept as it is: sent back unchanged it is accepted, changed it is refused. Deleting a field removes its value from every customer. Omitted when empty.
Delete customer
Deletes a customer together with their sessions: whoever was signed in as them is signed out. The address becomes free to register again.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete customer › Responses
Deleted. No body (§7).
Update customer
Changes a customer. email is fixed and refused here; a password in the body replaces the customer's password and signs them out of every session they have on the website.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
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 › Request Body
display_nameThe name the customer is greeted by on the website and listed under in the admin. At most 255 characters.
tagsFree-form labels to segment customers by, each 1 to 64 characters; a repeated one is kept once. filter=tags:"vip" lists the customers carrying a tag.
manual_group_idsThe groups this customer was put in by hand — ids of customer_groups of the website whose type is MANUAL. A deleted group drops out of it on its own.
is_activeWhether the customer may sign in. A new customer is active; switching it off keeps the account but stops its sessions from being renewed.
attributesThe customer's values of the fields the website defines in customer_attributes: an object from a field's key to its value — a string for TEXT, TEXTAREA, SELECT and DATE (YYYY-MM-DD), a number for NUMBER, true or false for BOOLEAN, an array of option values for MULTISELECT. Replaced whole when sent: a field it leaves out, or sends as null, an empty string or an empty array, has no value, and a field with is_required must have one — on create too, where an absent object counts as an empty one. A key the website has no field for, or a value its field does not accept, is refused on attributes.<key>. The value of a field switched off with is_active is kept as it is: sent back unchanged it is accepted, changed it is refused. Deleting a field removes its value from every customer. Omitted when empty.
passwordThe customer's password: at least 8 characters with a letter and a digit. Optional on create: a customer created without one cannot sign in with a password until they choose one through a password reset link, and signs in with a code sent to their email where the website offers it. On update it sets a new one and signs the customer out of every session. Write-only — never returned.
Update customer › 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).
emailThe address the customer signs in to the website with. Unique on the website, compared and stored lowercase with surrounding spaces dropped. Required on create; the shop cannot change it afterwards — the customer changes it in their account on the website.
display_nameThe name the customer is greeted by on the website and listed under in the admin. At most 255 characters.
tagsFree-form labels to segment customers by, each 1 to 64 characters; a repeated one is kept once. filter=tags:"vip" lists the customers carrying a tag.
manual_group_idsThe groups this customer was put in by hand — ids of customer_groups of the website whose type is MANUAL. A deleted group drops out of it on its own.
group_idsEvery group the customer is in: the ones in manual_group_ids and the DYNAMIC ones whose rule they match, derived again whenever the customer is written and whenever such a rule changes. This is the membership the website decides by, and it is maintained by the server.
is_activeWhether the customer may sign in. A new customer is active; switching it off keeps the account but stops its sessions from being renewed.
attributesThe customer's values of the fields the website defines in customer_attributes: an object from a field's key to its value — a string for TEXT, TEXTAREA, SELECT and DATE (YYYY-MM-DD), a number for NUMBER, true or false for BOOLEAN, an array of option values for MULTISELECT. Replaced whole when sent: a field it leaves out, or sends as null, an empty string or an empty array, has no value, and a field with is_required must have one — on create too, where an absent object counts as an empty one. A key the website has no field for, or a value its field does not accept, is refused on attributes.<key>. The value of a field switched off with is_active is kept as it is: sent back unchanged it is accepted, changed it is refused. Deleting a field removes its value from every customer. Omitted when empty.