Catalog tax rates
The tax of each country: the name the buyer reads, the standard rate and the rates of the tax classes that differ from it. A country without one is not taxed.
List catalog tax rates
Lists the website's tax rates by country; order_by takes country_code.
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: country_code asc. Sortable: country_code.
filterAIP-160 subset (§8). Filterable: none. A field outside the list is INVALID_ARGUMENT.
List catalog tax rates › Responses
One page of catalog_tax_rates.
This page of catalog_tax_rates, 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 catalog tax rate
Adds the tax of a country. country_code, display_name and rate are required: a country the website has a rate of answers ALREADY_EXISTS, and a website that already has 250 rates answers FAILED_PRECONDITION LIMIT. rate is a percentage from 0 to 100 written as a string, at most four digits after the point — a JSON number is refused. class_rates holds one entry at most per class, each tax_class_id a class of the website, else INVALID_ARGUMENT on the field. What is wrong with the fields answers INVALID_ARGUMENT, all of them at once, before either refusal.
path Parameters
website_idId of the parent website.
Create catalog tax rate › Request Body
display_nameThe name of the tax the buyer reads — «VAT», «MwSt.». 1 to 50 characters, kept without the spaces around them. One for every language.
rateThe standard rate, a percentage as a decimal string: 0 to 100, at most four digits after the point. Kept exactly — never as a float — and answered in its shortest form (20.0 is 20).
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
class_ratesThe rates of the tax classes that differ here: each {tax_class_id, rate}, tax_class_id a class of catalog_tax_classes, rate written as above. At most one entry per class and at most 20; a class without one pays the standard rate. Replaced whole when sent; null under update_mask empties it.
Create catalog tax rate › 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).
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
display_nameThe name of the tax the buyer reads — «VAT», «MwSt.». 1 to 50 characters, kept without the spaces around them. One for every language.
rateThe standard rate, a percentage as a decimal string: 0 to 100, at most four digits after the point. Kept exactly — never as a float — and answered in its shortest form (20.0 is 20).
class_ratesThe rates of the tax classes that differ here: each {tax_class_id, rate}, tax_class_id a class of catalog_tax_classes, rate written as above. At most one entry per class and at most 20; a class without one pays the standard rate. Replaced whole when sent; null under update_mask empties it.
Get catalog tax rate
Reads the tax of one country. The code in the path is exact: de is NOT_FOUND.
path Parameters
website_idId of the parent website.
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog tax rate › 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).
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
display_nameThe name of the tax the buyer reads — «VAT», «MwSt.». 1 to 50 characters, kept without the spaces around them. One for every language.
rateThe standard rate, a percentage as a decimal string: 0 to 100, at most four digits after the point. Kept exactly — never as a float — and answered in its shortest form (20.0 is 20).
class_ratesThe rates of the tax classes that differ here: each {tax_class_id, rate}, tax_class_id a class of catalog_tax_classes, rate written as above. At most one entry per class and at most 20; a class without one pays the standard rate. Replaced whole when sent; null under update_mask empties it.
Delete catalog tax rate
Deletes a country's tax: that country is not taxed any more — a cart from its next change on; an order keeps the tax it was placed with.
path Parameters
website_idId of the parent website.
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog tax rate › Responses
Deleted. No body (§7).
Update catalog tax rate
Changes a country's tax; each field sent is checked as on create, and class_rates is replaced whole. country_code is fixed and refused here. A cart takes the new rate at its next change; an order keeps the tax it was placed with.
path Parameters
website_idId of the parent website.
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
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 catalog tax rate › Request Body
display_nameThe name of the tax the buyer reads — «VAT», «MwSt.». 1 to 50 characters, kept without the spaces around them. One for every language.
rateThe standard rate, a percentage as a decimal string: 0 to 100, at most four digits after the point. Kept exactly — never as a float — and answered in its shortest form (20.0 is 20).
class_ratesThe rates of the tax classes that differ here: each {tax_class_id, rate}, tax_class_id a class of catalog_tax_classes, rate written as above. At most one entry per class and at most 20; a class without one pays the standard rate. Replaced whole when sent; null under update_mask empties it.
Update catalog tax rate › 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).
country_codeThe country's ISO 3166-1 alpha-2 code — two uppercase letters — and the rate's id: the resource is websites/{website}/catalog_tax_rates/{country_code}, and de there is NOT_FOUND. Required on create and fixed afterwards.
display_nameThe name of the tax the buyer reads — «VAT», «MwSt.». 1 to 50 characters, kept without the spaces around them. One for every language.
rateThe standard rate, a percentage as a decimal string: 0 to 100, at most four digits after the point. Kept exactly — never as a float — and answered in its shortest form (20.0 is 20).
class_ratesThe rates of the tax classes that differ here: each {tax_class_id, rate}, tax_class_id a class of catalog_tax_classes, rate written as above. At most one entry per class and at most 20; a class without one pays the standard rate. Replaced whole when sent; null under update_mask empties it.