Pre-Existing Report: All Transactions

Generate a report with all the transactions between two date ranges in the selected campaigns.

See more

Pre-Existing Report: All Redeemed Transactions

Generate a report with all the redeemed transactions between two date ranges in the selected campaigns.

See more

Pre-Existing Report: Campaign Totals

Generate a report with the campaign totals between two date ranges in the selected campaigns.

See more

Pre-Existing Report: Customer Balances

Generate a report with all the customer balances for the given campaign.

See more
Back to Top

Pre-Existing Report: All Transactions

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
account_id greatwidgets Required
type reports Required
report transactions_all Required
date_start 2010-01-01 Required
date_end 2011-12-31 Optional
selected_campaigns 123456789012,21987654321 Required
restrict_by_user cashier324 Optional
show_activations Yes 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:

  • The date_start and date_end must be provided in ISO 8601 format: YYYY-MM-DD, where YYYY is the year in four-digit format, MM is the month in 2-digit format, and DD is the day of the month in two digit format. This avoids all sorts of confusion as to which part of the date is represented in which position and allows for better and more natural date-based sorting.
  • Separate each selected_campaigns with a comma (no spaces!)
  • Use the restrict_by_user parameter to limit the transactions to only those recorded by that user.
  • To include non-transaction "customer activated" transactions, include the parameter show_activations and set it to Yes.

Example PHP Request:

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


              $data['user_id']        = 'john1970';
              $data['user_password'] 	= '1959caadac9b13dcb3';
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'reports';
              $data['report'] = 'transactions_all';
              $data['date_start'] = '2010-01-01';
              $data['date_end'] = '2011-12-31';
              $data['selected_campaigns'] = '123456789012,210987654321';
          

Success XML Response (New / Updated User):


              <response status="success">
                  <transaction>
                      <code>1850396893739825</code><code>1850396893739825</code>
                      <date>2011-08-10</date>
                      <authorization>20% Discount</authorization>
                      <campaign_id>123456789012</campaign_id>
                      <user_name>Store_Clerk</user_name>
                      <user_custom1></user_custom1>
                      <first_name>Demo</first_name>
                      <last_name>McDemo</last_name>
                      <phone>555-5555</phone>
                      <email>mcdemo@example.com</email>
                      <custom1></custom1>
                      <redeemed>R</redeemed>
                      <code_to_show>1111111111111</code_to_show>
                      <amount_number>-250</amount_number>
                      <amount_type>Points</amount_type>
                  <transaction_id>4338</transaction_id>
                  </transaction>
                  <transaction>
                  ...
                  </transaction>
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Pre-Existing Report: All Redeemed Transactions

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
account_id greatwidgets Required
type reports Required
report transactions_redeemed Required
date_start 2010-01-01 Required
date_end 2011-12-31 Optional
selected_campaigns 123456789012,21987654321 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 date_start and date_end must be provided in ISO 8601 format: YYYY-MM-DD, where YYYY is the year in four-digit format, MM is the month in 2-digit format, and DD is the day of the month in two digit format. This avoids all sorts of confusion as to which part of the date is represented in which position and allows for better and more natural date-based sorting.
  • Separate each selected_campaigns with a comma (no spaces!)

Example PHP Request:

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


              $data['user_id']        = 'john1970';
              $data['user_password'] 	= '1959caadac9b13dcb3';
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'reports';
              $data['report'] = 'transactions_redeemed';
              $data['date_start'] = '2010-01-01';
              $data['date_end'] = '2011-12-31';
              $data['selected_campaigns'] = '123456789012,210987654321';
          

