Add a new campaign to an existing account and returns the campaign_id of the new campaign.
See moreAdd a new reward to an existing Points or Event-based campaign.
See moreAdd a new promotion to an existing Points-based campaign.
See moreAdd a new item to an existing "Buy X Get 1 Free" campaign.
See moreCreate a new campaign depreciation in an existing account.
See moreCreate a new campaign fee in an existing account.
See moreUpdates an existing campaign's basic settings.
See moreUpdate an existing campaign reward to an existing Points or Event-based campaign.
See moreUpdate an existing promotion in a Points-based campaign.
See moreUpdate an existing item in a "Buy X Get 1 Free" campaign.
See moreUpdate a campaign depreciation in an existing account.
See moreUpdate a campaign fee in an existing account.
See moreReturns a list of the campaigns for an account.
See moreReturns a list of the deactivated campaigns for an account.
See moreReturns a list of the rewards available for a given campaign.
See moreReturns a list of the promotions available for a given campaigns.
See moreReturns a list of the depreciations for a given campaign.
See moreReturns a list of the fees for a given campaign.
See moreReturns a list of the items that can be accumulated for the given "Buy X Get One Free" campaign.
See moreRemoves a campaign from an account, including all customer transactions in it.
See moreRemoves a reward from an account's campaign.
See moreRemoves a promotion from an account's campaign.
See moreRemoves an item from an existing Buy X Get 1 Free campaign.
See moreRemoves a campaign depreciation entry from an account's campaign.
See moreRemoves a campaign fee entry from an account's campaign.
See moreA safer and reversible alternative to deleting a campaign.
See moreMakes a campaign that has been previously deactivated active again.
See moreCreate New 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_new | Required | ||||
action | campaign | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_type | points or giftcard or events or earned or buyx |
Required | ||||
campaign_name | Widget Rewards | Required | ||||
latitude | 40.000001 | Optional | ||||
longitude | -40.000001 | Optional | ||||
description | Check-in at 3rd and 5th. | 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:
Additional Fields for Points-Based Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
points_ratio | 50 | Required (See Note) | ||||
reward_ratio | 15 | Optional (See Note) | ||||
Notes:
Additional Fields for Earn-per-Event Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
amount_per_event | 4.95 | Required (See Note) | ||||
Notes:
Optional Fields for Coalition and Two-Tier Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
coalition_opt_out | Y | Optional or don't include | ||||
two_tier_opt_out | Y | Optional or don't include | ||||
Notes:
Example PHP Requests:
If you are using PHP, the $data array would look like this:
For Giftcard, Events, or BuyX Campaigns:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_new';
$data['action'] = 'campaign';
$data['campaign_name'] = 'Widget Card';
$data['campaign_type'] = 'giftcard';
or
$data['campaign_type'] = 'events';
or
$data['campaign_type'] = 'buyx';
For a Points Campaign:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_new';
$data['action'] = 'campaign';
$data['campaign_type'] = 'points';
$data['campaign_name'] = 'Widget Rewards';
$data['points_ratio'] = '50';
$data['reward_ratio'] = '15';
For a Earned-per-Event Campaign:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_new';
$data['action'] = 'campaign';
$data['campaign_type'] = 'earned';
$data['campaign_name'] = 'Widget VIP';
$data['amount_per_event'] = '4.95';
Success XML Response:
<response status="success">
<campaign>
<id>1234567890123456</id>
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Create New Campaign Reward
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_new | Required | ||||
action | reward | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
reward_level | 1000 | Required | ||||
reward_description | Free Widget | Required | ||||
reward_identifier | 1010101 | 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'] = 'reward';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['reward_level'] = '1000';
$data['reward_description'] = 'Free Widget';
$data['reward_identifier'] = '1010101';
Success XML Response:
<response status="success">
<campaign>
<reward>
<id>14</id>
</reward>
</campaign>
</response>
Note:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Create New Campaign Promotion
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_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:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Create New BuyX Campaign Item
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_new | Required | ||||
action | item | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
reward_level | 10 | Required | ||||
item_description | Coffee or Tea | Required | ||||
item_identifier | 1DF34S1 | 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'] = 'item';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['reward_level'] = '10';
$data['item_description'] = 'Coffee or Tea';
$data['item_identifier'] = '1DF345S1';
Success XML Response:
<response status="success">
<campaign>
<item>
<id>14</id>
</item>
</campaign>
</response>
Note:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Create New Campaign Depreciation
The data to be submitted to the API is composed of the following fields:
field | Example | Note | ||||
---|---|---|---|---|---|---|
API | 1.1 | Required | ||||
user_id | john1970 | Required | ||||
user_password | 1959caadac9b13dcb3 | Required | ||||
type | depreciation_new | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
depreciation_type | per_transaction or last_transaction |
Required | ||||
depreciation_interval | 18 | Required | ||||
depreciation_interval_type | days or months or years |
Required | ||||
depreciation_percentage | 100 | 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:
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'] = 'depreciation_new';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['depreciation_type'] = 'last_transaction';
$data['depreciation_interval'] = '18';
$data['depreciation_interval_type'] = 'months';
$data['depreciation_percentage'] = '100';
Success XML Response:
<response status="success">
<depreciation status="new">
<id>543</id>
<type>last_transaction</type>
<interval>18</interval>
<interval_type>months</interval_type>
<percentage>100</percentage>
</depreciation>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Create New Campaign Fee
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_fee_new | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
fee_interval | 18 | Required | ||||
interval_type | days or months or years |
Required | ||||
fee_amount | 100 points or money depending on campaign type |
Required | ||||
fee_description | Service Charge | 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:
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_fee_new';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['fee_interval'] = '18';
$data['interval_type'] = 'months';
$data['fee_amount'] = '100';
$data['fee_description'] = 'Service Charge';
Success XML Response:
<response status="success">
<fee status="new">
<id>453</id>
<interval>18</interval>
<interval_type>months</interval_type>
<amount>100</amount>
<description>100</description>
</fee>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing 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_update | Required | ||||
action | campaign | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
new_campaign_name | New MyRewards | 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:
Additional Fields for Points-Based Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
new_points_ratio | 100 | Optional (See Note) | ||||
new_reward_ratio | 18 | Optional (See Note) | ||||
Notes:
Additional Fields for Earn-per-Event Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
new_amount_per_event | 5.95 | Optional (See Note) | ||||
Notes:
Optional Fields for Coalition and Two-Tier Campaigns:
field | Example | Note | ||||
---|---|---|---|---|---|---|
coalition_opt_out | Y | Optional or don't include | ||||
two_tier_opt_out | Y | Optional or don't include | ||||
Notes:
Example PHP Requests:
If you are using PHP, the $data array would look like this:
For a Giftcard, Events, or BuyX Campaign:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_update';
$data['action'] = 'campaign';
$data['campaign_id'] = '1234567890123450';
$data['new_campaign_name'] = 'New Widget Card Name';
For a Points Campaign:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_update';
$data['action'] = 'campaign';
$data['campaign_id'] = '1234567890123451';
$data['new_campaign_name'] = 'New Widget Rewards Name';
$data['new_points_ratio'] = '100';
$data['new_reward_ratio'] = '18';
For a Earned-per-Event Campaign:
$data['user_id'] = 'john1970';
$data['user_password'] = '1959caadac9b13dcb3';
$data['type'] = 'campaign_update';
$data['action'] = 'campaign';
$data['campaign_id'] = '1234567890123453';
$data['new_campaign_name'] = 'New Widget VIP Name';
$data['new_amount_per_event'] = '5.95';
Success XML Response:
<response status="updated">
<campaign>
<id>1234567890123450</id>
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing Campaign Reward
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_update | Required | ||||
action | reward | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
reward_id | 57 | Required | ||||
new_reward_level | 1000 | Optional | ||||
new_reward_description | Free Widget | Optional | ||||
new_reward_identifier | 1010101 | 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'] = 'reward';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['reward_id'] = '1234567890123456';
$data['new_reward_level'] = '2000';
$data['new_reward_description'] = 'Free Other Widget';
$data['new_reward_identifier'] = '1010102';
Success XML Response:
<response status="success">
<reward status="updated">
<id>57</id>
</reward>
</response>
Note:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing Campaign Promotion
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_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:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing BuyX Campaign Item
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_update | Required | ||||
action | item | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
item_id | 234 | Required | ||||
new_reward_level | 10 | Optional | ||||
new_item_description | Coffee or Tea | Optional | ||||
new_item_identifier | 1DF34S1 | 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'] = 'item';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['item_id'] = '234';
$data['new_reward_level'] = '11';
$data['new_item_description'] = 'Coffee or Tea';
$data['new_item_identifier'] = '1DF345S1';
Success XML Response:
<response status="success">
<item status="updated">
<id>14</id>
</item>
</response>
Note:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing Campaign Depreciation
The data to be submitted to the API is composed of the following fields:
field | Example | Note | ||||
---|---|---|---|---|---|---|
API | 1.1 | Required | ||||
user_id | john1970 | Required | ||||
user_password | 1959caadac9b13dcb3 | Required | ||||
type | depreciation_update | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
depreciation_id | 346 | Required | ||||
depreciation_type | per_transaction or last_transaction |
Optional | ||||
depreciation_interval | 18 | Optional | ||||
depreciation_interval_type | days or months or years |
Optional | ||||
depreciation_percentage | 100 | 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'] = 'depreciation_update';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['depreciation_id'] = '543';
$data['depreciation_type'] = 'last_transaction';
$data['depreciation_interval'] = '18';
$data['depreciation_interval_type'] = 'months';
$data['depreciation_percentage'] = '100';
Success XML Response:
<response status="success">
<depreciation status="updated">
<id>543</id>
<type>last_transaction</type>
<interval>18</interval>
<interval_type>months</interval_type>
<percentage>100</percentage>
</depreciation>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Update Existing Campaign Fee
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_fee_update | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
fee_id | 567 | Required | ||||
fee_interval | 18 | Optional | ||||
interval_type | days or months or years |
Optional | ||||
fee_amount | 100 points or money depending on campaign type |
Optional | ||||
fee_description | Service Charge | 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_fee_update';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['fee_interval'] = '18';
$data['interval_type'] = 'months';
$data['fee_amount'] = '100';
$data['fee_description'] = 'Service Charge';
Success XML Response:
<response status="success">
<fee status="updated">
<id>453</id>
<interval>18</interval>
<interval_type>months</interval_type>
<amount>100</amount>
<description>100</description>
</fee>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Campaigns List
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 | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | campaigns_list | Required | ||||
type_restrict | points, giftcard, events, earned, buyx |
Optional | ||||
searchField |
campaign_name or campaign_type |
Optional | ||||
searchOper |
eq (equal) ne (not equal) bw (begins with) bn (does not begin with) ew (ends with) en (does not end with) cn (contains) nc (does not contain) nu (is null/empty) nn (is not null/empty) in (is in - comma-separated list) ni (is not in - comma-separated list) |
Optional | ||||
searchValue | Employee | Optional | ||||
sortField |
campaign_name or campaign_type |
Optional | ||||
sortOrder | DESC or
ASC |
Optional | ||||
offset | 0 | Optional | ||||
length | 10 | 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['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['type'] = 'campaigns_list';
$data['account_id'] = 'greatwidgets';
Success XML Response:
<response status="success">
<campaign>
<id>1234567890123456</id>
<name>Widget Rewards</name>
<type>points</type>
<points_ratio>5</points_ratio>
<reward_ratio>15</reward_ratio>
<currency>EUR</currency>
<glyph>€</glyph>
</campaign>
<campaign>
<id>2345678901234567</id>
<name>Sales Bucks</name>
<type>earned</type>
<earned_per_event>4.95</earned_per_event>
<currency>EUR</currency>
<glyph>€</glyph>
</campaign>
<campaign>
<id>3456789012345678</id>
<name>Frequent Shopper Rewards</name>
<type>buyx</type>
<item>
<id>45678</id>
<description>Coffees and Teas</description>
<earn_ratio>10</earn_ratio>
...
</item>
</campaign>
...
</response>
Notes:
There are 5 campaign types:
Gift Card and events-based campaigns do not have ratios to report.
Example PHP request to list ONLY Gift Cards and Points campaigns:
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'] = 'campaigns_list';
$data['account_id'] = 'greatwidgets';
$data['type_restrict'] = 'giftcard, points';
Success XML Response:
<response status="success">
<campaign>
<id>2345678901234567</id>
<name>My Stored Value Card</name>
<type>giftcard</type>
</campaign>
<campaign>
<id>1234567890123456</id>
<name>Widget Rewards</name>
<type>points</type>
<points_ratio>5</points_ratio>
<reward_ratio>15</reward_ratio>
</campaign>
...
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Deactivated (on hold) Campaigns List
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 | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | campaigns_inactive_list | Required | ||||
type_restrict | points, giftcard, events, earned, buyx |
Optional | ||||
searchField |
campaign_name or campaign_type |
Optional | ||||
searchOper |
eq (equal) ne (not equal) bw (begins with) bn (does not begin with) ew (ends with) en (does not end with) cn (contains) nc (does not contain) nu (is null/empty) nn (is not null/empty) in (is in - comma-separated list) ni (is not in - comma-separated list) |
Optional | ||||
searchValue | London | Optional | ||||
sortField |
campaign_name or campaign_type |
Optional | ||||
sortOrder | DESC or
ASC |
Optional | ||||
offset | 0 | Optional | ||||
length | 10 | 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['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['type'] = 'campaigns_inactive_list';
$data['account_id'] = 'greatwidgets';
Success XML Response:
<response status="success">
<campaigns>
<campaign>
<id>1234567890123456</id>
<name>Widget Rewards</name>
<type>points</type>
<points_ratio>5</points_ratio>
<reward_ratio>15</reward_ratio>
</campaign>
<campaign>
<id>2345678901234567</id>
<name>Sales Bucks</name>
<type>earned</type>
<earned_per_event>4.95</earned_per_event>
</campaign>
<campaign>
<id>3456789012345678</id>
<name>Frequent Shopper Rewards</name>
<type>buyx</type>
<item>
<id>45678</id>
<description>Coffees and Teas</description>
<earn_ratio>10</earn_ratio>
...
</item>
</campaign>
... </campaign>
</response>
Notes:
There are 5 campaign types:
Gift Card and events-based campaigns do not have ratios to report.
Example PHP request to list ONLY Gift Cards and Points deactivated campaigns:
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'] = 'campaigns_inactive_list';
$data['account_id'] = 'greatwidgets';
$data['type_restrict2'] = 'giftcard, points';
Success XML Response:
<response status="success">
<campaign>
<id>2345678901234567</id>
<name>My Stored Value Card</name>
<type>giftcard</type>
</campaign>
<campaign>
<id>1234567890123456</id>
<name>Widget Rewards</name>
<type>points</type>
<points_ratio>5</points_ratio>
<reward_ratio>15</reward_ratio>
</campaign>
...
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Campaign Rewards List
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_rewards | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1111222233334444 | 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:
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_rewards';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1111222233334444';
Success XML Response:
<response status="success">
<campaign>
<id>1111222233334444</id>
</campaign>
<rewards>
<reward>
<id>356</id>
<level>1000</level>
<description>Free Widget</description>
</reward>
<reward>
<id>417</id>
<level>1500</level>
<description>Free Service</description>
<reward_id>156739948736</reward_id>
</reward>
...
</rewards>
</response>
Notes:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Campaign Promotions List
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 | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | campaign_promos | Required | ||||
campaign_id | 1111222233334444 | Required | ||||
searchField |
promotion or operation multiplier |
Optional | ||||
searchOper |
eq (equal) ne (not equal) bw (begins with) bn (does not begin with) ew (ends with) en (does not end with) cn (contains) nc (does not contain) nu (is null/empty) nn (is not null/empty) in (is in - comma-separated list) ni (is not in - comma-separated list) |
Optional | ||||
searchValue | Double (promotion)or x (operation) or 2 (multiplier) |
Optional | ||||
sortField |
promotion or operation multiplier |
Optional | ||||
sortOrder | DESC or
ASC |
Optional | ||||
offset | 0 | Optional | ||||
length | 10 | 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['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['account_id'] = 'greatwidgets';
$data['type'] = 'campaign_promos';
$data['campaign_id'] = '1111222233334444';
$data['searchField'] = 'promotion';
$data['searchValue'] = 'Bonus';
$data['searchOper'] = 'cn';
$data['sortField'] = 'promotion';
$data['sortOrder'] = 'ASC';
$data['offset'] = '30';
$data['length'] = '10';
Success XML Response:
<response status="success">
<campaign>
<id>1111222233334444</id>
<name>Campaign Name</name>
</campaign>
<pagination>
<total>56</total>
<offset>30</offset>
</pagination>
<promotions>
<promotion>
<id>365</id>
<operand>+</operand>
<value>1000</value>
<description>Sign-up Bonus</description>
<promo_custom_id>XFA-567</promo_custom_id>
<promo_start_date>2013-08-01 00:00:00</promo_start_date>
<promo_end_date>2013-08-31 23:59:59</promo_end_date>
</promotion>
<promotion>
<id>423</id>
<operand>x</operand>
<value>1.2</value>
<description>20% More Points Tuesdays Bonus</description>
<promo_custom_id>XFA-256</promo_custom_id>
<promo_start_date>2013-09-01 08:00:00</promo_start_date>
<promo_end_date>2013-09-31 23:59:59</promo_end_date>
</promotion>
...
</promotions>
</response>
Notes:
Operands are either:
No Promos XML Response:
<response status="none">
<message>Language-specific message</message>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Campaign Depreciations List
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_depreciations | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | 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:
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_depreciations';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
Success XML Response:
<response status="success">
<campaign>
<id>1111222233334444</id>
</campaign>
<depreciations>
<depreciation>
<id>356</id>
<depreciation_interval>18</depreciation_interval>
<depreciation_interval_type>months</depreciation_interval_type>
<depreciation_percentage>50</depreciation_percentage>
</depreciation>
<depreciation>
<id>417</id>
<depreciation_interval>4</depreciation_interval>
<depreciation_interval_type>years</depreciation_interval_type>
<depreciation_percentage>100</depreciation_percentage>
</depreciation>
...
</depreciations>
</response>
Notes:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Campaign Fees List
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_fees | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | 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:
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_fees';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
Success XML Response:
<response status="success">
<campaign>
<id>1111222233334444</id>
</campaign>
<fees>
<fee>
<id>463</id>
<interval>1</interval>
<interval_type>years</interval_type>
<amount>10</amount>
<description>Yearly account fee</description>
</fee>
...
</fees>
</response>
Notes:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
BuyX Campaign Items List
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 | 1959caadac9b13dcb3 | Required | ||||
account_id | greatwidgets | Required | ||||
type | buyx_items_list | Required | ||||
campaign_id | 1111222233334444 | Required | ||||
searchField |
service_product or |
Optional | ||||
searchOper |
eq (equal) ne (not equal) bw (begins with) bn (does not begin with) ew (ends with) en (does not end with) cn (contains) nc (does not contain) nu (is null/empty) nn (is not null/empty) in (is in - comma-separated list) ni (is not in - comma-separated list) |
Optional | ||||
searchValue | Coffee (service_product)or 51 (reward_id) or 10 (buy_amount) |
Optional | ||||
sortField |
service_product or |
Optional | ||||
sortOrder | DESC or
ASC |
Optional | ||||
offset | 0 | Optional | ||||
length | 10 | 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['API'] = '1.5';
$data['user_id'] = 'john1970';
$data['user_api_key'] = '1959caadac9b13dcb3';
$data['type'] = 'buyx_items_list';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1111222233334444';$data['searchField'] = 'service_product';
$data['searchValue'] = 'Coffee';
$data['searchOper'] = 'cn';
$data['sortField'] = 'service_product';
$data['sortOrder'] = 'ASC';
$data['offset'] = '30';
$data['length'] = '10';
Success XML Response:
<response status="success">
<campaign>
<id>1111222233334444</id>
<name>Store Rewards!</name>
</campaign>
<pagination>
<total>56</total>
<offset>30</offset>
<pagination>
<buyx_items>
<item>
<id>345</id>
<description>Coffees and Lattes</description>
<quantity>8</quantity>
</item>
<item>
<id>494</id>
<description>Blended Drinks</description>
<quantity>12</quantity>
<reward_id>12398749834</reward_id>
</item>
...
</buyx_items>
</response>
Notes:
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Delete a 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 | campaign | Required | |||||
account_id | greatwidgets | Required | |||||
campaign_id | 1234567890123456 | 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:
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'] = 'campaign';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
Success XML Response:
<response status="success">
<campaign status="deleted">
<id>1234567890123456</id>
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Delete a Reward
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 | reward | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
reward_id | 432 | 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:
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'] = 'reward';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['reward_id'] = '432';
Success XML Response:
<response status="success">
<reward status="deleted">
<id>432</id>
</reward>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Delete a Promotion
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:
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'] = 'promo';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['promo_id'] = '543';
Success XML Response:
<response status="success">
<promo status="deleted">
<id>432</id>
</promo>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Delete a BuyX Campaign Item
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:
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>
Delete a Depreciation
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 | depreciation_delete | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
depreciation_id | 456 | 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:
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'] = 'depreciation_delete';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['fee_id'] = '456';
Success XML Response:
<response status="success">
<depreciation status="deleted">
<id>456</id>
</depreciation>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Delete a Fee
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_fee_delete | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | Required | ||||
fee_id | 456 | 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:
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_fee_delete';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
$data['fee_id'] = '456';
Success XML Response:
<response status="success">
<fee status="deleted">
<id>456</id>
</fee>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Deactivate a 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_deactivate | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | 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:
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_deactivate';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
Success XML Response:
<response status="success">
<campaign>
<id>1234567890123456</id>
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>
Reactivate a 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_reactivate | Required | ||||
account_id | greatwidgets | Required | ||||
campaign_id | 1234567890123456 | 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:
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_reactivate';
$data['account_id'] = 'greatwidgets';
$data['campaign_id'] = '1234567890123456';
Success XML Response:
<response status="success">
<campaign>
<id>1234567890123456</id>
</campaign>
</response>
Error XML Response:
<response status="error">
<error>Error message</error>
</response>