Overwrite ad group object (PUT)
Learn to replace ad group configurations using PUT and manage update restrictions.
Overview
Update existing Onsite Display ad groups using full-object replacement.
PUT updates use the same request structure as ad group creation. Unlike PATCH updates, PUT replaces the entire ad group object with the version included in the request.
Use PUT when:
- Rebuilding an ad group configuration
- Replacing targeting configuration
- Updating multiple dependent settings together
- Synchronizing from a source-of-truth system
Because PUT replaces the full object, it requires additional validation before submission.
Availability
Supported for Onsite Display only.
How PUT updates work
PUT updates replace the entire ad group object.
Before submitting a PUT request:
- Confirm you're using the latest ad group configuration from List ad groups (/api/v1/adGroups/list)
- Validate:
- Ad group lifecycle state
- Parameter eligibility
- Targeting update restrictions
- Configuration inheritance rules
Some ad group settings become immutable after scheduling or activation.
Full object replacementPUT replaces the entire ad group object. Always retrieve the latest ad group configuration before making updates. Sending an incomplete object may unintentionally overwrite existing values.
PUT update workflow
Retrieve
Retrieve the latest ad group object.
Review
Validate lifecycle state.
Update
Modify the complete object.
Validate
Confirm targeting and inheritance rules.
Submit
Send PUT request.
Review Results
Validate update outcome.
Before you begin
- Valid
advertiserId - Valid
adGroupId - Ad group in an eligible lifecycle state
- Latest ad group configuration retrieved
- Understanding of targeting update restrictions
Endpoint
PUT /api/v1/adGroups
PUT /api/v1/adGroupsRequest details
How this request is used
Use PUT requests to:
- Update ad group metadata
- Adjust budgets and schedules
- Extend ad group duration
- Replace targeting configuration
- Adjust bids and frequency caps
- Modify delivery settings
- Perform bulk ad group updates
- Synchronize external system updates
Ad group field update eligibility
| Field | Draft | Scheduled | Live | Paused | Completed |
|---|---|---|---|---|---|
name | ✅ | ✅ | ✅ | ✅ | ⚠️ |
startDate* | ✅ | ✅ | ❌ | ❌ | ❌ |
endDate* (Set end date) | ✅ | ✅ | ✅ | ✅ | ✅ |
budgetType* | ✅ | ❌ | ❌ | ❌ | ❌ |
dailyBudget* | ✅ | ✅ | ✅ | ✅ | ⚠️ |
totalBudget* | ✅ | ✅ | ✅ | ✅ | ⚠️ |
deliverySpeed* | ✅ | ❌ | ❌ | ❌ | ❌ |
frequencyCapDay,frequencyCapWeek,frequencyCapMonth | ✅ | ✅ | ✅ | ✅ | ⚠️ |
baseBid,maxBid | ✅ | ✅ | ✅ | ✅ | ⚠️ |
targeting.behavioraltargeting.contextualtargeting.keywords | ✅ | Add or remove IDs, keywords | Add or remove IDs, keywords | Add or remove IDs, keywords | ⚠️ |
targeting.runOfSite | ✅ | ❌ | ❌ | ❌ | ⚠️ |
targeting.geoTargets | ✅ | ✅ | ✅ | ✅ | ⚠️ |
creativeRotationMode | ✅ | ✅ | ✅ | ✅ | ⚠️ |
attributesSetOnAdGroupLevel | ❌ | ❌ | ❌ | ❌ | ❌ |
outOfStockProtection | ✅ | ✅ | ✅ | ✅ | ⚠️ |
*Can only be updated if configured at the ad-group level during ad group creation.
-
✅ = field can be updated
-
❌= field cannot be updated
-
⚠️= limited update support available
- extend
endDateto edit if status = completed
- extend
Targeting update rules
Targeting tactic immutabilityOnce an ad group is created, the targeting tactic type cannot be changed.
Important targeting behavior
- Targeting tactic type cannot be changed after scheduling
- Geotargeting can still be updated when the targeting tactic remains unchanged
- If targeting ID
isDisabled=truethen you should not try to use this target - Negative keyword targeting supports only
matchType=exact - Exclusion/negative targeting can only be used for behavioral and keyword tactics
For more details on targeting objects, see Targeting object overview.
Allowed updates
- Updating targeting IDs within the same tactic
- Updating keyword lists
- Updating contextual IDs
- Updating geotargeting
- Updating frequency caps
- Updating bids
Not Allowed
- Changing targeting tactics after scheduling (e.g. Behavioral → Keyword, Keyword → Behavioral, or Contextual → Run of Site)
- Moving budget configuration levels after scheduling
Configuration inheritance rules
Budget, schedule, and delivery settings must remain configured entirely at either the campaign level or ad group level.
The following fields always remain grouped together:
budgetTypedailyBudgettotalBudgetstartDateendDatedeliverySpeed
Configuration ruleAttempting to move these settings from campaign-level configuration to ad-group-level configuration (or vice versa) results in validation failures.
For complete details, see Campaign vs Ad Group Configuration Rules.
Batch update behavior
This endpoint supports batch operations.
Each ad group update is processed independently.
Batch requests:
- Are not transactional
- May partially succeed
- Return per-object success or failure results
- Support up to 10 ad groups per request
- Require a consistent
advertiserId
See the Batch Requests Guide for complete retry and partial-success guidance.
Sample requests
Expression-based and flattened targeting supportThis endpoint supports both expression-based and flattened targeting structure. Only one of expression based or flattened structure should be used in a request. Review the Targeting object guide to learn more.
Behavioral targeting with expression-based targeting structure
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,
"maxBid" : 0.5,
"outOfStockProtection": false,
"targeting": { "and": [ { "and": [ { "behavioral": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 243234 } ] }, { "not": [ { "behavioral": [ { "audienceType": "retail" "attribute": "historical", "id": 2432345 } ] } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ]
} }
]'Behavioral targeting with flattened targeting structure
curl -X PUT \
'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,
"maxBid" : 0.5, "outOfStockProtection": true,
"targeting": { "behavioral": { "include": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 234 } ], "exclude": [ { "audienceType": "retail", "attribute": "historical", "id": 123 }, { "audienceType": "retail", "attribute": "historical", "id": 111 } ] }, "geoTargets": { "include": [ { "id": 123 }, { "id": 234 } ] } }
}
]'Update multiple ad groups
curl -X PUT \
'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, "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, "maxBid": 0.5, "targeting": { "and": [ { "contextual": [ { "id": 3452, "reach": "tier_2" }, { "id": 2343, "reach": "tier_3" } ] }, { "geoTargets": [ { "zipCode": "35004" } ] } ] }
} ]'Response details
What this response returns
The response confirms whether each ad group update succeeded or failed.
Batch requests return one response object per ad group.
Key fields to use
-
adGroupId
Unique ad group identifier associated with the update result. -
code
Overall operation result (success,failure) -
details
Validation messages, processing feedback, or failure details. -
message
Optional. High-level, human-readable summary of the error when available. -
errors
Detailed information about one or more errors. This is an array object with fields:field,errorType,description
Error Handling
If the request or an individual item fails, the response includes error information to help identify the issue and determine the corrective action. Use errorType for the error condition, field for the affected request field when applicable, and description for an explanation of the error and, when available, guidance on how to resolve it.
For the complete error response schema and endpoint-specific response definitions, see the API Reference. For guidance on HTTP status codes and how clients should handle them, see API status codes and error handling.
How to interpret results
Successful updates
A successful response confirms the ad group object was updated successfully.
Batch operations
Batch requests may contain both successful and failed updates.
Always validate results at the individual ad group level.
Sample responses
Single ad group update
[ { "code": "success", "details": "string", "adGroupId": 11 }
]Batch operation
[ { "code": "success", "details": "string", "adGroupId": 11, "message": "string", "errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}, { "code": "failure", "details": ["string"], "adGroupId": 12, "message": "string",
"errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}
]Sample response - failure
[ { "code": "failure", "details": [ "string" ], "message": "string",
"errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }
]Common issues
- Not using the latest ad group configuration
- Sending partial objects in PUT requests
- Attempting to change targeting tactics after scheduling
- Updating immutable fields
- Updating budget at the wrong configuration level
- Forgetting to extend
endDatebefore editing completed ad groups - Using targeting IDs where
isDisabled=true
What happens next
After updating ad groups:
- Store updated ad group metadata
- Review validation results
- Re-sync partner interfaces if needed
- Continue creative association workflows
- Revalidate targeting configuration where applicable
Related pages
Updated 27 days ago
