Catalog price list entries
What a product — every variant of it — or one variant costs under a price list from a quantity on: an amount in the list’s currency or a percentage off the regular price. :batch_create writes up to 1000 at once, all or none.
List catalog price list entries
Lists the price list's entries, in the order they were made: create_time, oldest first by default. filter takes product_id — every entry of a product, its variants' included — variant_id, min_quantity and create_time.
path Parameters
website_idId of the parent website.
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
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 asc. Sortable: create_time.
filterAIP-160 subset (§8). Filterable: create_time, min_quantity, product_id, variant_id. A field outside the list is INVALID_ARGUMENT.
List catalog price list entries › Responses
One page of entries.
This page of entries, 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 price list entry
Adds an entry to the price list: exactly one of product_id and variant_id — a product or a variant of the website, else INVALID_ARGUMENT on the field — and exactly one of amount, in the list's currency_code (a list without one takes none), and percent_off. The same target at the same min_quantity answers ALREADY_EXISTS, and a list of 100000 entries FAILED_PRECONDITION.
path Parameters
website_idId of the parent website.
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
Create catalog price list entry › Request Body
product_idThe product the entry prices — every variant of it. On an entry of one variant the server sets it to the variant's product, so product_id = "<id>" lists every entry of a product, its variants' included. A create sends exactly one of product_id and variant_id; fixed afterwards. Deleting the product deletes its entries.
variant_idThe one variant the entry prices, of any product of the website; absent on an entry of a whole product. An entry of a variant beats its product's in the same list. Fixed once the entry is made; deleting the variant deletes its entries.
min_quantityThe quantity the entry applies from — 1, the default, for any; entries of one product at 1, 10 and 100 are its price tiers. Unique with the target in the list: a second entry of the same product or variant at the same quantity answers ALREADY_EXISTS.
amountThe price, as a google.type.Money in the list's currency_code — whose currency_code may be left out on a write. A list without a currency takes no amount. Exactly one of amount and percent_off: sending the other in an update switches the entry to it.
percent_offThe price as a percentage taken off the regular one, as a decimal string: above 0, at most 100, at most two decimals ("12.5"). A JSON number is taken on a write too. Exactly one of amount and percent_off.
Create catalog price list entry › 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).
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
product_idThe product the entry prices — every variant of it. On an entry of one variant the server sets it to the variant's product, so product_id = "<id>" lists every entry of a product, its variants' included. A create sends exactly one of product_id and variant_id; fixed afterwards. Deleting the product deletes its entries.
variant_idThe one variant the entry prices, of any product of the website; absent on an entry of a whole product. An entry of a variant beats its product's in the same list. Fixed once the entry is made; deleting the variant deletes its entries.
min_quantityThe quantity the entry applies from — 1, the default, for any; entries of one product at 1, 10 and 100 are its price tiers. Unique with the target in the list: a second entry of the same product or variant at the same quantity answers ALREADY_EXISTS.
amountThe price, as a google.type.Money in the list's currency_code — whose currency_code may be left out on a write. A list without a currency takes no amount. Exactly one of amount and percent_off: sending the other in an update switches the entry to it.
percent_offThe price as a percentage taken off the regular one, as a decimal string: above 0, at most 100, at most two decimals ("12.5"). A JSON number is taken on a write too. Exactly one of amount and percent_off.
Get catalog price list entry
One price of a price list: what a product — every variant of it — or one variant costs under the list from min_quantity on, as an amount in the list's currency or a percent_off the regular price. An entry lives under its list and is deleted with it, and with the product or the variant it prices. At most 100000 per list; :batch_create writes up to 1000 at once, all or none.
path Parameters
website_idId of the parent website.
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
entry_idId of the parent entry.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get catalog price list entry › 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).
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
product_idThe product the entry prices — every variant of it. On an entry of one variant the server sets it to the variant's product, so product_id = "<id>" lists every entry of a product, its variants' included. A create sends exactly one of product_id and variant_id; fixed afterwards. Deleting the product deletes its entries.
variant_idThe one variant the entry prices, of any product of the website; absent on an entry of a whole product. An entry of a variant beats its product's in the same list. Fixed once the entry is made; deleting the variant deletes its entries.
min_quantityThe quantity the entry applies from — 1, the default, for any; entries of one product at 1, 10 and 100 are its price tiers. Unique with the target in the list: a second entry of the same product or variant at the same quantity answers ALREADY_EXISTS.
amountThe price, as a google.type.Money in the list's currency_code — whose currency_code may be left out on a write. A list without a currency takes no amount. Exactly one of amount and percent_off: sending the other in an update switches the entry to it.
percent_offThe price as a percentage taken off the regular one, as a decimal string: above 0, at most 100, at most two decimals ("12.5"). A JSON number is taken on a write too. Exactly one of amount and percent_off.
Delete catalog price list entry
Deletes an entry of the price list: the product or the variant it priced sells at its own prices again under the list, or at another entry of it for the same target.
path Parameters
website_idId of the parent website.
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
entry_idId of the parent entry.
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Delete catalog price list entry › Responses
Deleted. No body (§7).
Update catalog price list entry
Changes an entry's min_quantity or its price. The target is fixed and refused here. Sending percent_off to an entry that is an amount — or the other way round — switches it; a price cleared to null without the other in its place is refused.
path Parameters
website_idId of the parent website.
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
entry_idId of the parent entry.
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 price list entry › Request Body
min_quantityThe quantity the entry applies from — 1, the default, for any; entries of one product at 1, 10 and 100 are its price tiers. Unique with the target in the list: a second entry of the same product or variant at the same quantity answers ALREADY_EXISTS.
amountThe price, as a google.type.Money in the list's currency_code — whose currency_code may be left out on a write. A list without a currency takes no amount. Exactly one of amount and percent_off: sending the other in an update switches the entry to it.
percent_offThe price as a percentage taken off the regular one, as a decimal string: above 0, at most 100, at most two decimals ("12.5"). A JSON number is taken on a write too. Exactly one of amount and percent_off.
Update catalog price list entry › 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).
price_list_idThe id of the price list this is an entry of — the {price_list} of name. Fixed by the URL.
product_idThe product the entry prices — every variant of it. On an entry of one variant the server sets it to the variant's product, so product_id = "<id>" lists every entry of a product, its variants' included. A create sends exactly one of product_id and variant_id; fixed afterwards. Deleting the product deletes its entries.
variant_idThe one variant the entry prices, of any product of the website; absent on an entry of a whole product. An entry of a variant beats its product's in the same list. Fixed once the entry is made; deleting the variant deletes its entries.
min_quantityThe quantity the entry applies from — 1, the default, for any; entries of one product at 1, 10 and 100 are its price tiers. Unique with the target in the list: a second entry of the same product or variant at the same quantity answers ALREADY_EXISTS.
amountThe price, as a google.type.Money in the list's currency_code — whose currency_code may be left out on a write. A list without a currency takes no amount. Exactly one of amount and percent_off: sending the other in an update switches the entry to it.
percent_offThe price as a percentage taken off the regular one, as a decimal string: above 0, at most 100, at most two decimals ("12.5"). A JSON number is taken on a write too. Exactly one of amount and percent_off.
Batch create (catalog price list entries)
Adds many entries to the price list in one call: {"requests": [{"entry": {...}}, ...]}, up to 1000, each written exactly as the body of a single create. Every entry is checked before any is written — a refused one answers for the whole call on its own fields (requests[2].entry.variant_id), and nothing is written. Two entries of the same target at the same min_quantity are INVALID_ARGUMENT, one the list has already ALREADY_EXISTS, more than 100000 entries in all FAILED_PRECONDITION. Answers {"entries": [...]} in the requests' order.
path Parameters
website_idId of the parent website.
price_list_idId of the parent price_list.
Batch create (catalog price list entries) › Request Body optional
Batch create (catalog price list entries) › Responses
The affected resource, or the method’s own response object (§10).