v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-131541,3491.5 MB
customers

Generates Recommendations based off the requested recommendation_types. List of thrown errors: AuthenticationError AuthorizationError HeaderError InternalError QuotaError RecommendationError RequestError

post/v23/customers/{+customerId}/recommendations:generate

Path parameters

customerIdstring required

Required. The ID of the customer generating recommendations.

Request body

isNewCustomerboolean

Optional. Whether or not this customer should be treated as a "new" customer (that is, a customer who has not yet created a campaign). Setting this to true will cause the backend to generate recommendations using a dedicated recommendation model for onboarding new customers, as opposed to the default model for existing customers. This is only recommended for customers with 0 campaigns. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

languageCodesstring[]

Optional. Current campaign language codes. This field is required for the following recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

conversionTrackingStatus'UNSPECIFIED' | 'UNKNOWN' | 'NOT_CONVERSION_TRACKED' | 'CONVERSION_TRACKING_MANAGED_BY_SELF' | 'CONVERSION_TRACKING_MANAGED_BY_THIS_MANAGER' | 'CONVERSION_TRACKING_MANAGED_BY_ANOTHER_MANAGER'

Optional. Current conversion tracking status. This field is necessary for the following recommendation_types: MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

targetContentNetworkboolean

Optional. If true, the campaign is opted into serving ads on specified placements in the Google Display Network. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

positiveLocationsIdsstring[]

Optional. Current campaign positive location ids. One of this field OR negative_location_ids is required for the following recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

targetPartnerSearchNetworkboolean

Optional. If true, the campaign is opted into serving ads on the Google Partner Network. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

campaignSitelinkCountinteger

Optional. Number of sitelinks on the campaign. This field is necessary for the following recommendation_types: SITELINK_ASSET

campaignImageAssetCountinteger

Optional. Current campaign image asset count. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

merchantCenterAccountIdstring int64

Optional. Merchant Center account ID. This field should only be set when advertising_channel_type is PERFORMANCE_MAX. Setting this field causes RecommendationService to generate recommendations for Performance Max for retail instead of standard Performance Max. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

campaignCallAssetCountinteger

Optional. Current campaign call asset count. This field is optional for the following recommendation_types: CAMPAIGN_BUDGET

recommendationTypesstring[]

Required. List of eligible recommendation_types to generate. If the uploaded criteria isn't sufficient to make a recommendation, or the campaign is already in the recommended state, no recommendation will be returned for that type. Generally, a recommendation is returned if all required fields for that recommendation_type are uploaded, but there are cases where this is still not sufficient. The following recommendation_types are supported for recommendation generation: KEYWORD, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, SITELINK_ASSET, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

countryCodesstring[]

Optional. Current campaign country codes. This field is required for the following recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

advertisingChannelType'UNSPECIFIED' | 'UNKNOWN' | 'SEARCH' | 'DISPLAY' | 'SHOPPING' | 'HOTEL' | 'VIDEO' | 'MULTI_CHANNEL' | 'LOCAL' | 'SMART' | 'PERFORMANCE_MAX' | 'LOCAL_SERVICES' | 'TRAVEL' | 'DEMAND_GEN' | 'SOCIAL'

Required. Advertising channel type of the campaign. The following advertising_channel_types are supported for recommendation generation: PERFORMANCE_MAX and SEARCH

negativeLocationsIdsstring[]

Optional. Current campaign negative location ids. One of this field OR positive_location_ids is required for the following recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

Response

Successful response