List All the Ad Groups

Retrieve all the ad group(s) for a specific campaign.

🌐

URL: GET/api/v1/adGroups

Query Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the advertiser for whom the ad group(s) should be returnedintegerYUnique numeric identifier
campaignIdThe ID of the campaign for which the ad group(s) should be returnedintegerNUnique numeric identifier
Filter[name]A valid ad group name with which the desired ad group can be searched in the absence of ad group idstringNProvide an ad group name to search the relevant ad group by name instead of ad group Id.
Filter[lastModifiedDate]Provide a date to fetch only those campaigns which were modified on or after that date Note: Modified here means:
  • If there was any change to the ad group set up
  • If any item or keyword was modified/added/removed for relevant ad group(s)
NDate 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/adGroups?campaignId=600001&advertiserId=500003&filter[name]=AdGroup1&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

ElementDescriptionType
adGroupIdID of the ad groupinteger
nameName of the ad groupstring
statusSpecified status of ad group
Status values:
  • enabled
  • disabled
  • deleted
string
campaignIdID of the campaign associated with the respective ad groupinteger

Sample Response

[ { "adGroupId": 500003, "name": "AdGroup 4", "status": "enabled", "campaignId": 500002 } ]