|
Create New Campaign Promotion
Add a new promotion to an existing 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_new |
|
Required |
|
|
|
action |
|
promo |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1234567890123456 |
|
Required |
|
|
|
promo_operation |
|
x or + |
|
Required |
|
|
|
promo_amount |
|
1.25 or 100 |
|
Required |
|
|
|
promo_description |
|
Pre-booking bonus |
|
Required |
|
|
|
promo_custom_id |
|
XFA-275 |
|
Optional |
|
|
|
promo_start_date |
|
2013-08-01 00:00:00 |
|
Optional |
|
|
|
promo_end_date |
|
2013-08-15 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_new';
- $data['action'] = 'promo';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1234567890123456';
- $data['promo_operation'] = 'x';
- $data['promo_amount'] = '1.25';
- $data['promo_description'] = 'Pre-booking bonus (25%)';
Success XML Response:
- <response status="success">
- <campaign>
- <promo>
- <id>14</id>
- </promo>
- </campaign>
- </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>
|
|