Update Existing Campaigns

Update an existing campaign using PUT operation

📘

URL: ​PUT/api/v1/campaigns

Query Parameters

ParameterDescriptionTypeRequiredPossible Values
nameThe name of the campaignintegerNThe campaign name should be unique and correspond to the campaign ID
statusSpecified status of the campaignstringNPossible values: 
  • enabled: use this status to schedule a paused campaign

    Note: When you try to enable an Sponsored Brands campaign in “paused” or “proposal” state, and if the campaign is not eligible to go live, the error message will specifically outline the criteria that campaign fails to meet, which could be either or a combination of these:
    • Sponsored Brands Profile enabled and approved
    • 2 Items enabled and approved
    • 1 Keyword enabled and approved

    Note: When you try to enable a Sponsored Videos campaign in “paused” or “proposal” state, and if the campaign is not eligible to go live, the error message will specifically outline the criteria that campaign fails to meet, which could be either or a combination of these: 
    • Sponsored Video Profile enabled and approved
    • 1 item enabled and approved
    • 1 Keyword enabled and approved
  • paused: use this status to pause a live campaign
  • completed: use this status to end a live campaign
  • extend: resume an already completed campaign to reuse it without having to create same campaign again
  • proposal: use this status when a scheduled campaign which has never gone live, has been modified and needs to be re-submitted for review

    Note: proposal status is only applicable for Sponsored Brands campaigns. Post review completion, the campaign status will automatically change to “enabled” then “scheduled” and finally to “live”. However, the campaign must be eligible to go live. A campaign can only go “live” when its start date is defined and following are approved for it:
    • Sponsored Brands profile
      • 1 Keyword
      • 2 Items (max 10 items allowed, our recommendation is uploading 3 (for Sponsored Brands campaigns))
    • Sponsored Videos profile
      • 1 Keyword,
      • 1 Item (max 10 items allowed, our recommendation is uploading 3 (for Sponsored Videos campaign))
If a campaign review is revised for Sponsored Brands Profile such that the Sponsored Brands profile is rejected, the campaign will be “paused”. A campaign cannot stay “live” if profile is rejected by WMC team. If this happens, you need to change the campaign profile as per guidelines and resubmit it for review.

If you extend an ended campaign, the system will auto-change the status to “rescheduled” and then to “live” as per the defined start date for campaign

A campaign can be auto scheduled only if it is in “proposal” state. A “paused” campaign cannot be auto scheduled       
startDateThe date to start campaigndateNDate should be in format: yyyy-mm-dd
endDateThe date when Campaign ends. You can choose to run the campaign indefinitely as welldateNTo run campaign indefinitely, set its value as 9999-12-30
budgetTypeThe type of budget allocation you want to choose for your campaign.  stringNPossible values:
  • daily
  • total
  • both
totalBudgetTotal budget of campaigndoubleNFor 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• There is no limit on the amount of daily budget that can carry forward to the next daydoubleNFor 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
rolloverThe indicator to suggest if the unspent daily budget from the previous day should be carried forward to next day’s daily budgetbooleanNPossible values:
  • true
Note: Currently rollover only accepts “true” as a value. However, in 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: strategyjsonNThe possible values of the strategy field are: · 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· TROAS bidding strategy is unavailable for beta testing at this time. Note: If You don’t pass biddingStrategy in the request, the default strategy will be “FIXED” 
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
campaignIdID of the campaignintegerYUnique numeric identifier

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

curl -X PUT \ '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": null } ]'

Sample Request 2 – Opt in CPT, Opt out BTT

curl -X PUT \ '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": [“BRAND_TERM_OPT_OUT”] } ]’

Response

ElementDescriptionType
codePossible values of response code: success, failurestring
detailsDetails of the error if value of response code is failurestring
campaignIdID of the campaigninteger

Sample Response

[ { "code": "success", "campaignId": 500001, "details": "" } { "code": "failure", "details": "Campaign not found", "campaignId": 3 }
]