Create Campaign Recommendations Request

Campaign Recommendations endpoint will provide recommendations on eligible campaigns for a particular recommendationType. Currently, we support Target ROAS recommendation type.

📘

URL: POST /api/v2/snapshot/recommendations

Request Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the advertiserintegerYUnique numeric identifier for the advertiser. This is the advertising account id. This parameter can take only one advertiser Id for each snapshot report request.
recommendationTypeThe type of the recommendation requiredstringYValues of recommendation type: targetROAS
outOfBudget
formatChoose the format type for your snapshotstringYTypes of formats: gzip. Note: gzip allows decompression while file is being transferred over the network, hence it is a faster and simpler way to download the reports
reportMetricsList of report metrics to be displayed for the selected recommendation reportarray YPlease see the following tables for possible report metrics

TROAS Metrics

ElementDescriptionData TypeRequiredPossible Values
reportDateThe snapshot date for the report.dateYThe date should be in “yyyy-MM-dd” format. This parameter can take only one report date for the last 90 days for each snapshot report request.
campaignIdThe Id of the campaignIntegerYUnique ID for the given campaign.
recommendedTargetROASRecommended Target ROAS valuefloatYThe recommendation value can be between 1 and 31.27.
troasRecommendedDailyBudgetThe recommended daily budget to set for the campaign to help maximize sales at the suggested ROAS targetfloatNWe recommend passing this value to obtain target ROAS budget
troasIncrementalSalesLowerThe lower range of the potential incremental sales we predict your campaign can generate if you update your campaigns with our recommendation following the learning phasefloatNWe recommend passing this value
troasIncrementalSalesUpperThe upper range of the potential incremental sales we predict your campaign can generate if you update your campaigns with our recommendation following the learning phasefloatNWe recommend passing this value
troasRecommendationIdRecommendation id for the target ROAS recommendationstringNWe highly recommend passing troasRecommendationId in the report metrics

Out of Budget Metrics

ElementDescriptionData TypeRequiredPossible Values
startDateThe start date for the report.dateYThe date should be in “yyyy-MM-dd” format.
endDateThe end date for the reportdateYThe date should be in “yyyy-MM-dd” format.
campaignIdThe Id of the campaignintegerYUnique ID for the given campaign.
budgetTypeThe budget type of the campaignstringNdaily
total
both
missedClicksLowerThis field provides cumulative lower range of missed clicks over last 7 days for a campaign which went out of budget (OOB) for T-1 timeintegerN
missedClicksUpperThis field provides cumulative upper range of missed clicks over last 7 days for a campaign which went out of budget (OOB) for T-1 timeintegerN
missedImpressionsLowerThis field will provide cumulative lower range of missed impressions over last 7 days for a campaign which went out of budget (OOB) for T-1 timeintegerN
missedImpressionUpperThis field will provide cumulative upper range of missed impressions over last 7 days for a campaign which went out of budget (OOB) for T-1 timeintegerN
avgCapOutTimeThe average cap out time is the average time for which the campaign went out of budget in the last 7 days. This value is represented in military time e.g. 1000 refers to 10 AM.integerN

Notes on the Out of Budget Recommendations Report

This report offers insights on aggregated missed opportunities (clicks and impressions) for last 7 days for campaign(s) which went out of budget for T-1 time and provides latest daily and/or total budget recommendations so that you can update the budget recommendations to avoid campaign(s) going Out of Budget (OOB).

  • The outOfBudgetreport provides cumulative missed impressions and clicks for last 7 days for any campaign(s) which went out of budget (OOB) for T-1 time for an advertiser account. This means if you request a report today and if the campaign went OOB yesterday, you would see cumulative missed impressions and clicks for last 7 days.
    Note:
    • Significance of T-1 time : If you request a report today, you will receive recommendations for any campaign which went out of budget yesterday.
    • The daily and/or total budget recommendation will be latest and not cumulative for last 7 days.
    • If the campaign(s) did not go OOB for T-1 time and does not have any recommendations, the report will not show the entry for those campaign(s). This means if you request a report today, those campaigns that didn’t go OOB yesterday, will not be listed in the report.
  • For this report, startDate, endDate campaignId are mandatory parameters in thereportMetrics object.
  • The outOfBudget report will only provide latest daily and/or total budget recommendations and not cumulative for the last 7 days period for any campaign(s) which went OOB for T-1 time for an advertiser account. This means if you request a report today and if the campaign went OOB yesterday, you would see the latest daily and/or total budget recommendations. Use these budget recommendations to update your campaign(s) to ensure the campaign(s) do not go out of budget.
  • If the campaign has only a daily budget set, the total budget recommendation will be null if requested in the report metrics. Likewise, if the campaign has only a total budget set, the daily budget recommendation will be null if requested.
  • This report will also provide average cap out time, such as the average time (in 24-hour time format) in the event of the campaign going OOB in last 7 days as applicable.
  • This report type is advertiser account based and will list missed opportunities and latest budget recommendations for all campaign(s) belonging to the advertiser account which went OOB for T-1 time.
  • The lookback window for this report is 7 days.
  • For any reason, if missed clicks and impressions are missing whereas budget recommendations exist, then missed clicks and impressions will be null.
  • For any reason, if average cap out time is missing whereas budget recommendations exist, then average cap out time will be null.
  • Our model calculates the missed opportunities and budget recommendations once every 24 hours for OOB campaigns. This feature is in beta phase but available to be used for all advertising accounts while we continue to iterate on our model.

Sample Request

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v2/snapshot/recommendations' \ --header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--header 'Content-Type: application/json' \ --data '{ "advertiserId": 600001, "recommendationType": "targetROAS", "format": "gzip", "reportMetrics": [ "reportDate", "campaignId", "recommendedTargetROAS" ] }' 

Sample Request 2

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v2/snapshot/recommendations' \ --header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--header 'Content-Type: application/json' \ --data '{ "advertiserId": 600001, "recommendationType": "targetROAS", "format": "gzip", "reportMetrics": [ "reportDate", "campaignId", "recommendedTargetROAS", "troasRecommendationId", "troasRecommendedDailyBudget", "troasIncrementalSalesLower", "troasIncrementalSalesUpper" ] }'

Sample Request 3

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v2/snapshot/recommendations' \ --header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--header 'Content-Type: application/json' \ --data '{ "advertiserId": 600001, "recommendationType": "outOfBudget", "format": "gzip", "reportMetrics": [ "startDate", "endDate", "campaignId", "budgetType", "missedClicksLower", "missedClicksUpper", "missedImpressionsLower", "missedImpressionsUpper", "avgCapOutTime" ] }'