Create Report Snapshot

📘

URL: POST /api/v2/snapshot/report

Request Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the advertiserintegerYUnique numeric identifier for the advertiser. This is the advertising account id.Note: This parameter can take only one advertiser Id for each snapshot report request.
reportTypeThe type of the performance report for which the snapshot should be generated.stringYList of Report Types: adGroup, adItem, brand, category, itemHealth,itemKeyword,keyword, pageType, platform, placement, attributedPurchases, searchImpression, videoCampaigns, videoKeywords

This parameter accepts one report type among the above possible report types in each snapshot report request. For a full description of each report type, go to Retrievable Snapshot v2 Report Definitions.

Note: The outOfBudgetRecommendations report has been deprecated and replaced by the outOfBudget recommendation report in the Campaign Recommendations API: Create Campaign Recommendations
reportMetricsChoose the metrics type for your snapshotstringYNot all metrics are applicable to all report types. Each report requires at least one dimension to be included in the ‘reportMetrics’ parameter or else the report request will fail. This parameter can take one or more than one report metric among the possible report metrics in each snapshot report request.

For the full description of report metrics, go to Parameters Generated by Snapshot Reports v2 and Eligible Metrics and Dimensions by Report Type.
reportDateThe snapshot date for the report. Note:
  • To fetch reports , please use eitherreportDate, or combination of startDate and endDate. Using both together will result in an error. However, at least one of these must be defined.
  • reportDate must not be defined for the following report types or the request will cause an error:
    • searchImpression
    • itemHealth
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.
startDateThe first day to be considered in the performance report snapshot. Note:
  • To fetch reports , please use either reportDate or combination of startDate and endDate Using both together will result in an error.
  • It cannot be the current date
  • startDate must not be defined for the following report types or the request will cause an error:
    • itemHealth
dateYThe date should be in yyyy-MM-dd format.
endDateThe last day to be considered in the performance report snapshot. Note:
  • To fetch reports , please use eitherreportDate or combination of startDate and endDate. Using both together will result in an error.
  • It cannot be the current date
  • startDate must not be defined for the following report types or the request will cause an error:
    • itemHealth
dateYThe date should be in yyyy-MM-dd format.

Notes

  • The reports are snapshots at the day level.
  • POST and GET requests made through the Snapshot v2 endpoint will be counted towards Rate Limits
  • Users can choose which reportMetrics to query in the request based on which dimensions and metrics are needed.
    • Both Dimensions and Metrics are to be requested in reportMetrics parameter. Dimensions help define the level of granularity at which the Metrics are to be retrieved.
    • Not all reportMetrics are applicable to all reportTypes. To view the which reportMetrics are applicable to a given report, go to Eligible Metrics and Dimensions by Report Type.
    • Each report requires at least one dimension to be included in the reportMetrics parameter, or the report request will fail.
  • To get report by campaigns, request a snapshot report for adGroups and use the campaign IDs returned in the report to aggregate the report by campaigns.
  • Reports are delivered in CSV format and enclosed in “gzip” file format by default.

Headers

Header NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information
WM_SEC.AUTH_SIGNATUREAuth signature as an API key.YUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API.Y1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestamp.YUse the signature generator code from Getting Started Guide to generate this value
Content-TypeFormat of the message bodyYapplication/json

Sample Request for Keyword Report

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v2/snapshot/report' \ --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' \ --data '
{ "advertiserId": 600001, "reportDate": "2022-12-10", "reportType": "keyword", "reportMetrics": [ "date", "keywordId", "searchedKeyword", "biddedKeyword", "matchType", "campaignId", "adGroupId", "ntbUnits3days", "ntbOrders3days", "ntbRevenue3days", "ntbUnits14days", "ntbOrders14days", "ntbRevenue14days", "ntbUnits30days", "ntbOrders30days", "ntbRevenue30days", "numAdsShown", "numAdsClicks", "adSpend", "advertisedSkuSales3days", "advertisedSkuSales14days", "advertisedSkuSales30days", "attributedUnits3days", "attributedUnits14days", "attributedUnits30days", "otherSkuSales3days", "otherSkuSales14days", "otherSkuSales30days", "attributedOrders3days", "attributedOrders14days", "attributedOrders30days", "advertisedAddToCart3days", "advertisedAddToCart14days", "advertisedAddToCart30days", "otherAddToCart3days", "otherAddToCart14days", "otherAddToCart30days", "advertisedProductDetailPageViews3days", "advertisedProductDetailPageViews14days", "advertisedProductDetailPageViews30days", "otherProductDetailPageViews3days", "otherProductDetailPageViews14days", "otherProductDetailPageViews30days", "inStoreAdvertisedSales3days", "inStoreAdvertisedSales14days", "inStoreAdvertisedSales30days", "inStoreOrders3days", "inStoreOrders14days", "inStoreOrders30days", "inStoreUnitsSold3days", "inStoreUnitsSold14days", "inStoreUnitsSold30days", "inStoreOtherSales3days", "inStoreOtherSales14days", "inStoreOtherSales30days" ]
}'

Response

ElementDescriptionType
codeThe response code can have following values:   success, failurestring
detailsDetails of the error if value of response code is failurestring
snapshotIdID of the snapshotstring
jobStatusIt is an indicator to confirm status of snapshot generation.
The possible values of jobStatus are: pending, processing, done, failed, expired
string

Sample Response

 { "code": "success", "snapshotId": "10", "details": "", "jobStatus": "pending" }