Catalog products
The products of a website’s catalog, managed in the admin: name, prices and pictures, the categories they are filed in and the values of their attributes, with a per-view overlay of their texts. The catalog is a module of the website: while it is off, every route of it answers MODULE_DISABLED.
List catalog products
Lists the website's products, the newest first by default. filter takes slug, sku, is_active, attribute_set_id, category_ids:"<id>", image_count, variant_count, price_rule_ids:"<id>" — the products a catalog price rule is on — create_time, update_time, and attributes.<key> of every attribute of the website, typed by the attribute (attributes.color = "red", attributes.weight > 2): a catalog price rule's condition sent here lists the products the rule is on.
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: create_time desc. Sortable: create_time, display_name, image_count, update_time, variant_count.
filterAIP-160 subset (§8). Filterable: attribute_set_id, category_ids, create_time, display_name, image_count, is_active, price_rule_ids, shipping_class_id, sku, slug, tax_class_id, update_time, variant_count. A field outside the list is INVALID_ARGUMENT.
List catalog products › Responses
One page of catalog_products.
This page of catalog_products, 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 product
Adds a product with its variants. display_name, attribute_set_id and variants are required, and slug is derived from display_name when omitted; a slug another product has answers ALREADY_EXISTS. Every id must name something of the website — the set, each category, each picture — and attributes is checked against the active attributes of the set, a required one needing a value: what fails answers INVALID_ARGUMENT on the field, attributes.<key> for a value. variant_options names the SELECT attributes of the set its variants differ by, and attributes holds no value under them. variants are the variants themselves — each the body of a variant's create, checked as :batch_create checks them and refused on variants[i]; a product without options sends its one default variant, [{"option_values": {}, "sku": "…"}]. The SKUs are the variants': one another variant of the website has answers ALREADY_EXISTS, and a refused variant leaves no product behind. prices holds one entry per currency — the website's base currency or one of its catalog_currencies, the base currency's among them when there are any — each amount with an optional lower sale_amount, which applies between sale_starts_at and sale_ends_at.
path Parameters
website_idId of the parent website.
Create catalog product › Request Body
display_nameThe product's name. Not blank, at most 255 characters. display_name:"shirt" lists the products whose name holds the text, case aside.
attribute_set_idThe id of the catalog_attribute_sets entry whose attributes the product has. Changing it keeps the values of the attributes the new set lists too and drops the others; the new set's required attributes must then have a value, and it must list every one of the product's variant_options.
slugThe product's URL segment: lowercase letters and digits joined by single dashes, at most 120 characters, unique on the website. Derived from display_name when omitted on create; a name with no letter or digit to derive it from needs one sent. category is reserved — the storefront's category pages live under it — sent or derived alike.
descriptionThe product's description, as HTML. At most 100000 characters.
short_descriptionA line or two about the product, for lists and cards. Plain text, at most 2000 characters.
is_activeWhether the product is on sale. true when omitted.
tax_class_idThe id of the catalog_tax_classes entry the product is taxed by, its variants with it. Absent — the standard rate of every country. null under update_mask clears it. tax_class_id = "<id>" lists the products of one class.
shipping_class_idThe id of the catalog_shipping_classes entry a shipping rate tells the product apart by, its variants with it. Absent — none: the rates without a class of their own apply. null under update_mask clears it. shipping_class_id = "<id>" lists the products of one class.
category_idsThe ids of the catalog_categories the product is in, each once, at most 50. A deleted category leaves the list on its own. category_ids:"<id>" filters the products of one category.
image_media_idsThe ids of the media items that picture the product, in their order — the first is the main one. Each once, at most 20, every one of the website's media library. Deleting a media item takes it off every product it pictures, with the product's alt of it.
image_altsThe product's own alt text of its pictures, over the alt_text the media library holds for the file: each {media_id, alt}, alt at most 500 characters, one entry per picture. An entry for an id that is not in image_media_ids is dropped, so is a blank alt, and taking a picture off the product takes its alt with it. Replaced whole when sent; null under update_mask clears it. A view's version may claim it in its own language.
pricesWhat the product costs, one entry per currency: {currency_code, amount, sale_amount} — amount the regular price and sale_amount, optional and below it, the special one, each a google.type.Money in the entry's currency (whose currency_code may be left out on a write), never a float, never below zero. An entry is in the website's base currency (general.catalog.base_currency) or one of its catalog_currencies, and a list that is not empty has the base currency's entry. Empty — a product on request. The prices of every variant without its own in that currency. Replaced whole when sent; null under update_mask empties it.
sale_starts_atWhen the sale_amount of the product's and its variants' prices starts to apply. Absent — from now on; with sale_ends_at absent too, a special price applies always. null under update_mask clears it.
sale_ends_atWhen the sale_amount of the product's and its variants' prices stops applying: after sale_starts_at. Absent — for good. null under update_mask clears it.
attributesThe values of the product's attributes: an object from an attribute's key to its value — a string for TEXT, TEXTAREA, DATE (YYYY-MM-DD) and SELECT, a number for NUMBER, true or false, an array of option values for MULTISELECT. Only the active attributes of the product's set may be written, each checked by its type, and a required one must have a value — except a key of variant_options, which holds none here: its value is each variant's own. Replaced whole when sent — a key left out has no value. Omitted when empty. A list filters by each attribute of the website as attributes.<key>, typed by the attribute — attributes.color = "red", attributes.sizes:"m", attributes.weight > 2, attributes.organic = true — a catalog price rule's condition in the same words; a key that is no attribute of the website is INVALID_ARGUMENT.
variant_optionsThe options the product's variants differ by: the keys of SELECT attributes of its attribute set, switched on, each once, at most 3, in the order the storefront shows them. Empty — the default — is a product without options, sold as its one default variant. A variant holds one value of each, in its option_values, so attributes holds no value under them. Replaced whole when sent; null under update_mask empties it. Fixed while a variant of the product holds option values: a change — or a new attribute_set_id that does not list one of them — answers FAILED_PRECONDITION until those variants are deleted.
variantsCreate only, and required there: the product's variants, made with it in the same call — each the body of a variant's own create (option_values, sku, prices, image_media_ids, is_active, weight, length, width, height), at least one, at most 10000. Without variant_options exactly one, its default variant, with option_values {}. With them, each holds a value of every one — or the default variant comes alone, the variants made later by :batch_create with replace_default_variant. A variant refused leaves no product behind: its error names variants[i]. Never returned; an update that carries it is INVALID_ARGUMENT — a product's variants are written under its variants.
visible_view_idsThe ids of the website's views this is shown on, each once, at most 100. Empty — the default — means every view, not none. An id that is not a view of this website is refused; a view deleted later leaves the list on its own. Replaced whole when sent; null under update_mask empties it. What a view says instead of the master's text is its version under views.
Create catalog product › 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 product's name. Not blank, at most 255 characters. display_name:"shirt" lists the products whose name holds the text, case aside.
slugThe product's URL segment: lowercase letters and digits joined by single dashes, at most 120 characters, unique on the website. Derived from display_name when omitted on create; a name with no letter or digit to derive it from needs one sent. category is reserved — the storefront's category pages live under it — sent or derived alike.
skuThe SKU of the product's only variant, kept by the server: present while variant_count is 1, absent on a product of more — each of its variants has its own. Every SKU is a variant's, unique among the website's variants, and is written under the product's variants. sku = "…" lists the product any variant of which has that SKU, sku:"…" the ones with a variant whose SKU holds the text, case aside.
descriptionThe product's description, as HTML. At most 100000 characters.
short_descriptionA line or two about the product, for lists and cards. Plain text, at most 2000 characters.
is_activeWhether the product is on sale. true when omitted.
attribute_set_idThe id of the catalog_attribute_sets entry whose attributes the product has. Changing it keeps the values of the attributes the new set lists too and drops the others; the new set's required attributes must then have a value, and it must list every one of the product's variant_options.
tax_class_idThe id of the catalog_tax_classes entry the product is taxed by, its variants with it. Absent — the standard rate of every country. null under update_mask clears it. tax_class_id = "<id>" lists the products of one class.
shipping_class_idThe id of the catalog_shipping_classes entry a shipping rate tells the product apart by, its variants with it. Absent — none: the rates without a class of their own apply. null under update_mask clears it. shipping_class_id = "<id>" lists the products of one class.
category_idsThe ids of the catalog_categories the product is in, each once, at most 50. A deleted category leaves the list on its own. category_ids:"<id>" filters the products of one category.
image_media_idsThe ids of the media items that picture the product, in their order — the first is the main one. Each once, at most 20, every one of the website's media library. Deleting a media item takes it off every product it pictures, with the product's alt of it.
image_altsThe product's own alt text of its pictures, over the alt_text the media library holds for the file: each {media_id, alt}, alt at most 500 characters, one entry per picture. An entry for an id that is not in image_media_ids is dropped, so is a blank alt, and taking a picture off the product takes its alt with it. Replaced whole when sent; null under update_mask clears it. A view's version may claim it in its own language.
image_countHow many pictures the product has: the size of image_media_ids, kept by the server. image_count = 0 lists the products without a picture.
pricesWhat the product costs, one entry per currency: {currency_code, amount, sale_amount} — amount the regular price and sale_amount, optional and below it, the special one, each a google.type.Money in the entry's currency (whose currency_code may be left out on a write), never a float, never below zero. An entry is in the website's base currency (general.catalog.base_currency) or one of its catalog_currencies, and a list that is not empty has the base currency's entry. Empty — a product on request. The prices of every variant without its own in that currency. Replaced whole when sent; null under update_mask empties it.
sale_starts_atWhen the sale_amount of the product's and its variants' prices starts to apply. Absent — from now on; with sale_ends_at absent too, a special price applies always. null under update_mask clears it.
sale_ends_atWhen the sale_amount of the product's and its variants' prices stops applying: after sale_starts_at. Absent — for good. null under update_mask clears it.
variant_countHow many variants the product has, on sale or not — at least one: a product without options has its default variant, made with it. Kept by the server.
price_minThe lowest regular price an active variant of the product is sold at in the base currency — the amount of its own entry or else the product's — as a google.type.Money. Absent when no active variant has a base price. Kept by the server.
price_maxThe highest regular price an active variant of the product is sold at in the base currency, as price_min; the two are equal while every variant sells at the product's. Kept by the server.
attributesThe values of the product's attributes: an object from an attribute's key to its value — a string for TEXT, TEXTAREA, DATE (YYYY-MM-DD) and SELECT, a number for NUMBER, true or false, an array of option values for MULTISELECT. Only the active attributes of the product's set may be written, each checked by its type, and a required one must have a value — except a key of variant_options, which holds none here: its value is each variant's own. Replaced whole when sent — a key left out has no value. Omitted when empty. A list filters by each attribute of the website as attributes.<key>, typed by the attribute — attributes.color = "red", attributes.sizes:"m", attributes.weight > 2, attributes.organic = true — a catalog price rule's condition in the same words; a key that is no attribute of the website is INVALID_ARGUMENT.
variant_optionsThe options the product's variants differ by: the keys of SELECT attributes of its attribute set, switched on, each once, at most 3, in the order the storefront shows them. Empty — the default — is a product without options, sold as its one default variant. A variant holds one value of each, in its option_values, so attributes holds no value under them. Replaced whole when sent; null under update_mask empties it. Fixed while a variant of the product holds option values: a change — or a new attribute_set_id that does not list one of them — answers FAILED_PRECONDITION until those variants are deleted.
price_rule_idsThe ids of the website's catalog_price_rules whose condition the product matches, each once, kept by the server: matched again when the product is saved and, within seconds, when a rule changes or a category or an attribute it reads is deleted. Whether a rule takes anything off a price — its switch, its period, its groups and views — is decided at the price. price_rule_ids:"<id>" lists the products a rule is on.
visible_view_idsThe ids of the website's views this is shown on, each once, at most 100. Empty — the default — means every view, not none. An id that is not a view of this website is refused; a view deleted later leaves the list on its own. Replaced whole when sent; null under update_mask empties it. What a view says instead of the master's text is its version under views.
Get catalog product
A product the website sells: its name, prices and pictures, the categories it is in and the values of its attributes. attribute_set_id names the catalog_attribute_sets entry that decides which catalog_attributes the product has, and attributes holds their values under each attribute's key, checked against the set on every write. slug is unique on the website. Every product has at least one variant — one without options its default variant — made with it from the variants its create sends and deleted with it; the SKUs are the variants', the product shows the one of its only variant in sku, and variant_count, price_min and price_max say what they come to. variant_options names the attributes its variants differ by.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog product › 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 product's name. Not blank, at most 255 characters. display_name:"shirt" lists the products whose name holds the text, case aside.
slugThe product's URL segment: lowercase letters and digits joined by single dashes, at most 120 characters, unique on the website. Derived from display_name when omitted on create; a name with no letter or digit to derive it from needs one sent. category is reserved — the storefront's category pages live under it — sent or derived alike.
skuThe SKU of the product's only variant, kept by the server: present while variant_count is 1, absent on a product of more — each of its variants has its own. Every SKU is a variant's, unique among the website's variants, and is written under the product's variants. sku = "…" lists the product any variant of which has that SKU, sku:"…" the ones with a variant whose SKU holds the text, case aside.
descriptionThe product's description, as HTML. At most 100000 characters.
short_descriptionA line or two about the product, for lists and cards. Plain text, at most 2000 characters.
is_activeWhether the product is on sale. true when omitted.
attribute_set_idThe id of the catalog_attribute_sets entry whose attributes the product has. Changing it keeps the values of the attributes the new set lists too and drops the others; the new set's required attributes must then have a value, and it must list every one of the product's variant_options.
tax_class_idThe id of the catalog_tax_classes entry the product is taxed by, its variants with it. Absent — the standard rate of every country. null under update_mask clears it. tax_class_id = "<id>" lists the products of one class.
shipping_class_idThe id of the catalog_shipping_classes entry a shipping rate tells the product apart by, its variants with it. Absent — none: the rates without a class of their own apply. null under update_mask clears it. shipping_class_id = "<id>" lists the products of one class.
category_idsThe ids of the catalog_categories the product is in, each once, at most 50. A deleted category leaves the list on its own. category_ids:"<id>" filters the products of one category.
image_media_idsThe ids of the media items that picture the product, in their order — the first is the main one. Each once, at most 20, every one of the website's media library. Deleting a media item takes it off every product it pictures, with the product's alt of it.
image_altsThe product's own alt text of its pictures, over the alt_text the media library holds for the file: each {media_id, alt}, alt at most 500 characters, one entry per picture. An entry for an id that is not in image_media_ids is dropped, so is a blank alt, and taking a picture off the product takes its alt with it. Replaced whole when sent; null under update_mask clears it. A view's version may claim it in its own language.
image_countHow many pictures the product has: the size of image_media_ids, kept by the server. image_count = 0 lists the products without a picture.
pricesWhat the product costs, one entry per currency: {currency_code, amount, sale_amount} — amount the regular price and sale_amount, optional and below it, the special one, each a google.type.Money in the entry's currency (whose currency_code may be left out on a write), never a float, never below zero. An entry is in the website's base currency (general.catalog.base_currency) or one of its catalog_currencies, and a list that is not empty has the base currency's entry. Empty — a product on request. The prices of every variant without its own in that currency. Replaced whole when sent; null under update_mask empties it.
sale_starts_atWhen the sale_amount of the product's and its variants' prices starts to apply. Absent — from now on; with sale_ends_at absent too, a special price applies always. null under update_mask clears it.
sale_ends_atWhen the sale_amount of the product's and its variants' prices stops applying: after sale_starts_at. Absent — for good. null under update_mask clears it.
variant_countHow many variants the product has, on sale or not — at least one: a product without options has its default variant, made with it. Kept by the server.
price_minThe lowest regular price an active variant of the product is sold at in the base currency — the amount of its own entry or else the product's — as a google.type.Money. Absent when no active variant has a base price. Kept by the server.
price_maxThe highest regular price an active variant of the product is sold at in the base currency, as price_min; the two are equal while every variant sells at the product's. Kept by the server.
attributesThe values of the product's attributes: an object from an attribute's key to its value — a string for TEXT, TEXTAREA, DATE (YYYY-MM-DD) and SELECT, a number for NUMBER, true or false, an array of option values for MULTISELECT. Only the active attributes of the product's set may be written, each checked by its type, and a required one must have a value — except a key of variant_options, which holds none here: its value is each variant's own. Replaced whole when sent — a key left out has no value. Omitted when empty. A list filters by each attribute of the website as attributes.<key>, typed by the attribute — attributes.color = "red", attributes.sizes:"m", attributes.weight > 2, attributes.organic = true — a catalog price rule's condition in the same words; a key that is no attribute of the website is INVALID_ARGUMENT.
variant_optionsThe options the product's variants differ by: the keys of SELECT attributes of its attribute set, switched on, each once, at most 3, in the order the storefront shows them. Empty — the default — is a product without options, sold as its one default variant. A variant holds one value of each, in its option_values, so attributes holds no value under them. Replaced whole when sent; null under update_mask empties it. Fixed while a variant of the product holds option values: a change — or a new attribute_set_id that does not list one of them — answers FAILED_PRECONDITION until those variants are deleted.
price_rule_idsThe ids of the website's catalog_price_rules whose condition the product matches, each once, kept by the server: matched again when the product is saved and, within seconds, when a rule changes or a category or an attribute it reads is deleted. Whether a rule takes anything off a price — its switch, its period, its groups and views — is decided at the price. price_rule_ids:"<id>" lists the products a rule is on.
visible_view_idsThe ids of the website's views this is shown on, each once, at most 100. Empty — the default — means every view, not none. An id that is not a view of this website is refused; a view deleted later leaves the list on its own. Replaced whole when sent; null under update_mask empties it. What a view says instead of the master's text is its version under views.
Delete catalog product
Deletes a product, with its variants, its versions for the views and its entries in every price list, its variants' included. Its pictures stay in the media library.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog product › Responses
Deleted. No body (§7).
Update catalog product
Changes a product. attributes, when sent, replaces the values whole and is checked as on create; with update_mask=attributes and no value it clears them. The catalog price rules the product is under are matched again before the answer (price_rule_ids). A new attribute_set_id keeps the values of the attributes the new set lists too and drops the others. sku is the variants' and is not written here: a variant's is changed under the product's variants. prices, when sent, replaces them whole and is checked as on create; new prices move price_min and price_max with them. sale_ends_at is after sale_starts_at, the stored one when only one is sent. A new variant_options, or an attribute_set_id that does not list one of them, answers FAILED_PRECONDITION while a variant of the product holds option values. variants is a create's alone: sent here, it is INVALID_ARGUMENT.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
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 product › Request Body
display_nameThe product's name. Not blank, at most 255 characters. display_name:"shirt" lists the products whose name holds the text, case aside.
slugThe product's URL segment: lowercase letters and digits joined by single dashes, at most 120 characters, unique on the website. Derived from display_name when omitted on create; a name with no letter or digit to derive it from needs one sent. category is reserved — the storefront's category pages live under it — sent or derived alike.
descriptionThe product's description, as HTML. At most 100000 characters.
short_descriptionA line or two about the product, for lists and cards. Plain text, at most 2000 characters.
is_activeWhether the product is on sale. true when omitted.
attribute_set_idThe id of the catalog_attribute_sets entry whose attributes the product has. Changing it keeps the values of the attributes the new set lists too and drops the others; the new set's required attributes must then have a value, and it must list every one of the product's variant_options.
tax_class_idThe id of the catalog_tax_classes entry the product is taxed by, its variants with it. Absent — the standard rate of every country. null under update_mask clears it. tax_class_id = "<id>" lists the products of one class.
shipping_class_idThe id of the catalog_shipping_classes entry a shipping rate tells the product apart by, its variants with it. Absent — none: the rates without a class of their own apply. null under update_mask clears it. shipping_class_id = "<id>" lists the products of one class.
category_idsThe ids of the catalog_categories the product is in, each once, at most 50. A deleted category leaves the list on its own. category_ids:"<id>" filters the products of one category.
image_media_idsThe ids of the media items that picture the product, in their order — the first is the main one. Each once, at most 20, every one of the website's media library. Deleting a media item takes it off every product it pictures, with the product's alt of it.
image_altsThe product's own alt text of its pictures, over the alt_text the media library holds for the file: each {media_id, alt}, alt at most 500 characters, one entry per picture. An entry for an id that is not in image_media_ids is dropped, so is a blank alt, and taking a picture off the product takes its alt with it. Replaced whole when sent; null under update_mask clears it. A view's version may claim it in its own language.
pricesWhat the product costs, one entry per currency: {currency_code, amount, sale_amount} — amount the regular price and sale_amount, optional and below it, the special one, each a google.type.Money in the entry's currency (whose currency_code may be left out on a write), never a float, never below zero. An entry is in the website's base currency (general.catalog.base_currency) or one of its catalog_currencies, and a list that is not empty has the base currency's entry. Empty — a product on request. The prices of every variant without its own in that currency. Replaced whole when sent; null under update_mask empties it.
sale_starts_atWhen the sale_amount of the product's and its variants' prices starts to apply. Absent — from now on; with sale_ends_at absent too, a special price applies always. null under update_mask clears it.
sale_ends_atWhen the sale_amount of the product's and its variants' prices stops applying: after sale_starts_at. Absent — for good. null under update_mask clears it.
attributesThe values of the product's attributes: an object from an attribute's key to its value — a string for TEXT, TEXTAREA, DATE (YYYY-MM-DD) and SELECT, a number for NUMBER, true or false, an array of option values for MULTISELECT. Only the active attributes of the product's set may be written, each checked by its type, and a required one must have a value — except a key of variant_options, which holds none here: its value is each variant's own. Replaced whole when sent — a key left out has no value. Omitted when empty. A list filters by each attribute of the website as attributes.<key>, typed by the attribute — attributes.color = "red", attributes.sizes:"m", attributes.weight > 2, attributes.organic = true — a catalog price rule's condition in the same words; a key that is no attribute of the website is INVALID_ARGUMENT.
variant_optionsThe options the product's variants differ by: the keys of SELECT attributes of its attribute set, switched on, each once, at most 3, in the order the storefront shows them. Empty — the default — is a product without options, sold as its one default variant. A variant holds one value of each, in its option_values, so attributes holds no value under them. Replaced whole when sent; null under update_mask empties it. Fixed while a variant of the product holds option values: a change — or a new attribute_set_id that does not list one of them — answers FAILED_PRECONDITION until those variants are deleted.
variantsCreate only, and required there: the product's variants, made with it in the same call — each the body of a variant's own create (option_values, sku, prices, image_media_ids, is_active, weight, length, width, height), at least one, at most 10000. Without variant_options exactly one, its default variant, with option_values {}. With them, each holds a value of every one — or the default variant comes alone, the variants made later by :batch_create with replace_default_variant. A variant refused leaves no product behind: its error names variants[i]. Never returned; an update that carries it is INVALID_ARGUMENT — a product's variants are written under its variants.
visible_view_idsThe ids of the website's views this is shown on, each once, at most 100. Empty — the default — means every view, not none. An id that is not a view of this website is refused; a view deleted later leaves the list on its own. Replaced whole when sent; null under update_mask empties it. What a view says instead of the master's text is its version under views.
Update catalog product › 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 product's name. Not blank, at most 255 characters. display_name:"shirt" lists the products whose name holds the text, case aside.
slugThe product's URL segment: lowercase letters and digits joined by single dashes, at most 120 characters, unique on the website. Derived from display_name when omitted on create; a name with no letter or digit to derive it from needs one sent. category is reserved — the storefront's category pages live under it — sent or derived alike.
skuThe SKU of the product's only variant, kept by the server: present while variant_count is 1, absent on a product of more — each of its variants has its own. Every SKU is a variant's, unique among the website's variants, and is written under the product's variants. sku = "…" lists the product any variant of which has that SKU, sku:"…" the ones with a variant whose SKU holds the text, case aside.
descriptionThe product's description, as HTML. At most 100000 characters.
short_descriptionA line or two about the product, for lists and cards. Plain text, at most 2000 characters.
is_activeWhether the product is on sale. true when omitted.
attribute_set_idThe id of the catalog_attribute_sets entry whose attributes the product has. Changing it keeps the values of the attributes the new set lists too and drops the others; the new set's required attributes must then have a value, and it must list every one of the product's variant_options.
tax_class_idThe id of the catalog_tax_classes entry the product is taxed by, its variants with it. Absent — the standard rate of every country. null under update_mask clears it. tax_class_id = "<id>" lists the products of one class.
shipping_class_idThe id of the catalog_shipping_classes entry a shipping rate tells the product apart by, its variants with it. Absent — none: the rates without a class of their own apply. null under update_mask clears it. shipping_class_id = "<id>" lists the products of one class.
category_idsThe ids of the catalog_categories the product is in, each once, at most 50. A deleted category leaves the list on its own. category_ids:"<id>" filters the products of one category.
image_media_idsThe ids of the media items that picture the product, in their order — the first is the main one. Each once, at most 20, every one of the website's media library. Deleting a media item takes it off every product it pictures, with the product's alt of it.
image_altsThe product's own alt text of its pictures, over the alt_text the media library holds for the file: each {media_id, alt}, alt at most 500 characters, one entry per picture. An entry for an id that is not in image_media_ids is dropped, so is a blank alt, and taking a picture off the product takes its alt with it. Replaced whole when sent; null under update_mask clears it. A view's version may claim it in its own language.
image_countHow many pictures the product has: the size of image_media_ids, kept by the server. image_count = 0 lists the products without a picture.
pricesWhat the product costs, one entry per currency: {currency_code, amount, sale_amount} — amount the regular price and sale_amount, optional and below it, the special one, each a google.type.Money in the entry's currency (whose currency_code may be left out on a write), never a float, never below zero. An entry is in the website's base currency (general.catalog.base_currency) or one of its catalog_currencies, and a list that is not empty has the base currency's entry. Empty — a product on request. The prices of every variant without its own in that currency. Replaced whole when sent; null under update_mask empties it.
sale_starts_atWhen the sale_amount of the product's and its variants' prices starts to apply. Absent — from now on; with sale_ends_at absent too, a special price applies always. null under update_mask clears it.
sale_ends_atWhen the sale_amount of the product's and its variants' prices stops applying: after sale_starts_at. Absent — for good. null under update_mask clears it.
variant_countHow many variants the product has, on sale or not — at least one: a product without options has its default variant, made with it. Kept by the server.
price_minThe lowest regular price an active variant of the product is sold at in the base currency — the amount of its own entry or else the product's — as a google.type.Money. Absent when no active variant has a base price. Kept by the server.
price_maxThe highest regular price an active variant of the product is sold at in the base currency, as price_min; the two are equal while every variant sells at the product's. Kept by the server.
attributesThe values of the product's attributes: an object from an attribute's key to its value — a string for TEXT, TEXTAREA, DATE (YYYY-MM-DD) and SELECT, a number for NUMBER, true or false, an array of option values for MULTISELECT. Only the active attributes of the product's set may be written, each checked by its type, and a required one must have a value — except a key of variant_options, which holds none here: its value is each variant's own. Replaced whole when sent — a key left out has no value. Omitted when empty. A list filters by each attribute of the website as attributes.<key>, typed by the attribute — attributes.color = "red", attributes.sizes:"m", attributes.weight > 2, attributes.organic = true — a catalog price rule's condition in the same words; a key that is no attribute of the website is INVALID_ARGUMENT.
variant_optionsThe options the product's variants differ by: the keys of SELECT attributes of its attribute set, switched on, each once, at most 3, in the order the storefront shows them. Empty — the default — is a product without options, sold as its one default variant. A variant holds one value of each, in its option_values, so attributes holds no value under them. Replaced whole when sent; null under update_mask empties it. Fixed while a variant of the product holds option values: a change — or a new attribute_set_id that does not list one of them — answers FAILED_PRECONDITION until those variants are deleted.
price_rule_idsThe ids of the website's catalog_price_rules whose condition the product matches, each once, kept by the server: matched again when the product is saved and, within seconds, when a rule changes or a category or an attribute it reads is deleted. Whether a rule takes anything off a price — its switch, its period, its groups and views — is decided at the price. price_rule_ids:"<id>" lists the products a rule is on.
visible_view_idsThe ids of the website's views this is shown on, each once, at most 100. Empty — the default — means every view, not none. An id that is not a view of this website is refused; a view deleted later leaves the list on its own. Replaced whole when sent; null under update_mask empties it. What a view says instead of the master's text is its version under views.
List catalog product views
What one view says instead of the master product: its name, URL segment, short description, description and the alt text of its pictures. Each is the master's until overridden claims it. The SKU, the prices, the pictures, the attribute set and its values, the categories, is_active and visible_view_ids are the master's on every view.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
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 catalog product views › Responses
One page of views.
This page of views, 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 product view
Adds a product's version for one view, named by ?id={view_id} — a view of this website, else INVALID_ARGUMENT on id; a view that has one already answers ALREADY_EXISTS. Only the fields listed in overridden count. Claiming display_name without a slug derives one from the name; category is INVALID_ARGUMENT on slug, and a slug another product holds or serves on the view answers ALREADY_EXISTS on slug.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
Create catalog product view › Request Body
overriddenThe fields this view claims. A field counts only while it is listed here: one left out is taken down the view's fallback chain to the master, whatever value it holds, and a claimed one cleared to null is taken so too. Only the localizable fields of the resource may be listed. Claiming display_name claims slug with it — derived from the name when the version has none — so a translated name gets a translated URL.
display_nameThis view's name for the product. Not blank, at most 255 characters.
slugThis view's URL segment for the product, by the master's rule and never category. One another product holds, or serves on the view, is ALREADY_EXISTS. Claimed without a value, or not sent while display_name is claimed, it is derived from the name — and then kept when the name changes.
short_descriptionThis view's line or two about the product, for lists and cards. Plain text, at most 2000 characters.
descriptionThis view's description of the product, as HTML. At most 100000 characters.
image_altsThis view's alt text of the master's pictures, each {media_id, alt} as on the master. Claimed, a picture with an entry here takes it, any other keeps the master's, and one with neither the media library's alt_text. An entry for a picture the master does not have is dropped.
Create catalog product view › 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).
catalog_product_idThe id of the master this is a version of. Fixed by the URL.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
overriddenThe fields this view claims. A field counts only while it is listed here: one left out is taken down the view's fallback chain to the master, whatever value it holds, and a claimed one cleared to null is taken so too. Only the localizable fields of the resource may be listed. Claiming display_name claims slug with it — derived from the name when the version has none — so a translated name gets a translated URL.
display_nameThis view's name for the product. Not blank, at most 255 characters.
slugThis view's URL segment for the product, by the master's rule and never category. One another product holds, or serves on the view, is ALREADY_EXISTS. Claimed without a value, or not sent while display_name is claimed, it is derived from the name — and then kept when the name changes.
short_descriptionThis view's line or two about the product, for lists and cards. Plain text, at most 2000 characters.
descriptionThis view's description of the product, as HTML. At most 100000 characters.
image_altsThis view's alt text of the master's pictures, each {media_id, alt} as on the master. Claimed, a picture with an entry here takes it, any other keeps the master's, and one with neither the media library's alt_text. An entry for a picture the master does not have is dropped.
Get catalog product view
What one view says instead of the master product: its name, URL segment, short description, description and the alt text of its pictures. Each is the master's until overridden claims it. The SKU, the prices, the pictures, the attribute set and its values, the categories, is_active and visible_view_ids are the master's on every view.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog product view › 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).
catalog_product_idThe id of the master this is a version of. Fixed by the URL.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
overriddenThe fields this view claims. A field counts only while it is listed here: one left out is taken down the view's fallback chain to the master, whatever value it holds, and a claimed one cleared to null is taken so too. Only the localizable fields of the resource may be listed. Claiming display_name claims slug with it — derived from the name when the version has none — so a translated name gets a translated URL.
display_nameThis view's name for the product. Not blank, at most 255 characters.
slugThis view's URL segment for the product, by the master's rule and never category. One another product holds, or serves on the view, is ALREADY_EXISTS. Claimed without a value, or not sent while display_name is claimed, it is derived from the name — and then kept when the name changes.
short_descriptionThis view's line or two about the product, for lists and cards. Plain text, at most 2000 characters.
descriptionThis view's description of the product, as HTML. At most 100000 characters.
image_altsThis view's alt text of the master's pictures, each {media_id, alt} as on the master. Claimed, a picture with an entry here takes it, any other keeps the master's, and one with neither the media library's alt_text. An entry for a picture the master does not have is dropped.
Delete catalog product view
Deletes a product's version for one view: the view shows the master again.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog product view › Responses
Deleted. No body (§7).
Update catalog product view
Changes a product's version for one view. overridden, when sent, replaces the list; a slug the version serves anew is checked as on create, one it serves already is kept.
path Parameters
website_idId of the parent website.
product_idId of the parent product.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
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 product view › Request Body
overriddenThe fields this view claims. A field counts only while it is listed here: one left out is taken down the view's fallback chain to the master, whatever value it holds, and a claimed one cleared to null is taken so too. Only the localizable fields of the resource may be listed. Claiming display_name claims slug with it — derived from the name when the version has none — so a translated name gets a translated URL.
display_nameThis view's name for the product. Not blank, at most 255 characters.
slugThis view's URL segment for the product, by the master's rule and never category. One another product holds, or serves on the view, is ALREADY_EXISTS. Claimed without a value, or not sent while display_name is claimed, it is derived from the name — and then kept when the name changes.
short_descriptionThis view's line or two about the product, for lists and cards. Plain text, at most 2000 characters.
descriptionThis view's description of the product, as HTML. At most 100000 characters.
image_altsThis view's alt text of the master's pictures, each {media_id, alt} as on the master. Claimed, a picture with an entry here takes it, any other keeps the master's, and one with neither the media library's alt_text. An entry for a picture the master does not have is dropped.
Update catalog product view › 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).
catalog_product_idThe id of the master this is a version of. Fixed by the URL.
view_idThe view this version is for — the same as id. Fixed by the URL: a version is created with ?id={view_id}.
overriddenThe fields this view claims. A field counts only while it is listed here: one left out is taken down the view's fallback chain to the master, whatever value it holds, and a claimed one cleared to null is taken so too. Only the localizable fields of the resource may be listed. Claiming display_name claims slug with it — derived from the name when the version has none — so a translated name gets a translated URL.
display_nameThis view's name for the product. Not blank, at most 255 characters.
slugThis view's URL segment for the product, by the master's rule and never category. One another product holds, or serves on the view, is ALREADY_EXISTS. Claimed without a value, or not sent while display_name is claimed, it is derived from the name — and then kept when the name changes.
short_descriptionThis view's line or two about the product, for lists and cards. Plain text, at most 2000 characters.
descriptionThis view's description of the product, as HTML. At most 100000 characters.
image_altsThis view's alt text of the master's pictures, each {media_id, alt} as on the master. Claimed, a picture with an entry here takes it, any other keeps the master's, and one with neither the media library's alt_text. An entry for a picture the master does not have is dropped.