Page Summary
-
Submit sale events for a given merchant using the
salemethod. -
The request body requires details like store code, item ID, price, quantity, and timestamp in the
PosSaleRequestformat. -
Successful responses provide a
posSaleResponsewith details of the sale event including a unique sale ID. -
This functionality requires authorization with the
https://www.googleapis.com/auth/contentscope.
Submit a sale event for the given merchant.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/pos/{targetMerchantId}/sale
Path parameters
| Parameters | |
|---|---|
merchantId
|
The ID of the POS or inventory data provider. |
targetMerchantId
|
The ID of the target merchant. |
Request body
The request body contains an instance of PosSaleRequest
.
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind"
:
string
,
"storeCode"
:
string
,
"itemId"
:
string
,
"targetCountry"
:
string
,
"contentLanguage"
:
string
,
"gtin"
:
string
,
"price"
:
{
object (
|
| Fields | |
|---|---|
kind
|
Identifies what kind of resource this is. Value: the fixed string " |
storeCode
|
Required. The identifier of the merchant's store. Either a |
itemId
|
Required. A unique identifier for the item. |
targetCountry
|
Required. The CLDR territory code for the item. |
contentLanguage
|
Required. The two-letter ISO 639-1 language code for the item. |
gtin
|
Global Trade Item Number. |
price
|
Required. The price of the item. |
quantity
|
Required. The relative change of the available quantity. Negative for items returned. |
timestamp
|
Required. The inventory timestamp, in ISO 8601 format. |
saleId
|
A unique ID to group items from the same sale event. |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview .
PosSaleRequest
| JSON representation |
|---|
{
"storeCode"
:
string
,
"itemId"
:
string
,
"targetCountry"
:
string
,
"contentLanguage"
:
string
,
"gtin"
:
string
,
"price"
:
{
object (
|
| Fields | |
|---|---|
storeCode
|
Required. The identifier of the merchant's store. Either a |
itemId
|
Required. A unique identifier for the item. |
targetCountry
|
Required. The CLDR territory code for the item. |
contentLanguage
|
Required. The two-letter ISO 639-1 language code for the item. |
gtin
|
Global Trade Item Number. |
price
|
Required. The price of the item. |
quantity
|
Required. The relative change of the available quantity. Negative for items returned. |
timestamp
|
Required. The inventory timestamp, in ISO 8601 format. |
saleId
|
A unique ID to group items from the same sale event. |

