Delete Existing Campaigns

Use this operation to delete an existing campaign and its ad groups if campaign is scheduled but hasn’t gone live. You cannot delete a campaign that has gone live.

🌐

URL: PUT/api/v1/campaigns/delete

Note:

  • It allows you to delete one or more campaigns
  • You will be able to delete any campaign which has never gone Live
  • Once campaigns go live:
  • They cannot be deleted
  • Items/Ad Groups/Keywords in the campaign cannot be deleted, but they can be disabled
  • Campaign start date and end date cannot be changed

Query Parameters

ParameterDescriptionTypeRequiredPossible Values
campaignIdThe ID of the campaignintegerYUnique numeric identifier

Sample Request

curl -X PUT \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/campaigns/delete' \
--header 'Authorization: Bearer <auth_token>' \
--header 'accept: application/json' \
--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'\
--data '{ "campaignId": 500001 }'

Response

ElementDescriptionType
codePossible values of response code: success, failurestring
detailsDetails of the response code:
  • Response message for success: “”
  • Response message for failure: “Campaign with ID <id_number> cannot be deleted as it has been scheduled before”
string
campaignIdId of the campaigninteger

Sample Response

[ { "code": "success", "details": "", "campaignId": 500002 } { "code": "failure", "details": "Campaign with ID < 500001 >cannot be deleted as it has been scheduled before", "campaignId": 500001 }
]