Shipping tables
The ways to ship the shop writes down itself, each priced by its rates — by where the cart goes, its subtotal, weight and quantity and its products' shipping classes. A table is offered in its one currency, on its views and to its customer groups, while it is active.
List shipping tables
Lists the website's shipping tables, the smallest position first, then by display_name. Each carries rate_count, how many rates it has. filter takes is_active and currency_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: position asc, display_name asc. Sortable: display_name, position.
filterAIP-160 subset (§8). Filterable: currency_code, is_active. A field outside the list is INVALID_ARGUMENT.
List shipping tables › Responses
One page of shipping_tables.
This page of shipping_tables, 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 shipping table
Creates a shipping table: display_name and currency_code required, the rest as the fields say — active, at position 0, SUM and ACTUAL unless the body says otherwise. INVALID_ARGUMENT answers every refusal at once, each on its field: a name blank or longer than 100 characters; a label in a language no view of the website is in (display_name_labels.<locale>); a currency_code that is not the website's base currency or one of its catalog_currencies; a min_amount or max_amount below zero or in another currency than the table's, or a min_amount above max_amount; a weight_basis other than ACTUAL without a dimensional_divisor; an id of view_ids or customer_group_ids that is not the website's (view_ids[1]). The website's 51st table answers FAILED_PRECONDITION LIMIT. A new table has no rates and offers nothing until it has.
path Parameters
website_idId of the parent website.
Create shipping table › Request Body
display_nameThe way to ship as the customer reads it at the checkout — «Standard», «Express». 1 to 100 characters after the trim, stored trimmed.
currency_codeThe one currency the table's amounts are in — its min_amount, max_amount and the amounts of its rates — and the only one it is offered in: a cart in another currency is not offered the table. The website's base currency (general.catalog.base_currency) or one of its catalog_currencies. Changing it while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS.
display_name_labelsThe name in other languages: an object from a locale — the language of one of the website's views — to the name in it, at most 100 characters. A customer shopping on a view whose language has none reads display_name. null under update_mask clears them.
descriptionPlain text the customer reads under the name — «Delivered in 3–5 business days». At most 500 characters after the trim. Absent while none; null under update_mask, or a blank text, clears it.
description_labelsThe description in other languages, as display_name_labels: locale → text, at most 500 characters each. null under update_mask clears them.
is_activeWhether the table is offered at all. Switched off, it keeps its rates and is offered nowhere. true when omitted.
positionWhere the table's offer stands among the others: the smaller first. 0 when omitted; negative numbers are fine.
view_idsThe ids of the website's views the table is offered on, each once, at most 100. Empty — the default — means every view.
customer_group_idsThe ids of the website's customer groups the table is for, each once, at most 100. Empty — the default — means every visitor, guests included.
min_amountThe least the table charges, as a google.type.Money in its currency_code — whose currency_code may be left out on a write: a lower price of its rates is raised to it. Never below zero, never above max_amount. Absent — no floor; null under update_mask clears it.
max_amountThe most the table charges, as min_amount: a higher price of its rates is lowered to it. Absent — no ceiling; null under update_mask clears it.
class_combinationHow the table prices a cart whose products are of several shipping classes: each class with rates of its own is priced apart, the rest together, and the table's price is their SUM, the HIGHEST or the LOWEST of them. SUM when omitted.
weight_basisWhat a unit of a product weighs for the rates: its ACTUAL weight, its VOLUMETRIC one — length × width × height ÷ dimensional_divisor — or the GREATER or the LESSER of the two. ACTUAL when omitted.
dimensional_divisorWhat a unit's length × width × height is divided by for its volumetric weight, in the website's units (general.catalog.dimension_unit, general.catalog.weight_unit) — 5000 for centimetres and kilograms, 139 for inches and pounds. A decimal above 0 with at most three digits after the point, written as a string. Required while weight_basis is not ACTUAL; null under update_mask clears it.
Create shipping table › 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 way to ship as the customer reads it at the checkout — «Standard», «Express». 1 to 100 characters after the trim, stored trimmed.
display_name_labelsThe name in other languages: an object from a locale — the language of one of the website's views — to the name in it, at most 100 characters. A customer shopping on a view whose language has none reads display_name. null under update_mask clears them.
descriptionPlain text the customer reads under the name — «Delivered in 3–5 business days». At most 500 characters after the trim. Absent while none; null under update_mask, or a blank text, clears it.
description_labelsThe description in other languages, as display_name_labels: locale → text, at most 500 characters each. null under update_mask clears them.
currency_codeThe one currency the table's amounts are in — its min_amount, max_amount and the amounts of its rates — and the only one it is offered in: a cart in another currency is not offered the table. The website's base currency (general.catalog.base_currency) or one of its catalog_currencies. Changing it while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS.
is_activeWhether the table is offered at all. Switched off, it keeps its rates and is offered nowhere. true when omitted.
positionWhere the table's offer stands among the others: the smaller first. 0 when omitted; negative numbers are fine.
view_idsThe ids of the website's views the table is offered on, each once, at most 100. Empty — the default — means every view.
customer_group_idsThe ids of the website's customer groups the table is for, each once, at most 100. Empty — the default — means every visitor, guests included.
min_amountThe least the table charges, as a google.type.Money in its currency_code — whose currency_code may be left out on a write: a lower price of its rates is raised to it. Never below zero, never above max_amount. Absent — no floor; null under update_mask clears it.
max_amountThe most the table charges, as min_amount: a higher price of its rates is lowered to it. Absent — no ceiling; null under update_mask clears it.
class_combinationHow the table prices a cart whose products are of several shipping classes: each class with rates of its own is priced apart, the rest together, and the table's price is their SUM, the HIGHEST or the LOWEST of them. SUM when omitted.
weight_basisWhat a unit of a product weighs for the rates: its ACTUAL weight, its VOLUMETRIC one — length × width × height ÷ dimensional_divisor — or the GREATER or the LESSER of the two. ACTUAL when omitted.
dimensional_divisorWhat a unit's length × width × height is divided by for its volumetric weight, in the website's units (general.catalog.dimension_unit, general.catalog.weight_unit) — 5000 for centimetres and kilograms, 139 for inches and pounds. A decimal above 0 with at most three digits after the point, written as a string. Required while weight_basis is not ACTUAL; null under update_mask clears it.
rate_countHow many rates the table has.
Get shipping table
The ways to ship the shop writes down itself — the website's shipping_table_rates module. A table is what the customer chooses at the checkout: its name, the currency it is offered in, the views and the customer groups it is for, and how its price is reckoned — from its rates, by where the cart goes, its subtotal, weight and quantity and its products' shipping classes, held between min_amount and max_amount. At most 50 per website.
path Parameters
website_idId of the parent website.
shipping_table_idId of the parent shipping_table.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get shipping table › 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 way to ship as the customer reads it at the checkout — «Standard», «Express». 1 to 100 characters after the trim, stored trimmed.
display_name_labelsThe name in other languages: an object from a locale — the language of one of the website's views — to the name in it, at most 100 characters. A customer shopping on a view whose language has none reads display_name. null under update_mask clears them.
descriptionPlain text the customer reads under the name — «Delivered in 3–5 business days». At most 500 characters after the trim. Absent while none; null under update_mask, or a blank text, clears it.
description_labelsThe description in other languages, as display_name_labels: locale → text, at most 500 characters each. null under update_mask clears them.
currency_codeThe one currency the table's amounts are in — its min_amount, max_amount and the amounts of its rates — and the only one it is offered in: a cart in another currency is not offered the table. The website's base currency (general.catalog.base_currency) or one of its catalog_currencies. Changing it while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS.
is_activeWhether the table is offered at all. Switched off, it keeps its rates and is offered nowhere. true when omitted.
positionWhere the table's offer stands among the others: the smaller first. 0 when omitted; negative numbers are fine.
view_idsThe ids of the website's views the table is offered on, each once, at most 100. Empty — the default — means every view.
customer_group_idsThe ids of the website's customer groups the table is for, each once, at most 100. Empty — the default — means every visitor, guests included.
min_amountThe least the table charges, as a google.type.Money in its currency_code — whose currency_code may be left out on a write: a lower price of its rates is raised to it. Never below zero, never above max_amount. Absent — no floor; null under update_mask clears it.
max_amountThe most the table charges, as min_amount: a higher price of its rates is lowered to it. Absent — no ceiling; null under update_mask clears it.
class_combinationHow the table prices a cart whose products are of several shipping classes: each class with rates of its own is priced apart, the rest together, and the table's price is their SUM, the HIGHEST or the LOWEST of them. SUM when omitted.
weight_basisWhat a unit of a product weighs for the rates: its ACTUAL weight, its VOLUMETRIC one — length × width × height ÷ dimensional_divisor — or the GREATER or the LESSER of the two. ACTUAL when omitted.
dimensional_divisorWhat a unit's length × width × height is divided by for its volumetric weight, in the website's units (general.catalog.dimension_unit, general.catalog.weight_unit) — 5000 for centimetres and kilograms, 139 for inches and pounds. A decimal above 0 with at most three digits after the point, written as a string. Required while weight_basis is not ACTUAL; null under update_mask clears it.
rate_countHow many rates the table has.
Delete shipping table
The ways to ship the shop writes down itself — the website's shipping_table_rates module. A table is what the customer chooses at the checkout: its name, the currency it is offered in, the views and the customer groups it is for, and how its price is reckoned — from its rates, by where the cart goes, its subtotal, weight and quantity and its products' shipping classes, held between min_amount and max_amount. At most 50 per website.
path Parameters
website_idId of the parent website.
shipping_table_idId of the parent shipping_table.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete shipping table › Responses
Deleted. No body (§7).
Update shipping table
Updates a shipping table, refused as a Create is — a min_amount or max_amount the table keeps in its old currency when currency_code changes included. A new currency_code while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS with their count: their amounts are in the old one.
path Parameters
website_idId of the parent website.
shipping_table_idId of the parent shipping_table.
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 shipping table › Request Body
display_nameThe way to ship as the customer reads it at the checkout — «Standard», «Express». 1 to 100 characters after the trim, stored trimmed.
display_name_labelsThe name in other languages: an object from a locale — the language of one of the website's views — to the name in it, at most 100 characters. A customer shopping on a view whose language has none reads display_name. null under update_mask clears them.
descriptionPlain text the customer reads under the name — «Delivered in 3–5 business days». At most 500 characters after the trim. Absent while none; null under update_mask, or a blank text, clears it.
description_labelsThe description in other languages, as display_name_labels: locale → text, at most 500 characters each. null under update_mask clears them.
currency_codeThe one currency the table's amounts are in — its min_amount, max_amount and the amounts of its rates — and the only one it is offered in: a cart in another currency is not offered the table. The website's base currency (general.catalog.base_currency) or one of its catalog_currencies. Changing it while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS.
is_activeWhether the table is offered at all. Switched off, it keeps its rates and is offered nowhere. true when omitted.
positionWhere the table's offer stands among the others: the smaller first. 0 when omitted; negative numbers are fine.
view_idsThe ids of the website's views the table is offered on, each once, at most 100. Empty — the default — means every view.
customer_group_idsThe ids of the website's customer groups the table is for, each once, at most 100. Empty — the default — means every visitor, guests included.
min_amountThe least the table charges, as a google.type.Money in its currency_code — whose currency_code may be left out on a write: a lower price of its rates is raised to it. Never below zero, never above max_amount. Absent — no floor; null under update_mask clears it.
max_amountThe most the table charges, as min_amount: a higher price of its rates is lowered to it. Absent — no ceiling; null under update_mask clears it.
class_combinationHow the table prices a cart whose products are of several shipping classes: each class with rates of its own is priced apart, the rest together, and the table's price is their SUM, the HIGHEST or the LOWEST of them. SUM when omitted.
weight_basisWhat a unit of a product weighs for the rates: its ACTUAL weight, its VOLUMETRIC one — length × width × height ÷ dimensional_divisor — or the GREATER or the LESSER of the two. ACTUAL when omitted.
dimensional_divisorWhat a unit's length × width × height is divided by for its volumetric weight, in the website's units (general.catalog.dimension_unit, general.catalog.weight_unit) — 5000 for centimetres and kilograms, 139 for inches and pounds. A decimal above 0 with at most three digits after the point, written as a string. Required while weight_basis is not ACTUAL; null under update_mask clears it.
Update shipping table › 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 way to ship as the customer reads it at the checkout — «Standard», «Express». 1 to 100 characters after the trim, stored trimmed.
display_name_labelsThe name in other languages: an object from a locale — the language of one of the website's views — to the name in it, at most 100 characters. A customer shopping on a view whose language has none reads display_name. null under update_mask clears them.
descriptionPlain text the customer reads under the name — «Delivered in 3–5 business days». At most 500 characters after the trim. Absent while none; null under update_mask, or a blank text, clears it.
description_labelsThe description in other languages, as display_name_labels: locale → text, at most 500 characters each. null under update_mask clears them.
currency_codeThe one currency the table's amounts are in — its min_amount, max_amount and the amounts of its rates — and the only one it is offered in: a cart in another currency is not offered the table. The website's base currency (general.catalog.base_currency) or one of its catalog_currencies. Changing it while the table has rates answers FAILED_PRECONDITION SHIPPING_TABLE_AMOUNTS.
is_activeWhether the table is offered at all. Switched off, it keeps its rates and is offered nowhere. true when omitted.
positionWhere the table's offer stands among the others: the smaller first. 0 when omitted; negative numbers are fine.
view_idsThe ids of the website's views the table is offered on, each once, at most 100. Empty — the default — means every view.
customer_group_idsThe ids of the website's customer groups the table is for, each once, at most 100. Empty — the default — means every visitor, guests included.
min_amountThe least the table charges, as a google.type.Money in its currency_code — whose currency_code may be left out on a write: a lower price of its rates is raised to it. Never below zero, never above max_amount. Absent — no floor; null under update_mask clears it.
max_amountThe most the table charges, as min_amount: a higher price of its rates is lowered to it. Absent — no ceiling; null under update_mask clears it.
class_combinationHow the table prices a cart whose products are of several shipping classes: each class with rates of its own is priced apart, the rest together, and the table's price is their SUM, the HIGHEST or the LOWEST of them. SUM when omitted.
weight_basisWhat a unit of a product weighs for the rates: its ACTUAL weight, its VOLUMETRIC one — length × width × height ÷ dimensional_divisor — or the GREATER or the LESSER of the two. ACTUAL when omitted.
dimensional_divisorWhat a unit's length × width × height is divided by for its volumetric weight, in the website's units (general.catalog.dimension_unit, general.catalog.weight_unit) — 5000 for centimetres and kilograms, 139 for inches and pounds. A decimal above 0 with at most three digits after the point, written as a string. Required while weight_basis is not ACTUAL; null under update_mask clears it.
rate_countHow many rates the table has.