API DOCUMENTATION Last Update: Apr 2022

Delete a Promotion

Removes a promotion from an account's 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 promo Required
account_id greatwidgets Required
campaign_id 1234567890123456 Required
promo_id 543 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 promotions is based on the permissions of the user_id that is making the call.
  • Only one promotion can be deleted at a time. Loop this call in your program to delete multiple promotions.

 

Example PHP Request:

If you are using PHP, the $data array would look like this:

  1. $data['user_id'] = 'john1970';
  2. $data['user_password'] = '1959caadac9b13dcb3';
  3. $data['type'] = 'campaign_delete';
  4. $data['action'] = 'promo';
  5. $data['account_id'] = 'greatwidgets';
  6. $data['campaign_id'] = '1234567890123456';
  7. $data['promo_id'] = '543';

 

Success XML Response:

  1. <response status="success">
  2. <promo status="deleted">
  3. <id>432</id>
  4. </promo>
  5. </response>

 

Error XML Response:

  1. <response status="error">
  2. <error>Error message</error>
  3. </response>