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.
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
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 | 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.
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 | Format of the message body | Y | application/json |
| WM_CONSUMER.ID | Unique ID for consumer. 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 | Signature for authentication | Y | Use the signature generator code from Getting Started Guide to generate this value |
| WM_SEC.KEY_VERSION | 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 |
Sample Request 1 - Update the status of an ad group
curl --request 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: *************' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '[ { "advertiserId": 1, "adGroupId": 1, "action": "pause" } ]'Sample Request 2 - Update the status of multiple ad groups
curl --request 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: *************' \ --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
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| code | The response code can have following values:
Click here for more information about Status Codes and Errors | N | string | success, failure |
| details | List of error codes associated with the request. Use these codes for programmatic error handling. | N | array | Refer to this link for detailed error messages |
| adGroupId | ID of the Ad Group. | Y | integer | |
| message | High-level summary of the error, when available. | Y | string | |
| errors | Detailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description. | Y | array<object> |
errors Array Object Details
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| field | JSON field associated with the error. Omitted if the error applies to the request as a whole. | Y | string | |
| errorType | Machine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic. | N | string | |
| description | Human-readable explanation of the error, including why the request failed and, when possible, how to resolve it | N | string |
Sample Response 1 Success - Update the Status of an Ad Group
[ { "code": "success", "details": ["string"], "adGroupId": 1 }
]Sample Response 1 Failure - Update the Status of an Ad Group
[ { "code": "failure", "details": ["string"], "adGroupId": 1, "message": "string",
"errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }
]Sample Response 2 Success - Update the Status of Multiple Ad Groups
[ { "code": "success", "details": ["string"], "adGroupId": 1 }, { "code": "success", "details": ["string"], "adGroupId": 2 }, { "code": "success", "details": ["string"], "adGroupId": 3 }, { "code": "success", "details": ["string"], "adGroupId": 4 }
]Sample Response 2 Failure - Update the Status of Multiple Ad Groups
[ { "code": "failure", "details": ["string"], "adGroupId": 1, "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}, { "code": "failure", "details": ["string"], "adGroupId": 2, "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}, { "code": "failure", "details": ["string"], "adGroupId": 3, "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}, { "code": "failure", "details": ["string"], "adGroupId": 4, "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}
]Updated 1 day ago
