Create new campaign

Create a new campaign using this method. Successfully created campaigns will be assigned a unique campaign ID.

📘

URL: POST/api/v1/campaigns

Query Parameters

ParameterNotesTypeRequired Possible Values
nameThe name of the campaignstringYThe campaign name should be unique.
campaignTypeThe type of the campaignstringYValues of campaignType:
  • sponsoredProducts
  • sba
  • video

Note: Define campaign type as “sba” for setting up Sponsored Brands campaigns

  • If you are a 3P seller trying to create Sponsored Brands campaign, you need to have an accepted brand registered in the Walmart brandportal. We will allow you to create a campaign only when you have an accepted brand which will be subject to campaign review guidelines.
  • If your request does not go through, please wait at least 24 hours before trying again.
Define campaign type as “video” for setting up Sponsored Videos campaigns 
  • Please use targeting type “manual” for campaign type “video”
  • If you are a 3P seller trying to create Sponsored Videos campaign, you need to have an accepted brand registered in Walmart brandportal. We will allow you to create a campaign only when you have an accepted brand which will be subject to review as per campaign review guidelines.
  • If your request does not go through, please wait at least 24 hours before trying again.
targetingTypeThe targeting type of the campaign is set of options to create campaigns with different bidding types.stringYPossible values:
  • manual
  • auto
Notes:
  • Define targeting type as “manual” to set up keyword bidding campaigns (including Sponsored Brands)
  • For new campaign creation, a combination of “targetingType=manual” and “biddingStrategy=TROAS” will result in an error
  • Please refer here for more info
statusSpecified status of campaignstringYPossible values:
  • enable
  • paused
  • completed
  • Please refer here for more info
startDateThe date to start campaigndateYDate should be in format: yyyy-mm-dd
endDateThe date when campaign ends.dateYTo run campaign indefinitely, set value to: 9999-12-30
totalBudgetTotal budget of campaigndoubleNote: This field is only required if budgetType is set to total
  • For 1p seller: The value of Total budget should at least be $100
  • For 3p seller: The value of Total budget should at least be $50
dailyBudget Daily budget of campaign
Note:
  • Daily budget cannot exceed your total budget amount
  • Unspent budget will be rolled over to the next day
  • There is no limit on the amount of daily budget that can carry forward to the next day
doubleY
Note: This field is required only if budgetType is set to daily
  • For 1p seller: The value of daily budget should at least be $50
  • For 3p seller: The value of daily budget should at least be $10
budgetTypeThe type of budget allocation you want to choose for your campaign.stringYPossible values:
  • daily
  • total
  • both
rolloverThe indicator to suggest if the unspent daily budget from the previous day should be carried forward to next day’s daily budget  booleanYCurrently rollover only accepts “true” as a value. However, in the future it may be updated to accept “false” as well.
biddingStrategyA json object to store the bidding strategy. This stores bidding strategy through the field: strategyjsonNPossible values:
  • DYNAMIC – Indicates the bidding strategy to be dynamic
  • FIXED – Indicates the bidding strategy to be fixed
  • TROAS – Indicates the bidding strategy to be Target ROAS
    • You must provide a TROAS value when choosing TROAS as a bidding strategy.
    • TROAS min and max values are 0.00 and 10000.00 respectively.
    • TROAS bidding strategy is unavailable for beta testing at this time.
Notes:
  • If you don’t pass biddingStrategy in the request, the default strategy will be “FIXED”.
  • TROAS can only be applied to new auto campaigns.
  • For new campaign creation, a combination of “targetingType=manual” and “biddingStrategy=TROAS” will result in an error.
  • biddingStrategy is not applicable for Sponsored Brands and Sponsored Videos.
campaignOptionsList of campaign setting options while creating a campaign.

Campaign setting options:
  • Brand Term Targeting (BTT)
  • Complementary Product Targeting (CPT)

Notes:
  • BTT and CPT are only applicable to Sponsored Search automatic campaigns.
  • All net new automatic campaigns will be opted in to Brand Term Targeting by default.
  • If no value (an empty array) is passed for campaignOptions, the campaign will be updated to opt-in for both BTT and CPT.
  • Existing campaigns are opted out of BTT and CPT by default.
arrayNValues of campaign options:
  • null
    • Passing a null value will opt in to Brand Term Targeting AND Complementary Product Targeting
  • []
    • Passing an empty array will opt in to Brand Term Targeting and Complementary Product Targeting
    • New automatic campaigns are set to an empty array by default
  • BRAND_TERM_OPT_OUT
    • This option is used to opt out of Brand Term Targeting
  • COMPLEMENTARY_OPT_OUT
    • This option is used to opt out of Complementary Product Targeting
