Update Ad Group Delivery Status

This API allows advertisers to update the delivery status of one or more ad groups by performing actions like PAUSE, RESUME, ARCHIVE, or UNARCHIVE.

📘

URL: PUT/api/v1/adGroups/action

Note: This API supports batch operations with a max batch size of 10. For bulk operation, the advertiserId must be the same across all requests in the payload

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
Content-Typeapplication/jsonYn/a
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

Request Parameters

ParametersNotesTypeRequiredPossible Values
advertiserIdID of advertiser integerYAdvertiser ID for which the ad group needs to be updated for delivery status
adGroupIdID of the ad group requiring updates to its delivery statusintegerYUnique numeric identifier
actionDelivery activation status

Only ad groups in DRAFT state, that have never gone live or scheduled to go live previously can be ARCHIVED
stringYPAUSE
RESUME
ARCHIVE
UNARCHIVE

Action Constraints

ARCHIVE: Only allowed if ad group is in DRAFT and never went live. 

UNARCHIVE: Allowed only if the ad group was previously archived. The ad group returns to DRAFT.

PAUSE: Applicable to LIVE ad groups only. Attempting to pause an already paused ad group has no effect and returns a success response.

RESUME: Applicable to PAUSED ad groups only. Attempting to resume an already live ad group has no effect and returns a success response.

Sample Request 1 - Update the status of an ad group

curl -X PUT \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups/action' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>'
--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": 1, "adGroupId": 1, "action": "pause" } ]'

Sample Request 2 - Update the status of multiple ad groups

curl -X PUT \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups/action' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>'
--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": 1, "adGroupId": 1, "action": "pause" }, { "advertiserId": 1, "adGroupId": 2, "action": "resume" }, { "advertiserId": 1, "adGroupId": 3, "action": "archive" }, { "advertiserId": 1, "adGroupId": 4, "action": "unarchive" }
]' 

Response

ElementDescriptionType
codeThe response code can have following values:
  • success
  • failure

Click here for more information about Status Codes and Errors
string
detailsDetails will populate success or error message depending upon value of codestring
adGroupIdID of ad group with recently changed delivery statusinteger

Sample Response 1

[ { "code": "success", "details": ["string"], "adGroupId": 1 }
] 

Sample Response 2

[ { "code": "success", "details": ["string"], "adGroupId": 1 },
{ "code": "success", "details": ["string"], "adGroupId": 2 },
{ "code": "failure", "details": ["string"], "adGroupId": 3 },
{ "code": "success", "details": ["string"], "adGroupId": 4 }
]