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.

Rate limits

If you submit too many feeds in a short period of time, you may exceed Walmart’s rate limits and receive HTTP 429 (Too Many Requests) responses. For more details on throttling and best practices, refer to the Rate Limiting Guide.

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

  1. Replace 123456789 in the URL with the actual campaign ID you want to delete.
  2. Use your unique WM_QOS.CORRELATION_ID for each request.
  3. Use your unique WM_SEC.ACCESS_TOKEN obtained from the Token API.

Sample response

{
"campaignId": "123456789"
}

Result

The specified campaign will be permanently deleted.