Update Existing Campaigns
Update an existing campaign using PUT operation
URL: PUT /api/v1/campaigns
Query Parameters
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
name | The name of the campaign | integer | N | The campaign name should be unique and correspond to the campaign ID |
status | Specified status of the campaign | string | N | Possible values:
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 |
startDate | The date to start campaign | date | N | Date should be in format: yyyy-mm-dd |
endDate | The date when Campaign ends. You can choose to run the campaign indefinitely as well | date | N | To run campaign indefinitely, set its value as 9999-12-30 |
budgetType | The type of budget allocation you want to choose for your campaign. | string | N | Possible values:
|
totalBudget | Total budget of campaign | double | N | 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• There is no limit on the amount of daily budget that can carry forward to the next day | double | N | 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 |
rollover | The indicator to suggest if the unspent daily budget from the previous day should be carried forward to next day’s daily budget | boolean | N | Possible values:
|
biddingStrategy | A json object to store the bidding strategy. This stores bidding strategy through the field: strategy | json | N | The possible values of the strategy field are:
|
campaignOptions | List of campaign setting options while creating a campaign. Campaign setting options:
Notes:
| array | N | Values of campaign options:
Notes:
|
campaignId | ID of the campaign | integer | Y | Unique numeric identifier |
Notes
- No new TROAS campaigns can be created at this time. Passing TROAS in a campaign create request will result in an error.
Please use the TROAS recommendations report using the Campaign Recommendations endpoint, and use the Update Campaign endpoint to update the bidding strategy to TROAS.
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 '[ { "campaignId": 123457890, "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 '[ { "campaignId": 123457890, "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
Element | Description | Type |
---|---|---|
code | Possible values of response code: success, failure | string |
details | Details of the error if value of response code is failure | string |
campaignId | ID of the campaign | integer |
Sample Response
[ { "code": "success", "campaignId": 500001, "details": "" } { "code": "failure", "details": "Campaign not found", "campaignId": 3 }
]
Updated 1 day ago