Update an existing Campaign
Use the Update Campaign API to update the details of an existing SEM campaign with the specified Campaign ID. The unique Campaign ID is required to make the updates. You can update details such as the campaign name, start and end dates, daily budget, total budget, and target return on ad spend (RoAS) in the request. For campaigns scheduled in future dates, the start date can be updated; for running campaigns, the API will throw an exception.
Additionally, you can add new SKUs and remove existing SKUs.from the campaign. The specified updates will be applied while preserving the unique Campaign ID.
Updates may take up to 20 seconds to fully propagate across Walmart Marketplace systems. Avoid sending another request immediately after an update, as results may not yet reflect the latest changes.
We recommend waiting at least 20 seconds before making subsequent calls to verify or update related data.
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
PUT /v3/advertising/sem/campaigns/{campaignId}
Sample request
Use this example as a starting point, then modify it with your actual values and any additional parameters described in the API reference.
curl --location --request PUT 'https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789' \
--header 'WM_SVC.NAME: Search Engine Marketing' \
--header 'WM_QOS.CORRELATION_ID: ca86e7aa-3166-4f8b-8148-83d38564e9b9' \
--header 'WM_SEC.ACCESS_TOKEN: **********' \
--header 'Content-Type: application/json' \
--data '{ "metadata": { "name": "Valentines Day Campaign", "startDate": "2025-02-01", "endDate": "2025-02-28", "dailyBudget": 100.0, "totalBudget": 2000.0, "targetRoas": 3.5 }, "itemsOperations": [ { "operationType": "ADD", "skus": [ "sku_07148487515983_test" ] }, { "operationType": "REMOVE", "skus": [ "sku_00993001888299_test" ] } ]
}'
import requests url = "https://marketplace.walmartapis.com/v3/advertising/sem/campaigns/123456789" headers = { "WM_SVC.NAME": "Search Engine Marketing", "WM_QOS.CORRELATION_ID": "ca86e7aa-3166-4f8b-8148-83d38564e9b9", "WM_SEC.ACCESS_TOKEN": "**********", # Replace with your actual access token "Content-Type": "application/json"
} data = { "metadata": { "name": "Valentines Day Campaign", "startDate": "2025-02-01", "endDate": "2025-02-28", "dailyBudget": 100.0, "totalBudget": 2000.0, "targetRoas": 3.5 }, "itemsOperations": [ { "operationType": "ADD", "skus": ["sku_07148487515983_test"] }, { "operationType": "REMOVE", "skus": ["sku_00993001888299_test"] } ]
} response = requests.put(url, headers=headers, json=data) print(response.status_code)
print(response.json())
Modify your code
-
Replace
123456789in the URL with the actual campaign ID you want to modify. -
Use your unique
WM_QOS.CORRELATION_IDfor each request. -
Use your unique
WM_SEC.ACCESS_TOKENobtained from the Token API. -
Optionally, you can update these parameters:
name- Set this to a campaign name of your choice.startDate- Enter your campaign start date in yyyy-MM-dd format.endDate- Enter your campaign end date in yyyy-MM-dd format. If left blank, the endDate defaults to 9999-12-30 .dailyBudget- Specify the daily amount allocated for the campaign. Daily budget is required and must be between $5 and $2,500.totalBudget- Specify the total amount allocated for the campaign. If left blank, no total budget will be set, as this field is optional. The total budget must be greater than or equal to the daily budget.targetRoas- Specify the specific Return on Ad Spend you aim to achieve.biddingStrategyType: Change from TARGET_ROAS to MAXIMIZE_TRAFFIC and vice versaskus:
ADDoperation: Add the SKUs you want to include in the campaign.
REMOVEoperation: Remove the SKUs you want to exclude from the campaign.
Sample response
{
"campaignId": "123456789"
}
Result
The specified campaign will be updated based on the details provided.
Next steps
Stop a campaign that is currently active.
Updated 25 days ago
