Create a new Campaign

Use the Create Campaign API to create a new SEM campaign with specified metadata, including the campaign name, start and end dates, total budget, and target return on ad spend (RoAS). It also includes operations to add specified SKUs to a campaign. A unique Campaign ID will be assigned to the newly created Campaign for identification and management purposes.

Once created, a campaign enters a scheduled state, set to begin at midnight PST on the user-specified start date. After this initial period, the campaign becomes active and enters the running state, indicating that it is live and being delivered to the target audience.

Throttling

Request limits: 5 calls per minute per seller. You may receive an HTTP 429 error if you exceed this limit.

Endpoint

POST /v3/advertising/sem/campaigns

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 'https://marketplace.walmartapis.com/v3/advertising/sem/campaigns' \
--header 'WM_SVC.NAME: Search Engine Marketing' \
--header 'WM_QOS.CORRELATION_ID: 70912169-0c71-484f-b37a-4f7911f8a7c8' \
--header 'WM_SEC.ACCESS_TOKEN: **********' \
--header 'Content-Type: application/json' \
--data '{ "metadata": { "name": "New Year Campaign", "startDate": "2025-01-01", "endDate": "2025-01-31", "biddingStrategyType": "MAXIMIZE_TRAFFIC", "totalBudget": 1000.0, "targetRoas": 3.0 }, "itemsOperations": [ { "operationType": "ADD", "skus": [ "sku_07144442400738_test", "sku_00993001888299_test" ] } ]
}'
import requests
import json url = "https://marketplace.walmartapis.com/v3/advertising/sem/campaigns" headers = { "WM_SVC.NAME": "Search Engine Marketing", "WM_QOS.CORRELATION_ID": "70912169-0c71-484f-b37a-4f7911f8a7c8", "WM_SEC.ACCESS_TOKEN": "**********", "Content-Type": "application/json"
} data = { "metadata": { "name": "New Year Campaign", "startDate": "2025-01-01", "endDate": "2025-01-31", "biddingStrategyType": "MAXIMIZE_TRAFFIC", "totalBudget": 1000.0, "targetRoas": 3.0 }, "itemsOperations": [ { "operationType": "ADD", "skus": [ "sku_07144442400738_test", "sku_00993001888299_test" ] } ]
} response = requests.post(url, headers=headers, data=json.dumps(data)) print(response.text)

Modify your code

  1. Use your unique WM_QOS.CORRELATION_ID for each request.
  2. Use your unique WM_SEC.ACCESS_TOKEN obtained from the Token API.
  3. Replace the name value of New Year Campaign with a campaign name of your choice.
  4. 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. This must be at least tomorrow's date.
    • endDate - Enter your campaign end date in yyyy-MM-dd format. If left blank, the endDate defaults to 9999-12-31 .
    • totalBudget - Specify the total amount allocated for the campaign.
    • targetRoas - Specify the specific Return on Ad Spend you aim to achieve.
    • biddingStrategyType: Change from TARGET_ROAS to MAXIMIZE_TRAFFIC and vice versa
    • skus: Use the ADD operation to add the SKUs you want to include in the campaign.

Sample response

{ "campaignId": "123456789"
}

Result

A campaign will be created and assigned a unique Campaign ID for identification and management purposes.