|
Triggers - List
Retrieves the list of the existing triggers that are configured in a given account.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.5 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959ca5645adac9b13dcb3 |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
type |
|
manage_campaign_triggers |
|
Required |
|
|
|
action |
|
list |
|
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 |
|
|
|
|
|
|
|
|
|
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['type'] = 'manage_campaign_triggers';
- $data['action'] = 'list';
- $data['account_id'] = 'greatwidgets';
Success XML Response
- <response status="success">
- <triggers>
- <trigger_id>210</trigger_id>
- <trigger_name>Get 50 Bonus Points in each visit Mondays and Wednesdays 4pm to 6pm</trigger_name>
- <trigger_time_start>16:00:00</trigger_time_start>
- <trigger_time_validity>2</trigger_time_validity>
- <trigger_active_days>1,3</trigger_active_days>
- <trigger_campaing_id_from>5095775700340492</trigger_campaing_id_from>
- <trigger_threshold_amount>1000</trigger_threshold_amount>
- <trigger_apply_to_all_transactions>Y</trigger_apply_to_all_transactions>
- <trigger_deduct_from_balance>N</trigger_deduct_from_balance>
- <trigger_deduct_from_balance_repeat>N</trigger_deduct_from_balance_repeat>
- <trigger_action_type>add</trigger_action_type>
- <trigger_action_amount>50</trigger_action_amount>
- <trigger_campaing_id_to>6017673775945338</trigger_campaing_id_to>
- <trigger_action_type>add</trigger_action_type>
- <trigger_buyx_to_item_description></trigger_buyx_to_item_description>
- <trigger_type>C</trigger_type>
- </triggers>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|