Customer addresses
A customer's address book: up to 100 addresses, each kept once, and which of them their orders go to and are billed to unless they choose another.
List customer addresses
Lists the customer's addresses, the whole book in one page by default: the default shipping address first, then the default billing address, then the others, the most recently changed first. Neither filters nor sorts.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
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: none — this collection serves its documented order only.
filterAIP-160 subset (§8). Filterable: none. A field outside the list is INVALID_ARGUMENT.
List customer addresses › Responses
One page of addresses.
This page of addresses, 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 address
Adds an address to the customer's book. country_code is required, and the parts its address format (address_formats/{country_code}) requires — always address_line1; region, where the format lists the country's regions, is the code of one of them. A part the country does not use is kept as sent. An address the book has already — the same street, place and recipient, whatever the case of Latin letters, the spacing, the phone or the label — answers ALREADY_EXISTS naming it, and a book that holds 100 addresses FAILED_PRECONDITION LIMIT. The first address of an empty book becomes its shipping default.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
Create customer address › Request Body
country_codeThe country, as its ISO 3166-1 alpha-2 code. Accepted in any case and kept uppercase. Required. Its address format (address_formats/{country_code}) says which of the other parts the address must have.
address_line1The street and house number — the street alone when street_number holds the number. At most 200 characters. Required.
recipient_nameThe person the address is for, as a parcel is labelled. At most 200 characters.
organizationThe company at the address, when there is one. At most 200 characters.
regionThe state, province or region: where the country's address format lists its regions, the code of one of them, exactly; elsewhere its name. At most 200 characters. Required where the format requires it.
sublocalityThe district or neighbourhood within the city, where the country writes one — a Brazilian «bairro». At most 200 characters. Required where the country's address format requires it.
cityThe city or town. At most 200 characters. Required where the country's address format requires it; absent where the address has none.
postal_codeThe postal code, as the country writes it — its format's pattern is a hint for a form, never checked. At most 20 characters. Required where the country's address format requires it; absent where the address has none.
street_numberThe house number, where the country writes it apart from the street — address_line1 is then the street's name alone. At most 20 characters. Required where the country's address format requires it (BR).
address_line2Anything the street line does not hold — a flat, a floor, a building. At most 200 characters.
phoneA number the courier can reach the recipient on: digits, with + ( ) - . and spaces between them, at most 32 characters.
labelThe customer's own name for the address — «Home», «Office». At most 100 characters, on one line.
is_default_shippingWhether this is the address the customer's orders go to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. The first address of an empty book becomes the default on its own.
is_default_billingWhether this is the address the customer's orders are billed to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. Never set unless asked for.
Create customer address › 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).
recipient_nameThe person the address is for, as a parcel is labelled. At most 200 characters.
organizationThe company at the address, when there is one. At most 200 characters.
country_codeThe country, as its ISO 3166-1 alpha-2 code. Accepted in any case and kept uppercase. Required. Its address format (address_formats/{country_code}) says which of the other parts the address must have.
regionThe state, province or region: where the country's address format lists its regions, the code of one of them, exactly; elsewhere its name. At most 200 characters. Required where the format requires it.
sublocalityThe district or neighbourhood within the city, where the country writes one — a Brazilian «bairro». At most 200 characters. Required where the country's address format requires it.
cityThe city or town. At most 200 characters. Required where the country's address format requires it; absent where the address has none.
postal_codeThe postal code, as the country writes it — its format's pattern is a hint for a form, never checked. At most 20 characters. Required where the country's address format requires it; absent where the address has none.
address_line1The street and house number — the street alone when street_number holds the number. At most 200 characters. Required.
street_numberThe house number, where the country writes it apart from the street — address_line1 is then the street's name alone. At most 20 characters. Required where the country's address format requires it (BR).
address_line2Anything the street line does not hold — a flat, a floor, a building. At most 200 characters.
phoneA number the courier can reach the recipient on: digits, with + ( ) - . and spaces between them, at most 32 characters.
labelThe customer's own name for the address — «Home», «Office». At most 100 characters, on one line.
is_default_shippingWhether this is the address the customer's orders go to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. The first address of an empty book becomes the default on its own.
is_default_billingWhether this is the address the customer's orders are billed to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. Never set unless asked for.
Get customer address
An address in a customer's address book: where an order may go and where it may be billed, with the customer's label for it and whether it is the default for either. A book holds at most 100 addresses and each address once — two that differ only in the case of Latin letters, in spacing, in the phone or in the label are one. Listed with the shipping default first, then the billing default, then the rest by update_time, newest first.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
address_idId of the parent address.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get customer address › 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).
recipient_nameThe person the address is for, as a parcel is labelled. At most 200 characters.
organizationThe company at the address, when there is one. At most 200 characters.
country_codeThe country, as its ISO 3166-1 alpha-2 code. Accepted in any case and kept uppercase. Required. Its address format (address_formats/{country_code}) says which of the other parts the address must have.
regionThe state, province or region: where the country's address format lists its regions, the code of one of them, exactly; elsewhere its name. At most 200 characters. Required where the format requires it.
sublocalityThe district or neighbourhood within the city, where the country writes one — a Brazilian «bairro». At most 200 characters. Required where the country's address format requires it.
cityThe city or town. At most 200 characters. Required where the country's address format requires it; absent where the address has none.
postal_codeThe postal code, as the country writes it — its format's pattern is a hint for a form, never checked. At most 20 characters. Required where the country's address format requires it; absent where the address has none.
address_line1The street and house number — the street alone when street_number holds the number. At most 200 characters. Required.
street_numberThe house number, where the country writes it apart from the street — address_line1 is then the street's name alone. At most 20 characters. Required where the country's address format requires it (BR).
address_line2Anything the street line does not hold — a flat, a floor, a building. At most 200 characters.
phoneA number the courier can reach the recipient on: digits, with + ( ) - . and spaces between them, at most 32 characters.
labelThe customer's own name for the address — «Home», «Office». At most 100 characters, on one line.
is_default_shippingWhether this is the address the customer's orders go to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. The first address of an empty book becomes the default on its own.
is_default_billingWhether this is the address the customer's orders are billed to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. Never set unless asked for.
Delete customer address
Deletes an address. A default it was is left unset: no other address takes its place.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
address_idId of the parent address.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete customer address › Responses
Deleted. No body (§7).
Update customer address
Changes an address. The address it makes is held to its country's format as on Create — a new country_code to the new country's. is_default_shipping or is_default_billing set to true moves that default here from the address that had it; false on the current default leaves the book without one. A change that makes it the same as another address of the book answers ALREADY_EXISTS naming that one.
path Parameters
website_idId of the parent website.
customer_idId of the parent customer.
address_idId of the parent address.
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 address › Request Body
recipient_nameThe person the address is for, as a parcel is labelled. At most 200 characters.
organizationThe company at the address, when there is one. At most 200 characters.
country_codeThe country, as its ISO 3166-1 alpha-2 code. Accepted in any case and kept uppercase. Required. Its address format (address_formats/{country_code}) says which of the other parts the address must have.
regionThe state, province or region: where the country's address format lists its regions, the code of one of them, exactly; elsewhere its name. At most 200 characters. Required where the format requires it.
sublocalityThe district or neighbourhood within the city, where the country writes one — a Brazilian «bairro». At most 200 characters. Required where the country's address format requires it.
cityThe city or town. At most 200 characters. Required where the country's address format requires it; absent where the address has none.
postal_codeThe postal code, as the country writes it — its format's pattern is a hint for a form, never checked. At most 20 characters. Required where the country's address format requires it; absent where the address has none.
address_line1The street and house number — the street alone when street_number holds the number. At most 200 characters. Required.
street_numberThe house number, where the country writes it apart from the street — address_line1 is then the street's name alone. At most 20 characters. Required where the country's address format requires it (BR).
address_line2Anything the street line does not hold — a flat, a floor, a building. At most 200 characters.
phoneA number the courier can reach the recipient on: digits, with + ( ) - . and spaces between them, at most 32 characters.
labelThe customer's own name for the address — «Home», «Office». At most 100 characters, on one line.
is_default_shippingWhether this is the address the customer's orders go to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. The first address of an empty book becomes the default on its own.
is_default_billingWhether this is the address the customer's orders are billed to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. Never set unless asked for.
Update customer address › 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).
recipient_nameThe person the address is for, as a parcel is labelled. At most 200 characters.
organizationThe company at the address, when there is one. At most 200 characters.
country_codeThe country, as its ISO 3166-1 alpha-2 code. Accepted in any case and kept uppercase. Required. Its address format (address_formats/{country_code}) says which of the other parts the address must have.
regionThe state, province or region: where the country's address format lists its regions, the code of one of them, exactly; elsewhere its name. At most 200 characters. Required where the format requires it.
sublocalityThe district or neighbourhood within the city, where the country writes one — a Brazilian «bairro». At most 200 characters. Required where the country's address format requires it.
cityThe city or town. At most 200 characters. Required where the country's address format requires it; absent where the address has none.
postal_codeThe postal code, as the country writes it — its format's pattern is a hint for a form, never checked. At most 20 characters. Required where the country's address format requires it; absent where the address has none.
address_line1The street and house number — the street alone when street_number holds the number. At most 200 characters. Required.
street_numberThe house number, where the country writes it apart from the street — address_line1 is then the street's name alone. At most 20 characters. Required where the country's address format requires it (BR).
address_line2Anything the street line does not hold — a flat, a floor, a building. At most 200 characters.
phoneA number the courier can reach the recipient on: digits, with + ( ) - . and spaces between them, at most 32 characters.
labelThe customer's own name for the address — «Home», «Office». At most 100 characters, on one line.
is_default_shippingWhether this is the address the customer's orders go to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. The first address of an empty book becomes the default on its own.
is_default_billingWhether this is the address the customer's orders are billed to unless they choose another. true makes it the default and takes the mark off the address that had it; false on the default leaves the book without one. Never set unless asked for.