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: recommendations.reportInteraction
Stay organized with collections
Save and categorize content based on your preferences.
Reports an interaction on a recommendation for a merchant.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/recommendations/reportInteraction
Path parameters
Parameters |
merchantId |
string (int64 format)
Required. The ID of the account that wants to report an interaction.
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"interactionType": enum (InteractionType ),
"responseToken": string,
"type": string,
"subtype": string
} |
Fields |
interactionType |
enum (InteractionType )
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.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
InteractionType
Enum containing values for various types of interactions.
Enums |
INTERACTION_TYPE_UNSPECIFIED |
Default value. If provided, the service will throw ApiError with description "Required parameter: interactionType". |
INTERACTION_DISMISS |
When a recommendation is dismissed. |
INTERACTION_CLICK |
When a recommendation is clicked. |
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\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. |"]]