Stop a running Campaign
Use the Stop Campaign API to stop an active SEM campaign with the specified Campaign ID. The unique Campaign ID is required to stop the campaign. Stopping a campaign does not delete it but deactivates it, preventing any further advertising spend or activity associated with it.
Throttling
Request limits: 5 calls per minute per seller. You may receive an HTTP 429 error if you exceed this limit.
Endpoint
PUT /v3/advertising/sem/campaigns/{campaignId}/stop
Sample request
curl --location --request PUT 'https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789/stop' \
--header 'WM_SVC.NAME: Search Engine Marketing' \
--header 'WM_QOS.CORRELATION_ID: 6918922b-0c54-4c80-b21a-b6ba4854582c' \
--header 'WM_SEC.ACCESS_TOKEN: **********'
import requests url = "https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789/stop" headers = { "WM_SVC.NAME": "Search Engine Marketing", "WM_QOS.CORRELATION_ID": "6918922b-0c54-4c80-b21a-b6ba4854582c", "WM_SEC.ACCESS_TOKEN": "**********" # Replace with your actual access token
} response = requests.put(url, headers=headers) print(response.status_code)
print(response.json())
Modify your code
- Replace
123456789
in the URL with the actual campaign ID you want to stop. - 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 stopped and will no longer be active.
Updated about 17 hours ago