Delete a BuyX Campaign Item
Removes an item from an existing Buy X Get 1 Free campaign.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
campaign_delete |
|
Required |
|
|
|
action |
|
item |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1234567890123456 |
|
Required |
|
|
|
item_id |
|
678 |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
- The ability to delete BuyX campaign items is based on the permissions of the user_id that is making the call.
- When identifying the item to the API with the parameter item_id, you MUST use the <id> that is returned in the XML construct as the result of a call like Campaign - List BuyX Items, NOT the <reward_id> which corresponds to the optional reward_identifier field.
- Only one item can be deleted at a time. Loop this call in your program to delete multiple items.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'campaign_delete';
- $data['action'] = 'item';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1234567890123456';
- $data['item_id'] = '678';
Success XML Response:
- <response status="success">
- <item status="deleted">
- <id>432</id>
- </item>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|