advertiserIdID of advertiser whose campaign is to be scheduledintegerYAdvertiser ID for which the campaign is to be created

Note:

  • It’s not mandatory to define both totalBudget and dailyBudget parameters together. However, one of these must be defined.
  • To set daily budget, you must choose value of budgetType as “daily” and then define dailyBudget. Define rollover as true to get remainder of daily budget from previous day to be carried forward to next day
  • Maximum budget spent on a given day will be limited to twice of the set dailyBudget amount
  • Currently rollover only accepts “true” as a value. However, in future it may be updated to accept “false” as well.
  • To set total budget, you must choose value of budgetType as “total” and then define totalBudget.
  • There will be no control on pacing and the budget will be used as soon as possible
  • To set both total and daily budget, you must choose value of budgetType as “both” and then define totalBudget and dailyBudget. Define rollover as “true”.

Headers

Header NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information
WM_SEC.AUTH_SIGNATUREAuth signature as an API key.YUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API.Y1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestamp.YUse the signature generator code from Getting Started Guide to generate this value

Sample Request 1 – Opt in to CPT and BTT (empty campaignOptions), T-ROAS biddingStrategy

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaign' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \  --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data ‘[ { "advertiserId": 16274575, "name": "Campaign3", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "startDate": "2024-07-18", "endDate": "2024-08-03", "totalBudget": 4000, "dailyBudget": 500, "budgetType" : "both", "rollover" : true, "biddingStrategy": {         "strategy": "TROAS", “troas”: 200.00 }, "campaignOptions": [] } ]’

Sample Request 2 – Opt in to CPT and BTT (no campaignOptions field), T-ROAS biddingStrategy

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaign' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \  --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data ‘[ { "advertiserId": 16274575, "name": "Campaign3", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "startDate": "2024-07-18", "endDate": "2024-08-03", "totalBudget": 4000, "dailyBudget": 500, "budgetType" : "both", "rollover" : true, "biddingStrategy": { "strategy": "TROAS", “troas”: 200.00 }, } ]’

Sample Request 3 – Opt out of CPT and BTT with Dynamic biddingStrategy

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaign' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \  --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data ‘[ { "advertiserId": 16274575, "name": "Campaign3", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "startDate": "2024-07-18", "endDate": "2024-08-03", "totalBudget": 4000, "dailyBudget": 500, "budgetType" : "both", "rollover" : true, "biddingStrategy": { “strategy”: “DYNAMIC” }, "campaignOptions": ["COMPLEMENTARY_OPT_OUT, BRAND_TERM_OPT_OUT"] } ]’

Sample Request 4 – Opt in CPT, Opt out BTT, T-ROAS biddingStrategy

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaign' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \  --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data ‘[ { "advertiserId": 16274575, "name": "Campaign3", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "startDate": "2024-07-18", "endDate": "2024-08-03", "totalBudget": 4000, "dailyBudget": 500, "budgetType" : "both", "rollover" : true, "biddingStrategy": {         "strategy": "TROAS", “troas”: 200.00 }, "campaignOptions": ["BRAND_TERM_OPT_OUT"] } ]’

Sample Request 5 – Opt out CPT, Opt in BTT, T-ROAS biddingStrategy

curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaign' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \  --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data ‘[ { "advertiserId": 16274575, "name": "Campaign3", "campaignType": "sponsoredProducts", "targetingType": "auto", "status": "enabled", "startDate": "2024-07-18", "endDate": "2024-08-03", "totalBudget": 4000, "dailyBudget": 500, "budgetType" : "both", "rollover" : true, "biddingStrategy": {       "strategy": "TROAS", “troas”: 200.00 }, "campaignOptions": ["COMPLEMENTARY_OPT_OUT"] } ]’

Response

Element DescriptionType
codeThe response code can have following values:
  • success
  • failure
  • Click here for more information about Status Codes and Errors
string
detailsDetails of the error if response code value is ‘failure’string
campaignIdID of the campaigninteger

Sample Response 1

 {    "code": "success",    "details": "",    "campaignId": 50001 "campaignOptions": [] } 

Sample Response 2

 {    "code": "success",    "details": "",    "campaignId": 50002 "campaignOptions": [] } 

Sample Response 3

 {    "code": "success",    "details": "",    "campaignId": 50003 "campaignOptions": ["COMPLEMENTARY_OPT_OUT, BRAND_TERM_OPT_OUT"] } 

Sample Response 4

 {    "code": "success",    "details": "",    "campaignId": 50004 "campaignOptions": ["COMPLEMENTARY_OPT_OUT"] } 

Sample Response 5

{     "code": "failure",     "details": "error message",     "campaignId": 0 } 

Campaign Status Flow Diagram

Note: SB stands for Sponsored Brands campaign