Update Existing Ad Group
URL: PUT/api/v1/adGroups
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.
- Updating multiple ad groups with different targeting types is supported in Bulk. For example: A single bulk payload can include one ad group update request with keyword targeting and another ad group update request with contextual targeting.
- PUT API requests will overwrite all current values and are not intended to be used as incremental updates like PATCH operations
- You must set all of budgetType, dailyBudget, totalBudget, startDate, endDate, and deliverySpeed parameters at same level i.e. either at campaign level or ad group level
Request Parameters
| Parameters | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| campaignId | ID of the campaign this ad group belongs to | integer | Y | Unique numeric identifier |
| advertiserId | ID of advertiser | integer | Y | Unique numeric identifier |
| adGroupId | The ID of the ad group | integer | Y | Unique numeric identifier |
| name | The name of the ad group | string | Y | Relevant string value representing the ad group |
| startDate | date on which the ad group is set to go live Note: - it must be set either at campaign or ad group level - You can update startDate only for DRAFT and SCHEDULED ad groups - You can not update startDate when ad group is LIVE | date | N | Date should be in format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX Note:
Kindly take these behaviors into consideration when assigning a value to startDate in your request. |
| endDate | The date when ad group ends Note: it must be set either at campaign or ad group level | date | N | Date should be in format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX To run campaign indefinitely, set its value as ‘9999-12-30T00:00:00Z’ Note:
Kindly take these behaviors into consideration when assigning a value to startDate in your request. |
| budgetType | The type of budget allocation you want to choose for your campaign _Note: - it must be set either at campaign or ad group level_ - You can not update budgetType - Ad groups scheduled to run indefinitely must use a daily budget | string | N | Values: - daily - total |
| dailyBudget | Daily budget of ad group Note: - Daily budget cannot exceed your total budget amount - Unspent budget will be rolled over to the next day - Up to 20% of the daily budget can be rolled over to the following day - it must be set either at campaign or ad group level - Ad groups scheduled to run indefinitely must use a daily budget | double | Conditional.This field is required only if: - It is not set at campaign level - budgetType is set to be daily | The value of daily budget should at least be $0.01 |
| totalBudget | Total budget of campaign Note: it must be set either at campaign or ad group level | double | This field is required only if: -It is not set at campaign level -budgetType is set to be total | The value of total budget should at least be $0.01 |
| creativeRotationMode | Specifies the rotation strategy for creatives within an ad group during delivery. Creatives can either be automatically rotated and prioritized based on performance (OPTIMIZE_PERFORMANCE), or distributed evenly with equal weight (ROTATE_EVENLY) | string | N | Enum Values: •OPTIMIZE_PERFORMANCE (Default value) •ROTATE_EVENLY |
| deliverySpeed | Determines pacing of ad delivery _Note: - it must be set either at campaign or ad group level_ - You can update it only for campaigns in DRAFT state - You cannot update deliverySpeed when ad group is LIVE - You can update deliverySpeed only for DRAFT ad groups | string | Conditional. Required only if not set at campaign level. Cannot be changed to campaign level later | Values: - frontloaded - evenly Note: frontloaded pacing is not supported if budgetType is daily |
| frequencyCapDay | The number of times the ad from specific adgroup should be shown to the same user on a daily basis | integer | N | Integer values between 1 and 511 |
| frequencyCapWeek | The number of times the ad from specific adgroup should be shown to the same user on a weekly basis | integer | N | Integer values between 3 and 511 |
| frequencyCapMonth | The number of times the ad from specific adgroup should be shown to the same user on a monthly basis | integer | N | Integer values between 5 and 511 |
| baseBid | starting bid for the ad group | double | N | Value of base bid |
| maxBid | max bid value for the ad group | double | N | Value of max bid |
| targeting | A nested array element with following elements:
Note: only Exact
Note: This is how tiers
Note: 1. In an ad group, geo targeting can be set to one of:
2. You cannot combine different geo-targeting types within a single ad group 3. If Geo targeting is not specified, the default Country (US) level targeting will be applied 4. You can update targeting tactic (contextual, behavioral, keyword, ROS) only when ad group is in DRAFT state 5. IDs with isDisabled = true from POST/api/v1/targeting/list cannot be used for targeting | string | N | The values: • keywords • contextual • behavioral • runOfSite • geoTargets |
Note: You must set all of: budgetType, dailyBudget, totalBudget, startDate, endDate, and deliverySpeed parameters at same level i.e. either at campaign level or ad group level, not both
Updatable Ad Group Metadata Fields
The following table describes fields from the ad group metadata that can be updated using PUT /api/v1/adGroups.
| API Field Name | Display Label in Matrix | Draft | Scheduled | Live | Paused | Complete | Archived | Notes |
|---|---|---|---|---|---|---|---|---|
name | Ad Group Name | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Updatable only if endDate is extended into future |
startDate | Start Date | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | — |
endDate | End Date | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | Can be indefinite only in Draft |
budgetType | Budget Type | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | Immutable |
dailyBudget, totalBudget | Budget (Daily & Total) | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | 1. For evergreen campaigns, only Daily budget supported. 2. Extend endDate to edit if Complete |
deliverySpeed | Delivery Speed | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | Frontloaded pacing not supported if budgetType is daily |
frequencyCapDay, frequencyCapWeek, frequencyCapMonth | Frequency Cap | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Extend endDate if Complete |
baseBid, maxBid | Bids | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Extend endDate if Complete |
targeting.contextual | Targeting Tactic – Contextual | ✅ | Add/Remove | Add/Remove | Add/Remove | ⚠️ | ❌ | 1. Tactic only changeable in Draft. Else you can only add/remove taxonomies. 2. Extend endDate to edit if Complete |
targeting.behavioral | Targeting Tactic – Behavioral | ✅ | Add/Remove | Add/Remove | Add/Remove | ⚠️ | ❌ | 1. Tactic only changeable in Draft. Else you can only add/remove audiences. 2. Extend endDate to edit if Complete |
targeting.keywords | Targeting Tactic – Keywords | ✅ | Add/Remove | Add/Remove | Add/Remove | ⚠️ | ❌ | 1. Tactic only changeable in Draft. Else you can only add/remove keywords. 2. Extend endDate to edit if Complete |
targeting.runOfSite | Targeting Tactic – ROS | ✅ | ❌ | ❌ | ❌ | ⚠️ | ❌ | 1. Tactic only changeable in Draft. 2. Extend endDate to edit if Complete |
targeting.geoTargets | Geo targeting | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Extend endDate if Complete |
creativeRotationMode | Creative rotation mode | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Extend endDate if Complete |
creativeRotationMode | Creative rotation mode | ✅ | ✅ | ✅ | ✅ | ⚠️ | ❌ | Extend endDate if Complete |
attributesSetOnAdGroupLevel | — | — | — | — | — | — | — | Configuration flag; not user-editable |
rateType | Rate Type | — | — | — | — | — | — | Immutable |
creationDate, lastUpdatedDate | — | — | — | — | — | — | — | Metadata only |
If you'd like, I can also:
- Clean this up for inclusion in your standard endpoint template
- Normalize duplicate rows (e.g.,
creativeRotationMode) - Add ✔ / ✖ indicators for clarity
- Export this as
.mdfile format
Sample Request 1 - Update Ad group with Keyword targeting
curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \
--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 '[ { "campaignId": 1, "advertiserId": 1, "adGroupId": 11, "name": "Ad Group 1" , "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "and": [ { "keywords": [ { "keywordText": "test-keyword-1", "matchType": "broad" }, { "keywordText": "test-keyword-2", "matchType": "broad" } ] }, { "not": [ { "keywords": [ { "keywordText": "test-keyword-3", "matchType": "exact" } ] } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] } } ]'
Sample Request 2 - Update Ad group with Contextual targeting
curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --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 '[ {
"campaignId": 1,
"advertiserId": 1,
"adGroupId": 12,
"name": "Ad group 1",
"startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode":"OPTIMIZE_PERFORMANCE", "frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting" : { "and": [ { "contextual": [ { "id": 3452, "reach": "tier_2" }, { "id": 2343, "reach": "tier_3" } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] } }
]'
Sample Request 3 - Update Ad group with Audience targeting
curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --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 '[ {
"campaignId": 1,
"advertiserId": 1,
"adGroupId": 13,
"name": "Ad group 1",
"startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "daily",
"dailyBudget": 500,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"", "frequencyCapDay" : 1,
"frequencyCapWeek" : 3,
"frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting" : { "and": [ { "behavioral": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 243234 } ]
}, { "geoTargets": [ { "id": 123 }, { "id": 134 }, { "id": 1233 } ] } ] } }
]'
Sample Request 4 - Update Ad group with Run of Site targeting
curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --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 ' [ {
"campaignId": 1,
"advertiserId": 1,
"adGroupId": 14,
"name": "Ad group 1",
"startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"", "frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting" : { "and": [ { "runOfSite": true }, { "geoTargets": [ { "zipCode":"35004" } ] } ] } }
]'
Sample Request 5 - Batch operation
curl -X POST \
'https: //developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --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 '[ { "campaignId": 1, "advertiserId": 1, "adGroupId": 11, "name": "Ad group 1", "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "and": [ { "keywords": [ { "keywordText": "test-keyword-1", "matchType": "broad" }, { "keywordText": "test-keyword-2", "matchType": "broad" } ] }, { "not": [ { "keywords": [ { "keywordText": "test-keyword-3", "matchType": "exact" } ] } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] }
},
{ "campaignId": 1, "advertiserId": 1, "name": "Ad group 2", "adGroupId": 12, "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "contextual": [ { "id": 3452, "reach": "tier_2" }, { "id": 2343, "reach": "tier_3" } ] }, { "geoTargets": [ { "zipCode": "35004" } ] } ] }
} ]'
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 the Ad Group being updated | integer |
Sample Response 1
[ { "code": "success", "details": "string", "adGroupId": 11 }
]
Sample Response 2
[ { "code": "success", "details": "string", "adGroupId": 12 }
]
Sample Response 3
[ { "code": "success", "details": "string", "adGroupId": 13 }
]
Sample Response 4
[ { "code": "success", "details": "string", "adGroupId": 14 }
]
Sample Response 5
[ { "code": "success", "details": "string", "adGroupId": 11 }, { "code": "success", "details": "string", "adGroupId": 12 }
]
Updated 9 days ago
