Pos: sale

Requires authorization

Submit a sale event for the given merchant. Try it now.

Request

HTTP request

POST https://www.googleapis.com/content/v2/merchantId/pos/targetMerchantId/sale

Parameters

Parameter name Value Description
Path parameters
merchantId unsigned long The ID of the POS or inventory data provider.
targetMerchantId unsigned long The ID of the target merchant.
Optional query parameters
dryRun boolean Flag to run the request in dry-run mode.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/content

Request body

In the request body, supply data with the following structure:

{
  "storeCode": string,
  "itemId": string,
  "targetCountry": string,
  "contentLanguage": string,
  "gtin": string,
  "price": {
    "value": string,
    "currency": string
  },
  "quantity": long,
  "timestamp": string,
  "saleId": string
}
Property name Value Description Notes
storeCode string The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
itemId string A unique identifier for the item.
targetCountry string The CLDR territory code for the item.
contentLanguage string The two-letter ISO 639-1 language code for the item.
gtin string Global Trade Item Number.
price nested object The price of the item.
price.value string The price represented as a number. writable
price.currency string The currency of the price. writable
quantity long The relative change of the available quantity. Negative for items sold.
timestamp string The inventory timestamp, in ISO 8601 format.
saleId string A unique ID to group items from the same sale event.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "content#posSaleResponse",
  "storeCode": string,
  "itemId": string,
  "targetCountry": string,
  "contentLanguage": string,
  "gtin": string,
  "price": {
    "value": string,
    "currency": string
  },
  "quantity": long,
  "timestamp": string,
  "saleId": string
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse".
storeCode string The identifier of the merchant's store. Either a storeCode inserted via the API or the code of the store in Google My Business.
itemId string A unique identifier for the item.
targetCountry string The CLDR territory code for the item.
contentLanguage string The two-letter ISO 639-1 language code for the item.
gtin string Global Trade Item Number.
price nested object The price of the item.
price.value string The price represented as a number. writable
price.currency string The currency of the price. writable
quantity long The relative change of the available quantity. Negative for items sold.
timestamp string The inventory timestamp, in ISO 8601 format.
saleId string A unique ID to group items from the same sale event.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Content API for Shopping