Create Report Snapshot
URL: POST /api/v2/snapshot/report
Request Parameters
| Parameter | Description | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | The ID of the advertiser | integer | Y | Unique 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. |
| reportType | The type of the performance report for which the snapshot should be generated. | string | Y | List of Report Types: adGroup, adItem, brand, category, itemHealth,itemKeyword,keyword, pageType, platform, placement, attributedPurchases, searchImpression, videoCampaigns, videoKeywordsThis 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 |
| reportMetrics | Choose the metrics type for your snapshot | string | Y | Not 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. |
| reportDate | The snapshot date for the report. Note:
| date | Y | The 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. |
| startDate | The first day to be considered in the performance report snapshot. Note:
| date | Y | The date should be in yyyy-MM-dd format. |
| endDate | The last day to be considered in the performance report snapshot. Note:
| date | Y | The date should be in yyyy-MM-dd format. |
Notes
- The reports are snapshots at the day level.
POSTandGETrequests made through the Snapshot v2 endpoint will be counted towards Rate Limits- Users can choose which
reportMetricsto query in the request based on which dimensions and metrics are needed.- Both
DimensionsandMetricsare to be requested inreportMetricsparameter. Dimensions help define the level of granularity at which the Metrics are to be retrieved. - Not all
reportMetricsare applicable to allreportTypes. To view the whichreportMetricsare 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
reportMetricsparameter, or the report request will fail.
- Both
- To get report by campaigns, request a snapshot report for
adGroupsand 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 Name | Description | Required | Values |
|---|---|---|---|
| Authorization | The token will provide you the access to the API. It is same for all advertisers you access through the API. | Y | Please utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide |
| WM_CONSUMER.ID | We will provide you the consumer ID to access the API. It is same for all advertisers you access through the API. | Y | Please 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_SIGNATURE | Auth signature as an API key. | Y | Use the signature generator code from Getting Started Guide to generate this value |
| WM_SEC.KEY_VERSION | We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API. | Y | 1 |
| WM_CONSUMER.intimestamp | Timestamp for which the auth signature is generated. Use Unix epoch format for the timestamp. | Y | Use the signature generator code from Getting Started Guide to generate this value |
| Content-Type | Format of the message body | Y | application/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
| Element | Description | Type |
|---|---|---|
| code | The response code can have following values: success, failure | string |
| details | Details of the error if value of response code is failure | string |
| snapshotId | ID of the snapshot | string |
| jobStatus | It 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" }