|
Update Existing Campaign Promotion
Update an existing promotion in a Points-based campaign.
Headers
|
|
Key |
|
Value |
|
Note |
|
|
|
api_access_key |
|
user_api_key |
|
Optional |
|
   
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 if not included in the headers |
|
|
|
type |
|
campaign_update |
|
Required |
|
|
|
action |
|
promo |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1234567890123456 |
|
Required |
|
|
|
promo_id |
|
35 |
|
Required |
|
|
|
new_promo_operation |
|
x or + |
|
Optional |
|
|
|
new_promo_amount |
|
1.25 or 100 |
|
Optional |
|
|
|
new_promo_description |
|
Pre-booking bonus |
|
Optional |
|
|
|
new_promo_custom_id |
|
XFA-834 |
|
Optional |
|
|
|
new_promo_start_date |
|
2013-08-01 08:00:00 |
|
Optional |
|
|
|
new_promo_end_date |
|
2013-08-31 23:59:59 |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
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:
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_update';
- $data['action'] = 'promo';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1234567890123456';
- $data['promo_id'] = 'greatwidgets';
- $data['new_promo_operation'] = '+';
- $data['new_promo_amount'] = '50';
- $data['new_promo_description'] = 'Pre-booking bonus (50pt)';
Success XML Response:
- <response status="success">
- <promo status="updated">
- <id>14</id>
- </promo>
- </response>
Note:
- A successful result will return the promo_id of the promotion. This id can also be retrieved with the Campaign - List Promotions API call.
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|