curl --location --request POST 'https://www.amazon.com/ap/oa/sb/beta/adGroups/delete' \
--header 'Amazon-Advertising-API-ClientId: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Amazon-Advertising-API-Scope: {{profileId}}' \
--header 'Accept: application/vnd.sbadgroupresource.v4+json' \
--header 'Content-Type: text/plain' \
--data-raw '{
"adGroupIdFilter": {
"include": [
"{{adGroupId}}"
]
}
}'
{
"adGroups": {
"error": [],
"success": [
{
"adGroup": {
"adGroupId": "236888139321097",
"campaignId": "50253512169230",
"extendedData": {
"creationDate": 1664994599715,
"lastUpdateDate": 1664995057306,
"servingStatus": "CAMPAIGN_PAUSED"
},
"name": "Test ad group",
"state": "ARCHIVED"
},
"adGroupId": "236888139321097",
"index": 0
}
]
}
}