rocket
Meet
Merchant API
- the official successor to Content API for Shopping.
update
Get the latest
on new Merchant API features, bug fixes, and updates.
add_alert
Note: Content API for Shopping will be sunset on August 18, 2026.
Method: pos.sale
Stay organized with collections
Save and categorize content based on your preferences.
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 |
string
The ID of the POS or inventory data provider.
|
targetMerchantId |
string
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 (Price )
},
"quantity": string,
"timestamp": string,
"saleId": string
} |
Fields |
kind |
string
Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse ".
|
storeCode |
string
Required. The identifier of the merchant's store. Either a storeCode inserted through the API or the code of the store in a Business Profile.
|
itemId |
string
Required. A unique identifier for the item.
|
targetCountry |
string
Required. The CLDR territory code for the item.
|
contentLanguage |
string
Required. The two-letter ISO 639-1 language code for the item.
|
gtin |
string
Global Trade Item Number.
|
price |
object (Price )
Required. The price of the item.
|
quantity |
string (int64 format)
Required. The relative change of the available quantity. Negative for items returned.
|
timestamp |
string
Required. The inventory timestamp, in ISO 8601 format.
|
saleId |
string
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 (Price )
},
"quantity": string,
"timestamp": string,
"saleId": string
} |
Fields |
storeCode |
string
Required. The identifier of the merchant's store. Either a storeCode inserted through the API or the code of the store in a Business Profile.
|
itemId |
string
Required. A unique identifier for the item.
|
targetCountry |
string
Required. The CLDR territory code for the item.
|
contentLanguage |
string
Required. The two-letter ISO 639-1 language code for the item.
|
gtin |
string
Global Trade Item Number.
|
price |
object (Price )
Required. The price of the item.
|
quantity |
string (int64 format)
Required. The relative change of the available quantity. Negative for items returned.
|
timestamp |
string
Required. The inventory timestamp, in ISO 8601 format.
|
saleId |
string
A unique ID to group items from the same sale event.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-25 UTC.
[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eSubmit sale events for a given merchant using the \u003ccode\u003esale\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires details like store code, item ID, price, quantity, and timestamp in the \u003ccode\u003ePosSaleRequest\u003c/code\u003e format.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses provide a \u003ccode\u003eposSaleResponse\u003c/code\u003e with details of the sale event including a unique sale ID.\u003c/p\u003e\n"],["\u003cp\u003eThis functionality requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This documentation details how to submit a sale event using a POST request to `https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/pos/{targetMerchantId}/sale`. The request body, defined by `PosSaleRequest`, requires fields like `storeCode`, `itemId`, `targetCountry`, `price`, `quantity`, and `timestamp`. A successful response returns data formatted as `PosSaleResponse`, containing details like `kind`, `storeCode`, `itemId`, `price`, and `saleId`. Authorization requires the `https://www.googleapis.com/auth/content` scope.\n"],null,["# Method: pos.sale\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PosSaleResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [PosSaleRequest](#PosSaleRequest)\n - [JSON representation](#PosSaleRequest.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nSubmit a sale event for the given merchant.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/pos/{targetMerchantId}/sale`\n\n### Path parameters\n\n| Parameters ||\n|--------------------|--------------------------------------------------------|\n| `merchantId` | `string` The ID of the POS or inventory data provider. |\n| `targetMerchantId` | `string` The ID of the target merchant. |\n\n### Request body\n\nThe request body contains an instance of [PosSaleRequest](/shopping-content/reference/rest/v2.1/pos/sale#PosSaleRequest).\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"storeCode\": string, \"itemId\": string, \"targetCountry\": string, \"contentLanguage\": string, \"gtin\": string, \"price\": { object (/shopping-content/reference/rest/v2.1/Price) }, \"quantity\": string, \"timestamp\": string, \"saleId\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#posSaleResponse`\". |\n| `storeCode` | `string` Required. The identifier of the merchant's store. Either a `storeCode` inserted through the API or the code of the store in a Business Profile. |\n| `itemId` | `string` Required. A unique identifier for the item. |\n| `targetCountry` | `string` Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the item. |\n| `contentLanguage` | `string` Required. The two-letter ISO 639-1 language code for the item. |\n| `gtin` | `string` Global Trade Item Number. |\n| `price` | `object (`[Price](/shopping-content/reference/rest/v2.1/Price)`)` Required. The price of the item. |\n| `quantity` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The relative change of the available quantity. Negative for items returned. |\n| `timestamp` | `string` Required. The inventory timestamp, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. |\n| `saleId` | `string` A unique ID to group items from the same sale event. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nPosSaleRequest\n--------------\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"storeCode\": string, \"itemId\": string, \"targetCountry\": string, \"contentLanguage\": string, \"gtin\": string, \"price\": { object (/shopping-content/reference/rest/v2.1/Price) }, \"quantity\": string, \"timestamp\": string, \"saleId\": string } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `storeCode` | `string` Required. The identifier of the merchant's store. Either a `storeCode` inserted through the API or the code of the store in a Business Profile. |\n| `itemId` | `string` Required. A unique identifier for the item. |\n| `targetCountry` | `string` Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the item. |\n| `contentLanguage` | `string` Required. The two-letter ISO 639-1 language code for the item. |\n| `gtin` | `string` Global Trade Item Number. |\n| `price` | `object (`[Price](/shopping-content/reference/rest/v2.1/Price)`)` Required. The price of the item. |\n| `quantity` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The relative change of the available quantity. Negative for items returned. |\n| `timestamp` | `string` Required. The inventory timestamp, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. |\n| `saleId` | `string` A unique ID to group items from the same sale event. |"]]