Delete an existing Campaign
Use the Delete Campaign API to delete an SEM campaign with the specified ID. The Campaign's unique Campaign ID is required to delete the campaign. Deleting the campaign will permanently remove it from the system, and all associated data and settings will be lost. The campaign, along with its unique Campaign ID, will no longer be accessible. You can only delete campaigns that are in a scheduled state. For campaigns in a running state, use the Stop Campaign API.
Throttling
Request limits: 5 calls per minute per seller. You may receive an HTTP 429 error if you exceed this limit.
Endpoint
DELETE /v3/advertising/sem/campaigns/{campaignId}
Sample request
curl --location --request DELETE 'https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789' \
--header 'WM_SVC.NAME: Search Engine Marketing' \
--header 'WM_QOS.CORRELATION_ID: 78da31d1-9496-4416-890a-cad3acbf7e26' \
--header 'WM_SEC.ACCESS_TOKEN: **********'
import requests url = 'https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789' headers = { 'WM_SVC.NAME': 'Search Engine Marketing', 'WM_QOS.CORRELATION_ID': '78da31d1-9496-4416-890a-cad3acbf7e26', 'WM_SEC.ACCESS_TOKEN': '**********'
} response = requests.delete(url, headers=headers) print(response.status_code)
print(response.text)
Modify your code
- Replace
123456789
in the URL with the actual campaign ID you want to delete. - Use your unique
WM_QOS.CORRELATION_ID
for each request. - Use your unique
WM_SEC.ACCESS_TOKEN
obtained from the Token API.
Sample response
{
"campaignId": "123456789"
}
Result
The specified campaign will be permanently deleted.
Updated about 12 hours ago