Email Templates - Create New

Allows you to add a new email template to an existing loyalty account. Email templates allow you to send customers a different email based on the following activity types: 1. Positive transactions, 2. Redemptions, 3. New account creation (enrollment/registration).

See more

Email Templates - Update

Update the settings of an existing email template.

See more

Email Templates - Retrieve Information

Retrieves information about an existing email tempalte.

See more

Email Templates - List

Returns the list of the existing email templates for a given account.

See more

Email Templates - Delete

Removes an email template for the given account permanently.

See more
Back to Top

Email Templates - Create New

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
type manage_email_templates Required
action new Required
account_id greatwidgets Required
template_name Welcome Email Required
template_description This is the email that new customers will receive when enrolling in the loyalty program Optional
template_rule record, redeem, or new_accounts Required
campaign_id all or campaign id(s) Required
template_subject Welcome to Amazing Rewards Required
template_content [HTML Content] Required
include_balance Y Optional
include_rewards Y 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:

  • Template Rule: Use "record" for positive transactions, "redeem" for deductions, and "new_accounts" for new customer accounts (enrollment/registration).
  • Template Content: [HTML Content] Must keep format with escape variables in special characters.
  • Only one tempalte can be created at a time. Loop this call in your program to create multiple templates at once.

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'] = 'manage_email_templates';
                $data['action'] = 'new';
                $data['template_name'] = 'Welcome Email'
                $data['template_description'] = 'Welcome Email';
                $data['template_rule'] = 'new_accounts';
                $data['campaign_id'] = '1111222233334444';
                $data['template_subject'] = 'Welcome to Amazing Rewards';
                $data['template_content'] = 'Test Email Content';
            

Success XML Response:


                <response status="success">
                    <email_template>
                        <id>7</id>
                    </email_template>
                </response>
            

Error XML Response:


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

Email Templates - Update

Update the settings of an existing email template.

field Example Note
API 1.5 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type manage_email_templates Required
action update Required
template_id 7 Required
account_id greatwidgets Required
template_name Welcome Email Required
template_description This is the email that new customers will receive when enrolling in the loyalty program Optional
template_rule record, redeem, or new_accounts Required
campaign_id all or campaign id(s) Required
template_subject Welcome to Amazing Rewards Required
template_content [HTML Content] Required
include_balance Y Optional
include_rewards Y 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:

  • Template Rule: Use "record" for positive transactions, "redeem" for deductions, and "new_accounts" for new customer accounts (enrollment/registration).
  • Template Content: [HTML Content] Must keep format with escape variables in special characters.
  • Only one tempalte can be created at a time. Loop this call in your program to create multiple templates at once.

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'] = 'manage_email_templates';
                $data['action'] = 'update';
                $data['template_name'] = 'Welcome Email'
                $data['template_description'] = 'This is the email
                that new customers will receive when enrolling in the loyalty program';
                $data['template_rule'] = 'new_accounts';
                $data['campaign_id'] = '1111222233334444';
                $data['template_subject'] = 'Welcome to Amazing Rewards';
                $data['template_content'] = 'Test Email Content';
            

Success XML Response:


                <response status="updated">
                    <template_id>7</template_id>
                </response>
            

Error XML Response:


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

Email Templates - Retrieve Information

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_email_templates Required
action info Required
template_id 7 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['user_id'] = 'john1970';
                $data['user_password'] 	= '1959caadac9b13dcb3';	
                $data['type'] = 'manage_email_templates';
                $data['action'] = 'info';
                $data['account_id'] = 'greatwidgets';
            

Success XML Response


                <response status="success">
                    <email_template>
                        <account_id>greatwidgets</account_id>
                        <template_id>7</template_id>
                        <template_name>New Customers Email</template_name>
                        <campaign_id>1111222233334444</campaign_id>
                        <campaign_name>Widget Rewards</campaign_name>
                        <campaign_subject>Welcome Email</campaign_subject>
                        <campaign_content>Test Email Content</campaign_contentt>
                        <include_balance>Y</include_balance>
                        <include_rewards>Y</include_rewards>
                    </email_template>
                </response>
            

Error XML Response:


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

Email Templates - 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 1959ca5645adac9b13dcb3 Required
account_id greatwidgets Required
type manage_email_templates Required
action list Required
include_content Y 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

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'] = 'manage_email_templates';
                $data['action'] = 'info';
                $data['account_id'] = 'greatwidgets';
            

Success XML Response


                <response status="success">
                    <email_template>
                        <account_id>greatwidgets</account_id>
                        <template_id>7</template_id>
                        <template_name>New Customers Email</template_name>
                        <campaign_id>1111222233334444</campaign_id>
                        <campaign_name>Widget Rewards</campaign_name>
                        <campaign_subject>Welcome Email</campaign_subject>
                        <campaign_content>Test Email Content</campaign_contentt>
                        <include_balance>Y</include_balance>
                        <include_rewards>Y</include_rewards>
                    </email_template>
                    <email_template>
                        <account_id>greatwidgets</account_id>
                        <template_id>8</template_id>
                        <template_name>Redemption Email</template_name>
                        <campaign_id>1111222233334444</campaign_id>
                        <campaign_name>Widget Rewards</campaign_name>
                        <campaign_subject>Redemption Email</campaign_subject>
                        <campaign_content>Test Email Content</campaign_contentt>
                        <include_balance>Y</include_balance>
                        <include_rewards>Y</include_rewards>
                    </email_template>
                    <email_template>
                    <account_id>greatwidgets</account_id>
                        <template_id>9</template_id>
                        <template_name>Accruals Email </template_name>
                        <campaign_id>1111222233334444</campaign_id>
                        <campaign_name>Widget Rewards</campaign_name>
                        <campaign_subject>Accruals Email</campaign_subject>
                        <campaign_content>Test Email Content</campaign_contentt>
                        <include_balance>Y</include_balance>
                        <include_rewards>Y</include_rewards>
                    </email_template>
                </response>
            

Error XML Response:


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

Email Templates - Delete

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_email_templates Required
action delete Required
template_id 7 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['user_id'] = 'john1970';
                $data['user_password'] 	= '1959caadac9b13dcb3';	
                $data['type'] = 'manage_email_templates';
                $data['action'] = 'delete';
                $data['account_id'] = 'greatwidgets';
            

Success XML Response


                <response status="success">
                    <template status="deleted">
                        <id>7</id>
                    </templaten>
                </response>
            

Error XML Response:


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