Catalog currencies
The currencies a website sells in besides its base one: each with its rate to the base, whether a product without a price of its own in it is converted or has none there, and how a converted price is rounded. Products and variants are priced in it apart by entries of their prices.
List catalog currencies
A currency the website sells in besides its base one (general.catalog.base_currency): its rate to the base, whether a product without a price of its own in it is converted or has none there, and how a converted price is rounded. A view shows its prices in the currency of its market (catalog_markets): the base or an active one of these. Products and variants are priced in it apart by entries of their prices; a currency some of them are is not deleted — FAILED_PRECONDITION CURRENCY_IN_USE. At most 20 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: code asc. Sortable: code.
filterAIP-160 subset (§8). Filterable: code, is_active, pricing. A field outside the list is INVALID_ARGUMENT.
List catalog currencies › Responses
One page of catalog_currencies.
This page of catalog_currencies, 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 currency
Adds a currency the website sells in besides its base one. code — its ISO 4217 code, which names it — and rate are required: the base currency's code is INVALID_ARGUMENT on code, a code the website has already answers ALREADY_EXISTS, and a website that already has 20 currencies answers FAILED_PRECONDITION. A rounding_ending has exactly fraction_digits digits.
path Parameters
website_idId of the parent website.
Create catalog currency › Request Body
rateHow many units of this currency one unit of the base currency is worth, as a decimal string: greater than zero, at most nine digits before the point and nine after it. Kept exactly — never as a float — and answered in its shortest form (0.920 is 0.92).
codeThe currency's ISO 4217 code — three uppercase letters — and its id: the resource is websites/{website}/catalog_currencies/{code}. Not the website's base currency (general.catalog.base_currency), which has no record here. Required on create and fixed afterwards.
pricingWhat a view in this currency shows for a product without a price of its own in it: CONVERTED — the base price times rate, rounded by fraction_digits and rounding_ending — or FIXED_ONLY — no price. CONVERTED when omitted.
fraction_digitsThe digits of the currency's minor unit, 0 to 3 — 2 for cents, 0 for whole yen: what a converted price is rounded to. 2 when omitted.
rounding_endingThe minor digits a converted price is rounded up to, exactly fraction_digits of them: 99 turns 12.34 into 12.99 and 13.00 into 13.99, and leaves a price of zero at zero. Omitted — or null, or empty — rounds to the nearest minor unit instead. Checked against fraction_digits as the currency would be stored.
is_activeWhether the website sells in the currency: an inactive one is no market's to sell in and keeps its rate and rules. true when omitted. Not switched off, nor deleted, while a market sells in it (its currency_code) — FAILED_PRECONDITION CURRENCY_IN_USE.
Create catalog currency › 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).
codeThe currency's ISO 4217 code — three uppercase letters — and its id: the resource is websites/{website}/catalog_currencies/{code}. Not the website's base currency (general.catalog.base_currency), which has no record here. Required on create and fixed afterwards.
rateHow many units of this currency one unit of the base currency is worth, as a decimal string: greater than zero, at most nine digits before the point and nine after it. Kept exactly — never as a float — and answered in its shortest form (0.920 is 0.92).
pricingWhat a view in this currency shows for a product without a price of its own in it: CONVERTED — the base price times rate, rounded by fraction_digits and rounding_ending — or FIXED_ONLY — no price. CONVERTED when omitted.
fraction_digitsThe digits of the currency's minor unit, 0 to 3 — 2 for cents, 0 for whole yen: what a converted price is rounded to. 2 when omitted.
rounding_endingThe minor digits a converted price is rounded up to, exactly fraction_digits of them: 99 turns 12.34 into 12.99 and 13.00 into 13.99, and leaves a price of zero at zero. Omitted — or null, or empty — rounds to the nearest minor unit instead. Checked against fraction_digits as the currency would be stored.
is_activeWhether the website sells in the currency: an inactive one is no market's to sell in and keeps its rate and rules. true when omitted. Not switched off, nor deleted, while a market sells in it (its currency_code) — FAILED_PRECONDITION CURRENCY_IN_USE.
Get catalog currency
A currency the website sells in besides its base one (general.catalog.base_currency): its rate to the base, whether a product without a price of its own in it is converted or has none there, and how a converted price is rounded. A view shows its prices in the currency of its market (catalog_markets): the base or an active one of these. Products and variants are priced in it apart by entries of their prices; a currency some of them are is not deleted — FAILED_PRECONDITION CURRENCY_IN_USE. At most 20 per website.
path Parameters
website_idId of the parent website.
currency_codeHeaders
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog currency › 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).
codeThe currency's ISO 4217 code — three uppercase letters — and its id: the resource is websites/{website}/catalog_currencies/{code}. Not the website's base currency (general.catalog.base_currency), which has no record here. Required on create and fixed afterwards.
rateHow many units of this currency one unit of the base currency is worth, as a decimal string: greater than zero, at most nine digits before the point and nine after it. Kept exactly — never as a float — and answered in its shortest form (0.920 is 0.92).
pricingWhat a view in this currency shows for a product without a price of its own in it: CONVERTED — the base price times rate, rounded by fraction_digits and rounding_ending — or FIXED_ONLY — no price. CONVERTED when omitted.
fraction_digitsThe digits of the currency's minor unit, 0 to 3 — 2 for cents, 0 for whole yen: what a converted price is rounded to. 2 when omitted.
rounding_endingThe minor digits a converted price is rounded up to, exactly fraction_digits of them: 99 turns 12.34 into 12.99 and 13.00 into 13.99, and leaves a price of zero at zero. Omitted — or null, or empty — rounds to the nearest minor unit instead. Checked against fraction_digits as the currency would be stored.
is_activeWhether the website sells in the currency: an inactive one is no market's to sell in and keeps its rate and rules. true when omitted. Not switched off, nor deleted, while a market sells in it (its currency_code) — FAILED_PRECONDITION CURRENCY_IN_USE.
Delete catalog currency
Deletes a currency. One a market sells in (its currency_code, switched off or not) is refused with FAILED_PRECONDITION, naming those markets: give them another currency first. So is one products or variants have entries of their prices in (CURRENCY_IN_USE on the products): take those entries off first. Switching it off keeps them.
path Parameters
website_idId of the parent website.
currency_codeHeaders
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog currency › Responses
Deleted. No body (§7).
Update catalog currency
Changes a currency: its rate, its pricing, its rounding or whether it is active. code is fixed and refused here. Switching off a currency a market sells in (its currency_code) answers FAILED_PRECONDITION, naming those markets.
path Parameters
website_idId of the parent website.
currency_codequery 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 currency › Request Body
rateHow many units of this currency one unit of the base currency is worth, as a decimal string: greater than zero, at most nine digits before the point and nine after it. Kept exactly — never as a float — and answered in its shortest form (0.920 is 0.92).
pricingWhat a view in this currency shows for a product without a price of its own in it: CONVERTED — the base price times rate, rounded by fraction_digits and rounding_ending — or FIXED_ONLY — no price. CONVERTED when omitted.
fraction_digitsThe digits of the currency's minor unit, 0 to 3 — 2 for cents, 0 for whole yen: what a converted price is rounded to. 2 when omitted.
rounding_endingThe minor digits a converted price is rounded up to, exactly fraction_digits of them: 99 turns 12.34 into 12.99 and 13.00 into 13.99, and leaves a price of zero at zero. Omitted — or null, or empty — rounds to the nearest minor unit instead. Checked against fraction_digits as the currency would be stored.
is_activeWhether the website sells in the currency: an inactive one is no market's to sell in and keeps its rate and rules. true when omitted. Not switched off, nor deleted, while a market sells in it (its currency_code) — FAILED_PRECONDITION CURRENCY_IN_USE.
Update catalog currency › 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).
codeThe currency's ISO 4217 code — three uppercase letters — and its id: the resource is websites/{website}/catalog_currencies/{code}. Not the website's base currency (general.catalog.base_currency), which has no record here. Required on create and fixed afterwards.
rateHow many units of this currency one unit of the base currency is worth, as a decimal string: greater than zero, at most nine digits before the point and nine after it. Kept exactly — never as a float — and answered in its shortest form (0.920 is 0.92).
pricingWhat a view in this currency shows for a product without a price of its own in it: CONVERTED — the base price times rate, rounded by fraction_digits and rounding_ending — or FIXED_ONLY — no price. CONVERTED when omitted.
fraction_digitsThe digits of the currency's minor unit, 0 to 3 — 2 for cents, 0 for whole yen: what a converted price is rounded to. 2 when omitted.
rounding_endingThe minor digits a converted price is rounded up to, exactly fraction_digits of them: 99 turns 12.34 into 12.99 and 13.00 into 13.99, and leaves a price of zero at zero. Omitted — or null, or empty — rounds to the nearest minor unit instead. Checked against fraction_digits as the currency would be stored.
is_activeWhether the website sells in the currency: an inactive one is no market's to sell in and keeps its rate and rules. true when omitted. Not switched off, nor deleted, while a market sells in it (its currency_code) — FAILED_PRECONDITION CURRENCY_IN_USE.