Method: recommendations.reportInteraction

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 empty.

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.