List All the Campaigns
Retrieve a specific campaign or all the campaigns for a specific advertiser.
URL: GET/api/v1/campaigns
Note: It will not return deleted campaigns.
Query Parameters
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
campaignId | The ID of the campaign. It returns a specific campaign in response | integer | N | A valid campaign ID |
advertiserId | The ID of the advertiser. It returns all campaigns run by specific advertiser in response | integer | Y | Advertiser ID for the campaign(s) to be retrieved |
filter[name] | A valid campaign name with which the desired campaign can be searched in the absence of campaign idNote: characters encoding is required for [ and ] | string | N | Provide a campaign name to search the relevant campaign by name instead of campaign Id. |
filter[lastModifiedDate] | Provide a date to fetch only those campaigns which were modified on or after that dateNote: Modified describes any change to campaign set upNote: characters encoding is required for [ and ] | date | N | Date should be in format: yyyy-mm-dd |
Sample Request
curl -X GET \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaigns?campaignId=600001&advertiserId=500003&filter[name]=camp1&filter[lastModifiedDate]=2019-07-03' \
--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'\
Response
Element | Description | Type |
---|---|---|
name | Name of the campaign | string |
campaignType | Type of campaign. Possible values for campaign type:
| string |
targetingType | The targeting type of the campaign is a set of options to create campaigns with different bidding types.Possible values to targeting type are:
| string |
status | Specified status of campaign. Possible status values are:
| |
budgetType | The type of budget allocation chosen for the campaign. Possible values of budgetType are:
| string |
startDate | The date to start campaign | date |
endDate | The date when Campaign ends. It returns value 9999-12-30 if running indefinitely | date |
totalBudget | Total budget of campaign | double |
dailyBudget | Daily budget of campaign | double |
rollover | The indicator to suggest whether the unspent daily budget from the previous day should be carried forward to next day’s daily budget or not. The default and only value of rollover is “true” at present. | boolean |
biddingStrategy | A json object to store the bidding strategy. This stores bidding strategy through the field: strategy The possible values of the strategy field are:
| json |
campaignOptions | List of campaign setting options for a given campaign. Possible campaign setting options (only applicable to Sponsored Search automatic campaigns):
| array |
campaignId | The ID of the campaign | integer |
advertiserId | The ID of the advertiser for whom the campaign is retrieved | integer |
Sample Response
[ { "name": "name1", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "budgetType": "both", "startDate": "2019-07-03", "endDate": "2019-08-03", "totalBudget": 5000, "dailyBudget": 500, "rollover": true, "advertiserId": 600001, "campaignId": 500003, "biddingStrategy": { "strategy": "FIXED" }, "campaignOptions": ["BRAND_TERM_OPT_OUT"] }
]
Updated 12 days ago