Catalog markets
The commercial units of a website: each with the currency it sells in and the countries it sells to.
List catalog markets
Lists the website's markets by name. filter takes is_active; order_by takes display_name.
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: display_name asc. Sortable: display_name.
filterAIP-160 subset (§8). Filterable: is_active. A field outside the list is INVALID_ARGUMENT.
List catalog markets › Responses
One page of catalog_markets.
This page of catalog_markets, 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 market
Adds a market. display_name is required and unique on the website: a taken one answers ALREADY_EXISTS, and a website that already has 20 markets answers FAILED_PRECONDITION LIMIT. currency_code is the base currency or an active one of catalog_currencies, absent for the base; country_codes are two-letter codes, each once, at most 250, empty for any country. 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 market › Request Body
display_nameThe market's name, unique on the website — «Europe», «North America». 1 to 100 characters, kept without the spaces around them. It labels the market for visitors and is not translated.
currency_codeThe currency the market sells in: the website's base currency (general.catalog.base_currency) or an active one of its catalog_currencies, in either case and kept uppercase. Absent — the base currency, whichever it is. null or an empty string under update_mask clears it.
country_codesThe countries the market sells to: ISO 3166-1 alpha-2 codes, in either case and kept uppercase, each once, at most 250, in the order sent. The first is the market's main country. Empty — the default — means any country.
is_activeWhether the market is in use. Switched off, it keeps its currency and countries. true when omitted. Not switched off, nor deleted, while general.catalog.market names it — FAILED_PRECONDITION MARKET_IN_USE.
prices_include_taxWhether the prices of the products hold the tax. true: a sale takes the tax out of the price, and the total is the sum of the prices. false, the default: a sale adds the tax on top. The catalog shows a price as it is in either case.
Create catalog market › 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).
display_nameThe market's name, unique on the website — «Europe», «North America». 1 to 100 characters, kept without the spaces around them. It labels the market for visitors and is not translated.
currency_codeThe currency the market sells in: the website's base currency (general.catalog.base_currency) or an active one of its catalog_currencies, in either case and kept uppercase. Absent — the base currency, whichever it is. null or an empty string under update_mask clears it.
country_codesThe countries the market sells to: ISO 3166-1 alpha-2 codes, in either case and kept uppercase, each once, at most 250, in the order sent. The first is the market's main country. Empty — the default — means any country.
is_activeWhether the market is in use. Switched off, it keeps its currency and countries. true when omitted. Not switched off, nor deleted, while general.catalog.market names it — FAILED_PRECONDITION MARKET_IN_USE.
prices_include_taxWhether the prices of the products hold the tax. true: a sale takes the tax out of the price, and the total is the sum of the prices. false, the default: a sale adds the tax on top. The catalog shows a price as it is in either case.
Get catalog market
Reads one market of the website: the currency it sells in and the countries it sells to.
path Parameters
website_idId of the parent website.
market_idId of the parent market.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog market › 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).
display_nameThe market's name, unique on the website — «Europe», «North America». 1 to 100 characters, kept without the spaces around them. It labels the market for visitors and is not translated.
currency_codeThe currency the market sells in: the website's base currency (general.catalog.base_currency) or an active one of its catalog_currencies, in either case and kept uppercase. Absent — the base currency, whichever it is. null or an empty string under update_mask clears it.
country_codesThe countries the market sells to: ISO 3166-1 alpha-2 codes, in either case and kept uppercase, each once, at most 250, in the order sent. The first is the market's main country. Empty — the default — means any country.
is_activeWhether the market is in use. Switched off, it keeps its currency and countries. true when omitted. Not switched off, nor deleted, while general.catalog.market names it — FAILED_PRECONDITION MARKET_IN_USE.
prices_include_taxWhether the prices of the products hold the tax. true: a sale takes the tax out of the price, and the total is the sum of the prices. false, the default: a sale adds the tax on top. The catalog shows a price as it is in either case.
Delete catalog market
Deletes a market. One general.catalog.market names, the website's or a view's own, is refused with FAILED_PRECONDITION MARKET_IN_USE, naming those settings: point them elsewhere first. Switch is_active off instead to keep it.
path Parameters
website_idId of the parent website.
market_idId of the parent market.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog market › Responses
Deleted. No body (§7).
Update catalog market
Changes a market; each field sent is checked as on create. currency_code set to null or an empty string under update_mask goes back to the base currency, and country_codes set to null or [] to any country. Switching off a market general.catalog.market names answers FAILED_PRECONDITION MARKET_IN_USE, naming those settings.
path Parameters
website_idId of the parent website.
market_idId of the parent market.
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 market › Request Body
display_nameThe market's name, unique on the website — «Europe», «North America». 1 to 100 characters, kept without the spaces around them. It labels the market for visitors and is not translated.
currency_codeThe currency the market sells in: the website's base currency (general.catalog.base_currency) or an active one of its catalog_currencies, in either case and kept uppercase. Absent — the base currency, whichever it is. null or an empty string under update_mask clears it.
country_codesThe countries the market sells to: ISO 3166-1 alpha-2 codes, in either case and kept uppercase, each once, at most 250, in the order sent. The first is the market's main country. Empty — the default — means any country.
is_activeWhether the market is in use. Switched off, it keeps its currency and countries. true when omitted. Not switched off, nor deleted, while general.catalog.market names it — FAILED_PRECONDITION MARKET_IN_USE.
prices_include_taxWhether the prices of the products hold the tax. true: a sale takes the tax out of the price, and the total is the sum of the prices. false, the default: a sale adds the tax on top. The catalog shows a price as it is in either case.
Update catalog market › 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).
display_nameThe market's name, unique on the website — «Europe», «North America». 1 to 100 characters, kept without the spaces around them. It labels the market for visitors and is not translated.
currency_codeThe currency the market sells in: the website's base currency (general.catalog.base_currency) or an active one of its catalog_currencies, in either case and kept uppercase. Absent — the base currency, whichever it is. null or an empty string under update_mask clears it.
country_codesThe countries the market sells to: ISO 3166-1 alpha-2 codes, in either case and kept uppercase, each once, at most 250, in the order sent. The first is the market's main country. Empty — the default — means any country.
is_activeWhether the market is in use. Switched off, it keeps its currency and countries. true when omitted. Not switched off, nor deleted, while general.catalog.market names it — FAILED_PRECONDITION MARKET_IN_USE.
prices_include_taxWhether the prices of the products hold the tax. true: a sale takes the tax out of the price, and the total is the sum of the prices. false, the default: a sale adds the tax on top. The catalog shows a price as it is in either case.