Skip to main content

products_local_inventories

Creates, updates, deletes, gets or lists a products_local_inventories resource.

Overview

Nameproducts_local_inventories
TypeResource
Idgoogle.retail.products_local_inventories

Fields

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_catalogs_branches_products_add_local_inventoriesINSERTbranchesId, catalogsId, locationsId, productsId, projectsIdUpdates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
projects_locations_catalogs_branches_products_remove_local_inventoriesDELETEbranchesId, catalogsId, locationsId, productsId, projectsIdRemove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

INSERT example

Use the following StackQL query and manifest file to create a new products_local_inventories resource.

/*+ create */
INSERT INTO google.retail.products_local_inventories (
branchesId,
catalogsId,
locationsId,
productsId,
projectsId,
localInventories,
addMask,
addTime,
allowMissing
)
SELECT
'{{ branchesId }}',
'{{ catalogsId }}',
'{{ locationsId }}',
'{{ productsId }}',
'{{ projectsId }}',
'{{ localInventories }}',
'{{ addMask }}',
'{{ addTime }}',
{{ allowMissing }}
;

DELETE example

Deletes the specified products_local_inventories resource.

/*+ delete */
DELETE FROM google.retail.products_local_inventories
WHERE branchesId = '{{ branchesId }}'
AND catalogsId = '{{ catalogsId }}'
AND locationsId = '{{ locationsId }}'
AND productsId = '{{ productsId }}'
AND projectsId = '{{ projectsId }}';