Required. Type of the interaction that is reported, for example INTERACTION_CLICK.
responseToken
string
Required. Token of the response when recommendation was returned.
type
string
Required. Type of the recommendations on which this interaction happened. This field must be set only to the value that is returned by {@link GenerateRecommendationsResponse} call.
subtype
string
Optional. Subtype of the recommendations this interaction happened on. This field must be set only to the value that is returned by {@link RecommendationsService.GenerateRecommendations} call.
Response body
If successful, the response body is an empty JSON object.
[[["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\u003eReports an interaction, such as a click or dismiss, on a product recommendation for a specific merchant.\u003c/p\u003e\n"],["\u003cp\u003eRequires an HTTP POST request to the specified endpoint with necessary path and request body parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain information about the interaction type, response token, recommendation type, and optional subtype.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will receive an empty response body, indicating the interaction was reported successfully.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required using OAuth scopes, specifically \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e.\u003c/p\u003e\n"]]],["This describes how to report a user interaction with a merchant recommendation using a `POST` request to `https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/recommendations/reportInteraction`. The request requires the `merchantId` in the path and a JSON body specifying the `interactionType` (e.g., `INTERACTION_CLICK`), `responseToken`, and `type`. An optional `subtype` is also permitted. Successful interactions result in an empty JSON object response. Authorization requires the `https://www.googleapis.com/auth/content` OAuth scope.\n"],null,["# Method: recommendations.reportInteraction\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [InteractionType](#InteractionType)\n- [Try it!](#try-it)\n\nReports an interaction on a recommendation for a merchant.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/recommendations/reportInteraction`\n\n### Path parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `merchantId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the account that wants to report an interaction. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"interactionType\": enum (/shopping-content/reference/rest/v2.1/recommendations/reportInteraction#InteractionType), \"responseToken\": string, \"type\": string, \"subtype\": string } ``` |\n\n| Fields ||\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `interactionType` | `enum (`[InteractionType](/shopping-content/reference/rest/v2.1/recommendations/reportInteraction#InteractionType)`)` Required. Type of the interaction that is reported, for example INTERACTION_CLICK. |\n| `responseToken` | `string` Required. Token of the response when recommendation was returned. |\n| `type` | `string` Required. Type of the recommendations on which this interaction happened. This field must be set only to the value that is returned by {@link `GenerateRecommendationsResponse`} call. |\n| `subtype` | `string` Optional. Subtype of the recommendations this interaction happened on. This field must be set only to the value that is returned by {@link `RecommendationsService.GenerateRecommendations`} call. |\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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\nInteractionType\n---------------\n\nEnum containing values for various types of interactions.\n\n| Enums ||\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| `INTERACTION_TYPE_UNSPECIFIED` | Default value. If provided, the service will throw ApiError with description \"Required parameter: interactionType\". |\n| `INTERACTION_DISMISS` | When a recommendation is dismissed. |\n| `INTERACTION_CLICK` | When a recommendation is clicked. |"]]