[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["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. |"]]