Success XML Response (New / Updated User):


              <response status="success">
                  <transaction>
                      <code>1850396893739825</code>
                      <date>2011-08-10</date>
                      <authorization>20% Discount</authorization>
                      <campaign_id>123456789012</campaign_id>
                      <user_name>Store_Clerk</user_name>
                      <user_custom1></user_custom1>
                      <first_name>Demo</first_name>
                      <last_name>McDemo</last_name>
                      <phone>555-5555</phone>
                      <email>mcdemo@example.com</email>
                      <custom1></custom1>
                      <redeemed>R</redeemed>
                      <code_to_show>1111111111111</code_to_show>
                      <amount_number>-250</amount_number>
                      <amount_type>Points</amount_type>
                      <transaction_id>4338</transaction>
                  </transaction>
                  <transaction>
                  ...
                  </transaction>
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Pre-Existing Report: Campaign Totals

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
account_id greatwidgets Required
type reports Required
report audit_totals
or
coalition_points
or
coalition_stored_value
Required
date_start 2010-01-01 Required
date_end 2011-12-31 Optional
selected_campaigns 123456789012,21987654321 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 date_start and date_end must be provided in ISO 8601 format: YYYY-MM-DD, where YYYY is the year in four-digit format, MM is the month in 2-digit format, and DD is the day of the month in two digit format. This avoids all sorts of confusion as to which part of the date is represented in which position and allows for better and more natural date-based sorting.
  • Separate each selected_campaigns with a comma (no spaces!)
  • The coalition_points and coalition_stored_value reports are used specifically for coalition or two-tier account campaigns in order to correctly report aggregated totals.

Example PHP Request:

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


              $data['user_id']        = 'john1970';
              $data['user_password'] 	= '1959caadac9b13dcb3';
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'reports';
              $data['report'] = 'audit_totals';
              $data['date_start'] = '2010-01-01';
              $data['date_end'] = '2011-12-31';
              $data['selected_campaigns'] = '123456789012,210987654321';
          

Success XML Response (New / Updated User):


              <response status="success">
                  <campaign>
                      <campaign_name>Points Program</campaign_name>
                      <campaign_type>T</campaign_type>
                      <earned>4,437</earned>
                      <redeemed>-3,010</redeemed>
                      <liability>1,427</liability>
                      <monetary_equivalent>9.51</monetary_equivalent>
                      <campaign_id>123456789012</campaign_id>
                  </campaign>
                  <campaign>
                      <campaign_name>Employee Rewards</campaign_name>
                      <campaign_type>T</campaign_type>
                      <earned>17,988</earned>
                      <redeemed>-3,598</redeemed>
                      <liability>14,390</liability>
                      <monetary_equivalent>191.87</monetary_equivalent>
                      <campaign_id>234567890123</campaign_id>
                  </campaign>
                  ...
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Pre-Existing Report: Customer Balances

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
account_id greatwidgets Required
type reports Required
report customers_balances Required
campaign_id 123456789012 Required
offset 100 Optional
limit 50 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:

  • Only ONE selected_campaign can be run at a time.
  • The offset and limit are optional and can be used to generate paginated lists, or to limit the reporting range into more manageable chunks / lists.

Example PHP Request:

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


              $data['user_id']        = 'john1970';
              $data['user_password'] 	= '1959caadac9b13dcb3';
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'reports';
              $data['report'] = 'customers_balances';
              $data['campaign_id'] = '123456789012';
              $data['offset'] = '100';
              $data['limit'] = '50';
          

Success XML Response (New / Updated User):


              <response status="success">
                  <customer>
                      <card_number>12345678</card_number>
                      <code>173648028775637382</code>
                      <first_name>Jane</first_name>
                      <last_name>Doe</last_name>
                      <email>jdoe@email.com</email>
                      <phone>555-5555</phone>
                      <address1>123 Main St.</address1>
                      <address2>Apt 3G</address2>
                      <city>Anytown</city>
                      <state>ND</state>
                      <zip>12345</zip>
                      <country>New Zealand</country>
                      <custom1>She likes cheese!</custom1>
                      <custom_date>1970-07-14</custom_date>
                      <customer_username>jdoe123</customer_username>
                      <record_timestamp>2011-05-07 14:38:59</record_timestamp>
                      <earned>6021</earned>
                      <redeemed>-6001</redeemed>
                      <balance>20</balance>
                      <balance_equivalent>0.02</balance_equivalent>
                      <earned_equivalent>6.02</earned_equivalent>
                      <redeemed_equivalent>-6</redeemed_equivalent>
                  </customer>
                  ...
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>