products_local_inventories
Creates, updates, deletes, gets or lists a products_local_inventories
resource.
Overview
Name | products_local_inventories |
Type | Resource |
Id | google.retail.products_local_inventories |
Fields
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_catalogs_branches_products_add_local_inventories | INSERT | branchesId, catalogsId, locationsId, productsId, projectsId | Updates 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_inventories | DELETE | branchesId, catalogsId, locationsId, productsId, projectsId | Remove 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.
- All Properties
- Manifest
/*+ 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 }}
;
- name: your_resource_model_name
props:
- name: localInventories
value:
- - name: placeId
value: string
- name: priceInfo
value:
- name: currencyCode
value: string
- name: price
value: number
- name: originalPrice
value: number
- name: cost
value: number
- name: priceEffectiveTime
value: string
- name: priceExpireTime
value: string
- name: priceRange
value:
- name: price
value:
- name: minimum
value: number
- name: exclusiveMinimum
value: number
- name: maximum
value: number
- name: exclusiveMaximum
value: number
- name: attributes
value: object
- name: fulfillmentTypes
value:
- string
- name: addMask
value: string
- name: addTime
value: string
- name: allowMissing
value: boolean
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 }}';