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
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
campaignId | The ID of the campaign | integer | Y | Unique 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
Element | Description | Type |
---|---|---|
code | Possible values of response code: success, failure | string |
details | Details of the response code:
| string |
campaignId | Id of the campaign | integer |
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 }
]
Updated about 1 month ago