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 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 |
| Content-Type | application/json | Y | n/a |
| 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 |
Request Parameters
| Parameters | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | ID of advertiser | integer | Y | Advertiser ID for which the ad group needs to be updated for delivery status |
| adGroupId | ID of the ad group requiring updates to its delivery status | integer | Y | Unique numeric identifier |
| action | Delivery activation status Only ad groups in DRAFT state, that have never gone live or scheduled to go live previously can be ARCHIVED | string | Y | • PAUSE• 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
| Element | Description | Type |
|---|---|---|
| code | The response code can have following values:
Click here for more information about Status Codes and Errors | string |
| details | Details will populate success or error message depending upon value of code | string |
| adGroupId | ID of ad group with recently changed delivery status | integer |
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 }
] Updated 10 days ago
