- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Recommendation
- Description
- DescriptionType
- CallToAction
- Creative
- CreativeType
- Try it!
Generates recommendations for a merchant.
HTTP request
GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/recommendations/generate
Path parameters
Parameters | |
---|---|
merchantId |
Required. The ID of the account to fetch recommendations for. |
Query parameters
Parameters | |
---|---|
languageCode |
Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with "localized". This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi |
allowedTag[] |
Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND |
Request body
The request body must be empty.
Response body
Response containing generated recommendations.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"recommendations": [
{
object ( |
Fields | |
---|---|
recommendations[] |
Recommendations generated for a request. |
responseToken |
Output only. Response token is a string created for each |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
Recommendation
Recommendations are suggested ways to improve your merchant account's performance. For example, to engage with a feature, or start using a new Google product.
JSON representation |
---|
{ "type": string, "additionalDescriptions": [ { object ( |
Fields | |
---|---|
type |
Output only. Type of the recommendation. List of currently available recommendation types:
|
additionalDescriptions[] |
Output only. List of additional localized descriptions for a recommendation. Localication uses the |
defaultCallToAction |
Optional. Default CTA of the recommendation. |
additionalCallToAction[] |
Output only. CTAs of this recommendation. Repeated. |
creative[] |
Output only. Any creatives attached to the recommendation. Repeated. |
subType |
Optional. Subtype of the recommendations. Only applicable when multiple recommendations can be generated per type, and is used as an identifier of recommendation under the same recommendation type. |
recommendationName |
Optional. Localized recommendation name. The localization uses the {@link |
title |
Optional. Localized Recommendation Title. Localization uses the {@link |
defaultDescription |
Optional. Localized recommendation description. The localization the {@link |
paid |
Optional. Indicates whether a user needs to pay when they complete the user journey suggested by the recommendation. |
numericalImpact |
Optional. A numerical score of the impact from the recommendation's description. For example, a recommendation might suggest an upward trend in sales for a certain product. Higher number means larger impact. |
Description
Google-provided description for the recommendation.
JSON representation |
---|
{
"text": string,
"type": enum ( |
Fields | |
---|---|
text |
Output only. Text of the description. |
type |
Output only. Type of the description. |
DescriptionType
Enum specifying type of the description.
Enums | |
---|---|
DESCRIPTION_TYPE_UNSPECIFIED |
Default value. Will never be provided by the API. |
SHORT |
Short description. |
LONG |
Long description. |
CallToAction
Call to action (CTA) that explains how a merchant can implement this recommendation
JSON representation |
---|
{ "localizedText": string, "intent": string, "uri": string } |
Fields | |
---|---|
localizedText |
Output only. Localized text of the CTA. Optional. |
intent |
Output only. Intent of the action. This value describes the intent (for example, Currently available intent values:
|
uri |
Optional. URL of the CTA. This field will only be set for some recommendations where there is a suggested landing URL. Otherwise it will be set to an empty string. We recommend developers to use their own custom landing page according to the description of the intent field above when this uri field is empty. |
Creative
Creative is a multimedia attachment to recommendation that can be used on the frontend.
JSON representation |
---|
{
"uri": string,
"type": enum ( |
Fields | |
---|---|
uri |
URL of the creative. |
type |
Type of the creative. |
CreativeType
Enum containing possible values of creative type.
Enums | |
---|---|
CREATIVE_TYPE_UNSPECIFIED |
Default value. If provided, shall be considered invalid. |
VIDEO |
Video creatives. |
PHOTO |
Photo creatives. |