Infusionsoft Integration

Link Infusionsoft with Event Espresso, so your attendees are moved to Infusionsoft as their event registrations are completed. Your campaigns in Infusionsoft will then take over and work for you around the clock so you can send event -specific information to attendees or even invite attendees to register for future events.

The basic contact information including a name and email address are sent along with their address. The information is stored in Infusionsoft –> Contacts –> General. The address for the registrant is copied to Contacts –> Address and a note is made in Contacts –> Person Notes. An invoice is also created which includes the event name and amount paid.

View quick links for this integration –> 

Need documentation for Event Espresso 3?


Need to Buy a Support License for the Event Espresso 4 Infusionsoft Integration?
Purchase a support license for the Infusionsoft integration for Event Espresso

Event Espresso 4 Infusionsoft Integration

This add-on is a plugin for WordPress and can be installed through your WP dashboard (WP-admin). Here are the steps on how to install the Infusionsoft add-on for Event Espresso 4.

Download the latest version of the Infusionsoft integration for Event Espresso 4 from your Event Espresso account.

Then login to your WordPress dashboard (WP-admin) and go to Plugins. Next, click on Add New –> Upload and browse to the plugin on your computer. Then select the zip file and begin the upload process. Wait for the plugin to upload and then click on Activate.

Locate your Credentials for Infusionsoft

Your credentials for Infusionsoft can be found in your Infusionsoft dashboard.

Infusionsoft uses a specific set of credentials (Application name, Encrypted Key) and here is how to find them.

1) Log in to your dashboard on Infusionsoft.com

2) Look in the top left area of your screen and hover over the Infusionsoft logo and you’ll see a menu expand

3) In the lower right area of the expanded menu, under Admin you’ll see a Settings link. Go ahead and click on the Settings link under the Admin area

4) You’ll now see the All Application Settings screen. Look for Application in the left menu and click on it.

5) Scroll down towards the end of the page for the API section. Look for the Encrypted Key and copy it.

6) In a new browser tab, go to your WordPress dashboard and look in the left admin menus for Infusionsoft and click on it.

7) Paste in your Encrypted Key in the field for it.

8) Switch back to your browser tab that has your Infusionsoft dashboard open and look at the web address or URL in your browser. It will appear something like this: abc123.infusionsoft.com. The information before the “.infusionsoft.com” is your Application Name. In this example, the Application Name is abc123. Copy your Application Name.

9) Switch to your other browser tab for your WordPress dashboard and add the Application Name and then save changes by clicking on the Save button.

If you are not accepting payments through Infusionsoft directly, then you are all set. You’ll now see attendee/registrant information flow into Infusionsoft as registrations take place on your WordPress site.

Accept payments through Infusionsoft

Accepting payments through Infusionsoft requires a Merchant ID.

1) Login to your Infusionsoft.com dashboard

2) Look in the top left area of your screen and hover over the Infusionsoft logo and you’ll see a menu expand

3) Look for the E-commerce menus area and then click on Settings.

4) You’ll now see the Product screen. Look for Payment Processing and then click on Merchant Account.

5) Follow Infusionsoft’s guide to set up payments with Infusionsoft:
https://classic-infusionsoft.knowledgeowl.com/help/infusionsoft-payments-setup-guide

6) Contact Infusionsoft to get your Merchant ID, or if you prefer working through a scavenger hunt to find it, follow Infusionsoft’s guide to How to locate your Merchant Account ID

7) Make a note to remember that number and then go to your WordPress dashboard.

8) Look in the menus on the left side of the screen for Event Espresso and click on Payment Methods. Now look for Infusionsoft and click on it and then click the button to activate it.

9) Scroll down and look for the Merchant ID field and then add in your Merchant ID which is the number that you obtained in step 6.

10) Click the boxes for the types of cards that you want to accept (e.g., VISA, American Express, Discover, Mastercard) and then save changes by clicking on the Update button.

You are now ready to accept payments through Infusionsoft for Event Espresso on your WordPress site.

Setup and Configuration for the EE4 Infusionsoft Integration

From your WP dashboard, go to Event Espresso —> Infusionsoft Settings.

Infusionsoft Integration - Settings


Your credentials for Infusionsoft can be found by following the steps in the previous section.

Usage

Once the Infusionsoft integration is installed, all new registrations are automatically captured, as “Contacts” within your Infusionsoft account. If you accept payments using Event Espresso, then we only send the payment information to Infusionsoft, when the payment is first approved.
Infusionsoft Quick Overview

Then you can send the contact an Invoice, or payment reminder, from your Event Espresso powered website or your Infusionsoft app. If you update the payment status on your website, for that person, it will also update the payment status of the order that was created for the client.
infusionsoft-integrated-paymets

This image shows a high-level overview of how the Event Espresso Infusionsoft integration works:

infusionsoft Integration -- infographic

Troubleshooting the Event Espresso 4 Infusionsoft Integration

The plugin does not work as expected. Can you help?
Please double-check your credentials that are entered into the Infusionsoft settings pages within your WordPress dashboard. Ensure that no extra spacing appears before or after the credentials. The gateway field requires a numeric value and not a full website address.

I’m seeing this error: InvalidConfig infusionsoft. What does it mean?
Please contact Infusionsoft support to have them review your account. See this page for more information: http://community.infusionsoft.com/showthread.php/17346-API-quot-Invalid-Configuration-quot?highlight=InvalidConfig

Frequently Asked Questions

Are partial or overpayments available?
If a customer makes a partial payment or overpays for their registrations, then the payment will not be recorded in Infusionsoft. This is a limitation of Infusionsoft, and more information is available here:
http://community.infusionsoft.com/showthread.php/20192-Payments-that-would-make-the-order-overpaid-are-ignored?p=51856#post51856

If an overpayment is made in Event Espresso, then manually apply the payment within your Infusionsoft dashboard and take note of the actual payment amount the Order Notes field.

When registering for an event, are Event Espresso using products set up in Infusionsoft for each registration?

Event Espresso dynamically creates a product record in Infusionsoft if the product is not already present, then each event registration record in Event Espresso will be assigned to an Infusionsoft product.

Does Event Espresso block the purchaser from entering the same email address for all of their attendees?

In our internal tests, it seems that a new Infusionsoft contact record was created for each different person:

Infusionsoft Integration - No duplicate records

 

How will I be able to differentiate between several contacts with the same email address?

Event Espresso only considers two attendees/contacts duplicates if they have the same first name, last name, and email address. In both Event Espresso and Infusionsoft, you can differentiate between contacts with the same email by their names and IDs.

Can one person purchase multiple tickets, and supply the names of all the attendees at the time of checkout? If so, will all those names be integrated over into Infusionsoft, and new IS contact records created for any attendees who do not currently have one?

Yes, and yes. You can set this up when creating the event to include specific registration forms. At a minimum, the first name and email address are required for each attendee.

During checkout, do we have the ability to ask two custom questions that could then trigger tags in Infusionsoft?

Yes. However, this will require some custom coding. Here’s the documentation for that:
https://eventespresso.com/wiki/infusionsoft-integration/#ee4customizations

Can I add custom questions during checkout for all attendees and trigger MULTIPLE tags in Infusionsoft for each attendee?

Yes, this code sample shows that you can apply tags to multiple questions:
https://eventespresso.com/wiki/infusionsoft-integration/#conditional-tagging-multiples

 

Customizations for the Event Espresso 4 Infusionsoft Integration

Our support team cannot write custom coding for you. Below are some examples on customizing this integration.

Tagging Event Attendees

As of version 2.2 of the Infusionsoft add-on, you can easily tag contacts when registering for events, so that registrants that are added to Infusionsoft are tagged when signing up for an event. Since event managers might want to assign event attendees to more than one tag, we’ve added a way to select for each event from within the event editor (hold the “SHIFT” key on your keyboard to select multiple tags):

Each new attendee will be tagged with the selected tags for the event. If the contact already exists within your Infusionsoft account, then new tags will be added automatically.

Before using this feature, please make sure you have created custom tags within your Infusionsoft account. You can learn how to create tags in Infusionsoft by reviewing this guide:
https://classic-infusionsoft.knowledgeowl.com/help/create-a-tag

Conditional Tagging of New Contacts

This is done by tagging new contacts with keywords based on selections chosen in your event registration forms. To get started, please make sure you have added at least one Custom Question, assigned it to a question group that is currently assigned to an event. Once you have added custom questions to Event Espresso, within your WordPress dashboard, visit the Event Espresso > Infusionsoft > Conditional Tagging Setup tab. From this tab, you can assign custom registration questions to Infusionsoft tags:

Once the custom questions are assigned to a tag, then someone registers and answers one of the assigned questions, the contact record within Infusionsoft will be updated with the selected tags. Here’s an example of what you would see in Infusionsoft when this feature is triggered:

Infusionsoft Integration Multiple Tags

Saving Registration Form Answers as Standard or Custom Fields

Sometimes you need to save additional information for a contact in Infusionsoft. With the Event Espresso 4 Infusionsoft integration you can save additional information captured from your event registration form. The information can be saved as a standard or custom contact data field within a contact’s record.

First, you add your custom questions to Event Espresso > Questions. Then add the questions to a question group and assign the question group to the applicable event(s). Now, within your WordPress dashboard, visit the Event Espresso > Infusionsoft > Custom Fields Setup tab. There you can assign custom registration questions to Infusionsoft tags:

Affiliate Tracking

Tracking affiliate sales using the Event Espresso Infusionsoft is relatively simple. See information at Infusionsoft about Creating Referral Partners and Referral Tracking Links.

Simple method
The easiest way to track referrals is by appending the URL to your event registration page, with the “ref” URL parameter and the referral partner code or the “affiliate” parameter and the referral partner id.

Examples:
http://www.example.com?ref=johnDoe

http://www.example.com?affiliate=1234

Tracking not working?
If that process doesn’t work, look into the caching of your site. Anyone using Varnish (such as WP Engine) will have to add exceptions for Event Espresso pages on your site manually. The standard pages are:

/register/
/events/
/registration-checkout/
/transactions/
/thank-you/
/referral.html

 

Extra Hooks

Sending Custom Parameters Upon Creation of a New Product in Infusionsoft

Since the Infusionsoft API creates a new product each time an event is booked for the first time, you may need the API set up a few defaults when it creates the new product. For example, if you live in Germany, you may need to tell Infusionsoft to charge taxes for each registration and display the tax amount on the invoice that is generated by Infusionsoft.

/**
* Adds custom data to IS products
* @param array $original_info_to_send as documented on http://help.infusionsoft.com/developers/tables/product
* @param EE_Ticket $ticket the EE ticket which is used to create/update the IS product
* @return array
*/
function ee_is_new_product_details($original_info_to_send, $ticket ){
    //always mark all products as country taxable (equivalent to EE3 code snippet)
    //$original_info_to_send['CountryTaxable'] = 1;

    //mark product as country taxable only if its taxable normally, probably more useful
    if( $ticket instanceof EE_Ticket && $ticket->taxable() ){
        $original_info_to_send['CountryTaxable'] = 1;
    }
    return $original_info_to_send;
}
add_filter('FHEE__EEE_Infusionsoft_Ticket__sync_to_infusionsoft__product_data','ee_is_new_product_details',10,2);

See more customizations in the code snippet library for Event Espresso.

Need to Buy a Support License for the Event Espresso 4 Infusionsoft Integration?
Purchase a support license for the Infusionsoft integration for Event Espresso




Installing the Event Espresso 3 Infusionsoft Integration

This integration requires Event Espresso 3.1.33 or newer. It cannot be used with old versions of Event Espresso 3.
Need to Buy a Support License for the EE3 Infusionsoft integration?
https://eventespresso.com/product/espresso-infusionsoft/

This add-on is a plugin for WordPress and can be installed through your WP dashboard (WP-admin).

Download the latest version of the Infusionsoft integration for Event Espresso 3 from your Event Espresso account.

Then login to your WordPress dashboard (WP-admin) and go to Plugins. Next, click on Add New –> Upload and browse to the plugin on your computer. Then select the zip file and begin the upload process. Wait for the plugin to upload and then click on Activate.

Setting up the EE3 Infusionsoft Integration

From your WP dashboard, go to Event Espresso —> Infusionsoft Settings.

event-espresso-infusionsoft-settings

Your Application Name
Check the URL of your Infusionsoft® App when you visit the login screen, the first part of the domain prior to “.infusionsoft.com/…” is your application name. For example “1234” is our application name.

Infusionsoft Application Name

Your Encrypted KeyYour Infusionsoft® API Key will be the most challenging code to find to connect Event Espresso with your Infusionsoft® application (It’s really not THAT hard! less than 1 minute).

Navigate over the “Infusionsoft” logo at the top left of your application and allow the menu to drop down. On the far right of the main menu, under the “Admin” section, go to “Settings”.

infusionsoft-menu-settings

On the Left side of the “Settings” page, there’s a menu, click on “Application”.
infusionsoft-settings-general

Scroll down on that page to the header that says “API”. The top two options are what we need to connect Event Espresso with your Infusionsoft® application. If you or another administrator has setup your API settings before, then there should be an alphanumeric (letter and number) code to the right of the “Encrypted Key:” label. If there is no alphanumeric code next to the “ENCRYPTED KEY” LABEL we just need to generate it. This can be done by entering a random code or password (that you’ll remember) into the textbox labeled “API Passphrase” and scroll down to the bottom and click “Save”. If you scroll back down to the “API” section, there should be an alphanumeric code for your Encrypted Key.

infusionsoft-app-key

KEEP IN MIND: This API key should only be shared internally and with contractors and should not be given to any other outside sources other than API Developers seeking to integrate your Infusionsoft® application with third-party applications and services that may require it for setup.

Infusionsoft Hosted Gateway Settings — (optional, EE3 only)

This is only needed if you are using Infusionsoft to process payments

Infusionsoft hosted gateways are only available for Event Espresso 3 at this time.

To start using the Infusionsoft payment system on your site. You will need to retrieve the “Merchant ID” from your Infusionsoft account and activate the “Infusionsoft Payment Settings” in your Event Espresso payment settings.

Activate the Infusionsoft payment option
Go to WP Admin > Event Espresso > Payment Settings > Infusionsoft Payment Settings, expand the meta box and click the green “Activate Infusionsoft Payment Gateway button”. Then go to the WP Admin > Event Espresso > Infusionsoft Settings page and enter the “Merchant ID” into the provided field (more info below).

Finding the Merchant ID within Infusionsoft
To get your Merchant ID, log into your Infusionsoft account. Navigate over the “Infusionsoft” logo at the top left of your application and allow the menu to drop down. On the far right of the main menu, under the “E-Commerce” section, go to “Settings”.

infusionsoft-menu-ecommerce-settings

Click on the Merchant Accounts tab in the left pane. Click the edit link next to the desired merchant account name.
infusionsoft-merchant-accounts

In the URL of the edit page, there will be an “ID” parameter. Copy the ID and enter it into the “Merchant ID” field within the Event Espresso Infusionsoft Settings (the WP Admin > Event Espresso > Infusionsoft Settings page).

infusionsoft-merchant-id

Using the Event Espresso 3 Infusionsoft Integration

Once the Infusionsoft integration is installed, all new registrations are automatically captured, as “Contacts”, within your Infusionsoft account.
Infusionsoft Quick Overview

Then you can send the contact an Invoice, or payment reminder, from your Event Espresso powered website or your Infusionsoft app. If you update the payment status in your website, for that person, it will also update the payment status of the order that was created for the client.
infusionsoft-integrated-paymets

This image shows a high-level overview of how the Event Espresso Infusionsoft integration works:

infusionsoft-infographic

Troubleshooting the Event Espresso 3 Infusionsoft Integration

The plugin does not work as expected. Can you help?
Please double-check your credentials that are entered into the Infusionsoft settings pages within your WordPress dashboard. Ensure that no extra spacing appears before or after the credentials. The gateway field requires a numeric value and not a full website address.

I’m seeing this error: InvalidConfig infusionsoft. What does it mean?
Please contact Infusionsoft support to have them review your account. See this page for more information: http://community.infusionsoft.com/showthread.php/17346-API-quot-Invalid-Configuration-quot?highlight=InvalidConfig

Are partial or overpayments available?
If a customer makes a partial payment or overpays for their registrations, then the payment will not be recorded in Infusionsoft. This is a limitation of Infusionsoft and more information is available here:
http://community.infusionsoft.com/showthread.php/20192-Payments-that-would-make-the-order-overpaid-are-ignored?p=51856#post51856

If an overpayment is made in Event Espresso, then manually apply the payment within your Infusionsoft dashboard and take note of the actual payment amount the Order Notes field.

Customizations for the Event Espresso 3 Infusionsoft Integration

Our support team cannot write custom coding for you. Below are some examples on customizing this integration.

Tagging New Contacts

The Infusionsoft integration does not have the capability to pass custom questions to Infusionsoft at this time. It seems that Infusionsoft forces you to have a “groupId” (their API term for tags) in order to assign the contact to a tag.

However, we did add way to tag contacts when registering for events, so that registrants that are added to Infusionsoft are tagged when signing up for an event. You can add “infusionsoft_tag_id” meta key and your Tag ID in the value field of the “Event Meta” section of the event editor.

event-meta-tag

More information about creating tags in Infusionsoft:
http://help.infusionsoft.com/userguides/contact-management/search-and-tag-contacts/create-edit-or-delete-a-tag

You can find your Tag IDs in your Infusionsoft account. The Tag IDs appear in the ID column.

Image

Affiliate Tracking

Tracking affiliate sales using the Event Espresso Infusionsoft is fairly simple. Creating Referral Partners (affiliates) and Custom Tracking Links.

Simple method
The easiest way to track referrals is by appending the URL to your event registration page, with the “ref” URL parameter and the referral partner code or the “affiliate” parameter and the referral partner id.

Examples:
http://www.example.com?ref=johnDoe

http://www.example.com?affiliate=1234

Tracking not working?
If that process doesn’t work, look into the caching of your site. Anyone using Varnish (such as WP Engine) will have to manually add exceptions for Event Espresso pages on your site. The standard pages are:
/register/
/event-registration/
/transactions/
/thank-you/
/referral.html

Conditional Tagging of New Contacts

This is done by tagging new contacts with keywords based on selections chosen in your event registration forms. By placing a relatively small amount of code into your site specific plugin, you can start tagging new contacts!

Some programming knowledge may be required!

How do I find the question field name in Event Espresso?

You will need to output the $_POST variables or your registration to the screen or view the source of the HTML document to make sure you have the correct field names and question id to implement the following code.

For example, in the code below, we use `SINGLE_26` (comprised of the question type and the question id), which can be retrieved from our registration form, to change the value of the $gender_tag_id variable based on the answer given in the registration form for this particular question. The value of the $gender_tag_id variable is the id of a tag created in Infusionsoft. For more information about creating tags in Infusionsoft, please refer to the Infusionsoft documentation.

The question field name can be found by viewing the source code of your Event Espresso registration form, then find the question that you would like to use, and copy the name of the question from the HTML source.

question-field-name

How do I find the tag ID?
To find the tag id in Infusionsoft. You will need to go to Infusionsoft > CRM > Settings > Tags in the Infusionsoft menu (screenshot: http://www.screencast.com/t/yP7vqZK1).

infusionsoft-tag-id

Sample code for conditional tagging
Use the following code to tag new contacts based on the questions selected in your event registration forms.

function espresso_infusionsoft_save_additional_tags($cust_id) {
	global $ee_infusionsoft;

	//Question types
	//DROPDOWN
	//MULTIPLE
	//SINGLE
	//TEXT
	//TEXTAREA

	//Substitute `SINGLE_26` for the question type and the question id

	//Example "Gender" question
	if ( isset($_REQUEST['SINGLE_26']) && !empty($_REQUEST['SINGLE_26']) ){
		switch (stripslashes_deep($_REQUEST['SINGLE_26'])){
			case "Male":
				$gender_tag_id = 105;
				break;
			case "Female":
				$gender_tag_id = 107;
				break;
		}
		$ee_infusionsoft->grpAssign($cust_id, $gender_tag_id);

		//Debugging tools
		//echo '<h4>$cust_id : ' . $cust_id . '  <br />' . __FILE__ . '<br />line no: ' . __LINE__ . '</h4>';
		//echo '<h4>$gender_tag_id : ' . $gender_tag_id . '  <br />' . __FILE__ . '<br />line no: ' . __LINE__ . '</h4>';
		//echo '<h4>$_REQUEST : <pre>' . print_r($_REQUEST,true) . '</pre> <span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';

	}
}
add_action('action_hook_espresso_infusionsoft_save_attendee_after', 'espresso_infusionsoft_save_additional_tags', 100, 1);

Saving Registration Questions as Standard or Custom Fields

Sometimes you need to save additional information for a contact in Infusionsoft. Using the following code, added using your site specific plugin, you can save any additional information, from your event registration form, as a standard or custom (video tutorial) contact data field, within a contact’s record.

Some programming knowledge may be required!

How do I find the question field name in Event Espresso?
Please see this example above for more information about finding the registration form field names.

How do I find the standard field names in Infusionsoft?
This table on the Infusionsoft website holds contact record data as well as custom contact fields. However, you will not see the custom fields listed in the fields, as these are custom to each different Infusionsoft application.

In the example below I’ve used “Website” as the standard Infusionsoft field to be updated. You would replace this field with the name for the appropriate Infusionsoft field you wish to update using the table link provided.

How do I assign Event Espresso fields to the Custom Field names in Infusionsoft?
To assign Infusionsoft custom fields, to the custom questions you created in Event Espresso, you just need to add the Infusionsoft custom field name, without spaces and prepend with an underscore, to the code below. For example, if your Infusionsoft custom field name is “Custom Question”, then the filed name will be “CustomQuestion” in the Infusionsoft database. Since we are accessing this custom field name using the Infusionsoft API, you will need to prepend the custom field name with an underscore, like so: “_CustomQuestion”

The “SINGLE_48” field name, used in the example below, refers to the custom question created within Event Espresso.

function espresso_infusionsoft_save_extra_fields($attendee_data) {
	$clean_attendee_data = array(
					//Example of standard (pre-existing) contact data field field in Infusionsoft
					//List of standard fields: http://help.infusionsoft.com/developers/tables/contact
					'Website'			=> isset($_REQUEST['SINGLE_48']) ? $_REQUEST['SINGLE_48'] : '' , 

					//Example of a custom contact data field
					//NOTE: You must prepend custom field database names with an underscore when accessing them through the API
					'_CustomQuestion'	=> isset($_REQUEST['TEXT_52']) ? $_REQUEST['TEXT_52'] : '' , 
				);

	return array_merge($attendee_data, $clean_attendee_data);
}

add_filter( 'filter_hook_espresso_infusionsoft_extra_attendee_data', 'espresso_infusionsoft_save_extra_fields', 10, 1 );

Extra Hooks

Sending Custom Parameters Upon Creation of a New Product in Infusionsoft

Since the Infusionsoft API creates a new product each time an event is booked for the first time, you may need the API set up a few defaults when it creates the new product. For example, if you live in Germany, you may need to tell Infusionsoft to charge taxes for each registration and display the tax amount on the invoice that is generated by Infusionsoft.

/**
* Adds custom data to IS products
* @param array $original_info_to_send as documented on http://help.infusionsoft.com/developers/tables/product
* @param array $payment_details like columns on the event_details table
* @return array
*/
function ee_is_new_product_details($original_info_to_send,$payment_details){
$original_info_to_send['Taxable'] = 1;
$original_info_to_send['CountryTaxable'] = 1;
return $original_info_to_send;
}
add_filter('filter_hook_espresso_infusionsoft_event_product_data','ee_is_new_product_details',10,3);

Changing the Country Field to a Drop Down (EE3 only)
Since the country field is a textfield, sometimes people might type in any version of their country, which may cause problems with some payment gateway providers. This problem can be easily overcome by changing the textfield to a dropdown, so you can specify a list accepted countries.

/**
* Changes the original, regular country input used in infusionsoft to a dropdown
* @param string $original_html
* @param string $country
* @return string
*/
function ee_is_swap_country($original_html,$country){
$values = array(
array('id'=>'germany','text'=> __("Germany", 'event_espresso')),
array('id'=>'france','text'=> __("France", 'event_espresso')),
//add any other cuontries you want to accept
);
return select_input('country', $values, $country);
}
add_filter('filter_hook_espresso_infusionsoft_billing_country_input','ee_is_swap_country',10,3);
Need to Buy a Support License for the EE3 Infusionsoft integration?
https://eventespresso.com/product/espresso-infusionsoft/

Posted in | Comments Off on Infusionsoft Integration

EE3 Espresso Price Modifier Add-on

The Espresso Price Modifier add-on is only available as a Pre-release download.
Event Espresso 3.1.33 or newer is required. Not compatible with Event Espresso 4.

Espresso Price Modifier allows you to add or subtract items from your events to help you sell products, services and more.

The Espresso Price Modifier Add-on is not compatible with the Multiple Event Registration Add-on.

This add on works via Questions and Question groups.

Once it has been installed and activated, head over to the Questions menu page.

Here you can add a new question just like normal.

However if you select either Drop-down, Radio or Check-box question types and new option will appear called “Modifies Event Price”.

If you choose Yes to turn it on, the figures entered here will modify the final ticket price in any event where this question is attached.

espresso price modifier

When entering the possible answers for the question’s you need to follow a specific structure.

Normally a dropdown, etc answer choice is formatted:

answera, answerb, answerc

To use the Espresso Price modifier you must use a vertical bar (also known as a “pipe”) character: |

This character can be made by typing Shift and \ on a US Keyboard, other keyboard layouts will vary – UK and Europe keyboards will often access it via the AltGr key plus the key with the pipe symbol on it.

This will split off the answer from the price, as follows:

answera|10.00, answerb|15.00, answerc|20.00

prices

Some things to be aware of:

  • Please do not include a currency symbol such as $ or £.
  • Be consistent with the trailing zeros, use them or don’t, but the system will not automatically set them.
  • The system will round up or down at the point of purchase, if you choose to go further than 3 characters after the period. eg 10.015 becomes 10.02. It will show the extra characters before that point however.

Negative prices

It is possible to use negative prices for items. This will successfully deduct the amount from the total. However, if the overall price goes to a negative, the event wil be marked as free, but the registration will NOT complete, as the prices do not equal. So only use negative prices when they will not bring the full price into negative, or be aware of what will happen and deal accordingly.

Add these newly created questions to a new or existing Question Group.

Head over to the event you want to use or create a new event as normal, and make sure that the correct question group is selected for the Primary and Additional (if you wish) attendees.

If you don’t take additional attendee data then they will not be shown the price modifier questions.

The Espresso Price Modifier add-on is only available as a Pre-release download.

Posted in | Comments Off on EE3 Espresso Price Modifier Add-on

EE3 Front-end Event Manager Add-on

The Front-end Event Manager add-on is only available as a Pre-release download.
Event Espresso 3.1.29 or newer is required.

The Front-end Event Manager add-on is a tool to allow users to create basic events from the front end of the site, so they do not need to be given specific roles and permissions or visit the dashboard of the site.

The users still need to be registered and logged in to use the Front End Manager so it is still advised to use a system like S2Member or other content restriction plugins to limit who can and cannot use the front end posting service, otherwise, you may get a lot of spam events.

Usage

It is really easy to set up. First of all install and activate the add on plugin as you would with any other plugin.

Then create a basic WordPress page and add the following shortcode:

[ESPRESSO_CREATE_EVENT_FORM]

On viewing the this page you will now see a form allowing you to create events. Most of the functionality of the dashboard event editor is shown in the front end, though certain aspects have been restricted for ease and security.

You are allowed to create:

  • Event Title
  • Registration Limit – number of tickets or spaces available
  • Description (includes a text editor and ability to add images)
  • Event and registration dates and times – as per normal these are required, defaults will be used if they are not filled in
  • Pricing – Standard Pricing only, no Member pricing
  • Categories – you can only select pre-created categories, not create new ones
  • Venues – creates a single venue – if the venue manager is turned off, any valid venue added here will be created and saved to the database but not used
Front-end Event Manager

Front-end Event Manager

Admin Options

All options are found in the Front End Manager section of the Template Settings page.

Show Category section: displays/hides the category section
Show Pricing section: displays/hides the pricing section
Show Venue section: displays/hides the venue section. Note that the Venue Manager must be turned on in the General Settings for you to see and use venues.

The Front-end Event Manager add-on is only available as a Pre-release download.

Posted in | Comments Off on EE3 Front-end Event Manager Add-on

Espresso Requirements Check

The Espresso Requirements Check plugin is a plugin you can install and activate on your site that can give you some diagnostic information and tell you if there are any immediate problems with your server environment that may lead to issues down the road with Event Espresso or other plugins. It is not meant to be a be-all, end-all definition of whether your server will run Event Espresso well or not, but rather to point out some areas that are easily identifiable and give some simple suggestions on how to address these issues.

Installing the plugin

Download the Espresso Requirements Check plugin from the Requirements page or the link below. When it’s done downloading, you will have a .zip archive of the plugin.

[download id=”1″ format=”3″]

In your WordPress dashboard, navigate to the Add New plugin page in the Plugins menu.

add-new

From there, click the Upload link to upload a new plugin from its’ zip file.

upload-plugin

Click the “Choose File” button and navigate to where you downloaded the .zip file, then click “Install Now”. Once the plugin is done installing, click Activate Plugin.

Using the Requirements Check

Right away, on the Plugins page, you’ll see an alert that will tell you if your server is optimized for Event Espresso or not. This will either be a green (your server meets the recommended requirements), yellow (your server meets the minimum requirements but there may be some room for improvement) or red (your server has failed the check) alert. Most of the time this will be yellow or green.

apache_get_modules

This alert will contain a link to the Espresso Requirements Check overview page, which can also be accessed from the Tools menu. The Requirements Check overview displays the results of a series of checks into your server environment. The plugin checks your PHP, MySQL and WordPress versions to determine whether your server meets the minimum requirements to run Event Espresso and also displays the recommended versions if the version your server is using is less than the recommendation but meets the minimum requirement. The plugin will check whether WP_DEBUG is turned on, run some checks into the theme you are using and whether it’s likely to cause issues or conflicts, and runs a number of checks into specific Apache or PHP functions.

requirements-check

In some cases, warnings may display because the plugin wasn’t able to determine one way or another if certain modules or Apache functions were found. This is okay. Read each message carefully to make a decision about whether or not they need a specific action done to correct the issue. If you have any questions, contact your host or post a question in our support forums.

apache_get_modules

Other useful features

Besides being able to tell you whether your server is likely to run Event Espresso or not, the requirements check plugin includes a number of useful features that are more general in nature. For example, the Espresso Requirements Check plugin will tell you how much PHP memory you are currently using.

php-memory

You can use the requirements check plugin to quickly view your PHP and server configuration information.

phpinfo

When available, you may use the plugin to see the installed Apache modules.

This feature depends on your server configuration and will not display if the apache_get_modules function cannot be run.

apache-modules

If it exists, you can also use the plugin to view the contents of your .htaccess file.

htaccess

It’s not generally recommended to leave the Espresso Requirements Check plugin active. This is because you do not generally need these checks to constantly be taking place on your server. Once you have the information you need, it’s usually best to deactivate the plugin. You can re-activate the plugin later if you need to use it for any of the information that the requirements check Tools page provides. Alternately, the TPC Memory Usage plugin also contains much of this information and can also be used to generate reports and checkpoints based on specific criteria. Go to the TPC Memory Usage plugin page to learn more about what that plugin can do.

[download id=”1″ format=”3″]

Posted in | Comments Off on Espresso Requirements Check

How To Create Custom Themeroller Styles

Event Espresso uses jQuery’s awesome Themeroller system by default to help style the events and calendar. You can of course use default CSS instead, but if you want to use Themeroller and be able to style it to meet your needs, listen up.

Step 1 – Design

Head over to the Themeroller site, http://jqueryui.com/themeroller/, and on the left hand side is a menu entitled Roll Your Own.

Here you can customise and change the styles in real time by selecting the different options.

As a quick example you can change the “bar” effect behind the event titles like this:

themeroller-ui

Once you have the design that you want click the Download Theme button at the top of the left hand menu.

You will be taken to the Download Builder. Here you will be faced with lots of options, but not to worry, we don’t need any of these.

Where it says “Components Toggle All” and make sure the box is un-ticked.

themeroller-toggle-all

After that, scroll to the bottom of the page and add your custom styles name into the box called Theme Folder Name.

Then click the Download button.

Step 2 –Change the files

Ok, so now we need to make the files compatible with Event Espresso, and this is generally best done on your computer.

Unzip the Zip archive that you downloaded earlier from Themeroller.

There are a few files in here but the ones we want are in the CSS folder, in a sub folder with the name you gave it in step 2. In my example it is called “my-custom-theme”.

Inside that folder will be an images folder and two files:

jquery-ui-X.custom
jquery-ui-X.custom.min

X equals the version number. Both of these files are the same except one has been minified  (made un-readable for humans but smaller).

Choose one and delete the other.

Rename the remaining file to style.css (Windows users, just rename it to style, Windows will keep the .css intact for you).

You will be left with the following

My-custom-theme directory
                Style.css
                Images directory
                                Various images

Step 3 – Upload and activate

Using FTP or your control panels file manager, navigate to your wp-content/uploads/espresso directory of your site.

In this directory create a new directory called themeroller.

In side this directory create a new php file called index.php. It must be blank.

Upload your custom themes files and direcotries keeping the structure, so you will end up with:

wp-content/uploads/espresso/themeroller/index.php
wp-content/uploads/espresso/themeroller/my-custom-theme/
wp-content/uploads/espresso/themeroller/my-custom-theme/style.css
wp-content/uploads/espresso/themeroller/my-custom-theme/images/
wp-content/uploads/espresso/themeroller/my-custom-theme/images/various image files.

Now log into your WordPress dashboard and go to Event Espresso > Template Settings. Scroll down to the Stylesheet Options and choose your custom theme from the Themeroller Style dropdown menu and click Save Options.

template-settings-options

Now you will have a good looking, unique style for your site.

Posted in | Comments Off on How To Create Custom Themeroller Styles

Using a Custom Invoice Template to Support VAT

If you use Event Espresso outside of the United States, you are probably already aware of the limitation of the invoicing system that prevents a surcharge to be applied to the invoices produced by Event Espresso. In the past, we have provided an invoice template that supports a percent surcharge to be used as VAT that was given to us by one of our customers, but due to some changes in the Event Espresso core codebase, this file has been deprecated and no longer works. As such, we’ve made some changes to the file and provided it for free on GitHub. Here’s what you need to know and how to use it.

Get the file

You can download the file from the GitHub Gist page. Click on the Download File button to get a zipped version of the file.

Extract that file to get the actual template.php file.

Make some changes (required)

Out of the box there is one thing you should do right off the bat. The template file will display your VAT id, but for the security and privacy of the original author of the file, we’ve replaced their VAT id with XX’s. You can choose to display your VAT id (or not) by either replacing the XX’s or commenting out the line entirely. You can do this by opening the `template.php` file in a plain text editor and either going to line 198 or doing a search for “VAT registration number”:

		$this->Cell(155, 10, 'Total:', 0, 0, 'R');
		$this->Cell(35, 10, html_entity_decode($currency, ENT_QUOTES, 'ISO-8859-15') . number_format($total_cost,2, '.', ''), 0, 1, 'C');
		$this->Ln(20);
		$this->Cell(190, 10, 'VAT registration number: XXX XXXX XX.', 0, 0, 'R'); // replace with your VAT ID or comment this line out
Tip: It’s best to use an editor that’s actually designed for code so you can see line numbers. While Notepad (for Windows) and TextEdit (for Mac) will work, we recommend using an actual IDE for making changes to code, like Sublime Text, Notepad++, or NetBeans.

That’s all you need to change. By default, the invoice hides the “Pay Online” link that takes users to the payment page on your site to pay for their registration. If you want to show this, you will need to uncomment line 284:

 
$pdf->SetFont('Arial','BU',20);
//$pdf->Cell(200,20,'Pay Online',0,1,'C',0,$payment_link);//Set payment link
 

Upload the template

Once you’re done editing, save and upload the file to /wp-content/uploads/espresso/gateways/invoice/. You will likely need to create this directory if you have not been using a modified invoice template already. The only thing you should have in this folder at the end of this is the template.php file. Once it’s uploaded, Event Espresso will use your customized invoice template instead of the default invoice template.

Posted in | Comments Off on Using a Custom Invoice Template to Support VAT

Widgets

The Event Espresso core and add-on plugins have widgets. Here is a list of them and their settings.

Event Espresso Upcoming Events Widget

This widget enables you to add a list of upcoming events to your sidebar or widgetised area. It displays the title of the event which is also a link to that events registration page.

Requires: Event Espresso core plugin

Settings

  • Title: The title displayed before the list of events
  • Event Category: If there are any event categories, you can specify one here. If one is set it will only show events from that category.
  • Limit: The maximum number of events to list.
  • Show Expired Events?: Show/hide any events that have closed. Default no.
  • Show Waitlist Events?: Show/hide any events that are being used for waitlisting. Default no.
  • Show Deleted Events?: Show/hide any events that have been deleted in the admin. Default no.
  • Show Recurring Events?: Show/hide any events that are recurring. Default no. Note: if this is set to no, absolutely no recurring events will be listed. If it is set to yes, all recurring events are listed.

Event Espresso Calendar Widget

This widget shows a small scale calendar in your sidebar or widgetised area. It has tooltips for event name only as days with events are marked with a tick icon.

Requires: Events Calendar add-on + Event Espresso core plugin

Settings

  • Title: The title displayed before the calendar widget.
  • Display Expired Events?: Show/hide any events that have closed. Default no. Note: If you have a lot of old events, having this set to no can help with page load time.
  • Display Single Category?: Add a category name here to only show events from that category on the calendar widget.
  • Calendar Page: Add the location of the calendar (e.g. http://www.yoursite.com/calendar) here. It will enable the calendar to show everywhere but where the main calendar is. If not set, the widget may not show in all sidebars. The widget will never show on the actual calendars page due to conflict issues.
Duplicate Calendar
If you are experiencing a duplicate calendar, it is due to the widget being active on the same page as the calendar itself. Enter the calendar pages’ url or page ID number into the Calendar Page field in the widget to resolve the duplication.

Posted in | Comments Off on Widgets

Mobile Apps

HD App

The Event Espresso HD app for iPad, iPhone, and Android, allows you to transform your iOS device into an onsite attendee management tool. This sweet little app allows you to quickly check-in attendees and view information at your events and attendees. Built-in ticket scanning capabilities allow you to scan tickets at your classes, meetings, conventions, concerts, and everything in between.

Important Note:

You will need to download and install the JSON API add-on to connect your iOS device to your website. If you have a current Business, Developer, or Ticketing support license, the JSON API add-on will be available in your account.

Installation for iPad

The HD app can be downloaded and installed on your iPhone and iPad devices from the iTunes store:
Event Espresso iPad App

Changing the default settings

If you have more than 100 events, attendees, or registrations you’ll need to update the app’s default settings. You can go into the iOS device settings and scroll down past the apps developed by Apple to where you see individual app settings. There you can tap Event Espresso and go into its settings and adjust the default settings as needed.


Logging in

1. Once the app is installed on your iOS device, click on the “Event Espresso” icon.

Event Espresso iPad Icon

Event Espresso iPad Icon

2. Enter the your WordPress Admin login credentials in the login screen:

iPad Login Screen

iPad Login Screen

Connection Issues?

If you are having problems connecting/logging in (e.g. an error such as “Sorry, cant log in 404-not-found” or “Sorry, can’t log in bad URL”). Please make sure your iOS device is connected to the internet and the JSON API is installed on your Event Espresso powered WordPress website.

If the iOS device is connected to the internet, please test the HD app using the Event Espresso Test Drive website to login:

Event Espresso Endpoint: eventespresso.com/testdrive

Login ID: myespresso

Password: mrespresso


3. Once you are logged in, you should see a list of events (“Events View”), with the attendees (“Attendee View”) listed on the right side of the screen:

List of Events in the iPad App

List of Events in the HD App

Scanning Tickets

1. Click the “Scan” button in the top-right corner of the event/attendee overview screen:

Click the "Scan" button

Click the “Scan” button

2. You will see the “Camera View” within a modal window when the “Scan” button is pressed. Just place the device’s camera over the ticket, centered above the QR code:

Ticket Scanner

Ticket Scanner

3.  When a ticket is successfully (or unsuccessfully) scanned, the camera view will change to show the info about the attendee and display a green thumbs-up (or a red thumbs-down) image:

Scanned Ticket Examples

Scanned Ticket Examples

Manually Checking In/Out Attendees

1. Manually checking in attendees is easy. Just click on an attendees name, in the “Attendee View”, and and the view will change to show the “Attendee Info View”:

Attendee Info View

Attendee Info View

2. Next press the Check-in (or Check-out) button in the top right corner of the Attendee Info View:

Check-in Button

Check-in Button

3. When the attendee is successfully checked-in, the “Check-in” button will change to “Check-out” and the “Redeemed” row will increment (or decrement if the “Check-out” button is clicked):

Attendee Checked-in

Attendee Checked-in

Manually Refreshing a View

Not seeing recent registrations or newly added events? Just pull down on any view (“Events View”, “Attendee View”, “Attendee Info View”) to refresh.




iPhone/iPod App

Installation

Image

The iPhone app is the same as the iPad app and can be downloaded from iTunes

Logging In

1. Once the app is installed, click the Event Espresso icon.

2. Login or Start Scanning

If you haven’t previously logged in, tap the Login button and fill out the details.

Blog URL: Your website address

Username: The username you use to log into your website

Password: The password you use to log into your website

If you have previously logged in you can just click the Get Scanning button for quick access.

Scanning Tickets

Once inside, you are faced with three tabs: Today, Upcoming and Past.

These refer to your events and will list the events appropriately. Or you can use the search function to find an event by name.

Once you have found the event, tap its name.

The scanning system will now become activate and you need to focus the QR code on the ticket in your phones camera. Once it picks up the QR code, the app will display a green thumbs up if the scan is successful or a red thumbs down if the scan is unsuccessful.

Unsuccessful Scans

These are due to a few reasons: The ticket is invalid. The ticket is for the wrong event. The wrong event was selected on the app or the ticket has reached the maximum number of scans.



Android App

API Compatibility

The Event Espresso HD Android app is now compatible with the JSON API.

If you don’t use Apple, fear not we have the same quality app on Android too!

Installation
Image
The app can be downloaded from the Google Play Store

Logging In

1. Once the app is installed, click the Event Espresso icon.

Event Espresso Mobile App Logo

Event Espresso Mobile App Logo

2. Login or Start Scanning

If you haven’t previously logged in, tap the Login button and fill out the details.

Event Espresso Endpoint: Your website, remember to include the http://
Username: The username you use to log into your website.
Password: The password you use to log into your website.

If you have previously logged in you can just click the Get Scanning button for quick access.

Event Espresso Mobile App Login Screen

Event Espresso Mobile App Login Screen

Event Espresso Mobile App Login Details

Event Espresso Mobile App Login Details

Scanning Tickets

Once inside, you are faced with three tabs: Today, Upcoming and Past.

These refer to your events and will list the events appropriately. Or you can use the search function to find an event by name.

Once you have found the event, tap its name.

The scanning system will now become activate and you need to focus the QR code on the ticket in your phones camera. Once it picks up the QR code, the app will display a green thumbs up if the scan is successful or a red thumbs down if the scan is unsuccessful.

Event Espresso Mobile App Success

Event Espresso Mobile App Success

Event Espresso Mobile App Unsuccessful

Event Espresso Mobile App Unsuccessful

Unsuccessful Scans

These are due to a few reasons: The ticket is invalid. The ticket is for the wrong event. The wrong event was selected on the app or the ticket has reached the maximum number of scans.

Events Not Loading

Make sure WP_Debug is disabled in your wp-config.php file. If WP_Debug is disabled, then you will need to add @ini_set( 'display_errors', 0 ); to your wp-config.php file.

Posted in | Comments Off on Mobile Apps

Espresso JSON API Add-on

Installation

Need to Buy a Support License for the JSON API add-on?
https://eventespresso.com/product/espresso-json-api/

The Event Espresso JSON API add-on installs like any other WordPress plugin (via the WordPress admin or using FTP).

Once installed, just configure the settings, to your needs, in the WP Admin > Event Espresso > API Settings page of your Event Espresso powered WordPress website.

api settings 2.1

Testing the JSON API

To make sure the JSON API is working properly on your website, you add this to the end of your Event Espresso powered website’s URL:

/espresso-api/v1/events/public.pretty_json

Example: yoursite.com/espresso-api/v1/events/public.pretty_json

Actual example from our testdrive website: https://eventespresso.com/testdrive/espresso-api/v1/events/public.pretty_json

If everything is configured properly, you will see something like this:

JSON API Output Example

JSON API Output Example

API Codex

The Event Espresso JSON API gives developers a complete API platform for directly accessing data event and attendee data securely and efficiently from outside your web server. All a developer needs to know about is the API Endpoint URL for your site. Example: https://eventespresso.com/testdrive/espresso-api/v1/events/public.pretty_json

Authentication

Private Information

To make most requests to the API, you will need to send a session key with each request in the URL. Eg: mysite.com/espresso-api/v1/events/qwer1234 (where “qwer1234” is the session key).
To acquire a session key, send an HTTP POST/GET to
{wordpress-site}/espresso-api/v1/authenticate
with GET or POST parameters: “username” and “password” (which are a wordpress user’s username and password.)
Eg: GET mysite.com/espresso-api/v1/authenticate?username=admin&password=3v3nt (NOTE: using GET on this endpoint is not recommended for production, as it is less secure than sending a POST)
POST mysite.com/espresso-api/v1/authenticate
with body:

username:admin
password:3v3nt

On success, the response will look like:

{"status":"OK","status_code":200,"body":{"session_key":"fwseljoxy5"}}

On failure, the response will look like:

{"status":"Bad username and password combination.","status_code":401}

Public Information

Event Espresso site admins can allow for some information to be publicly available, thus not requiring authentication to access it. To enable this feature, they must select to “Allow Public API Access” on the Event Espresso API Settings page.

To query for public information, there is no need to authenticate and retrieve a session key. Instead, simply use the string ‘public’ in place of a session key in all requests. Eg, mysite.com/espresso-api/v1/events/public. Please see the section titled “Permissions” for information on what information is publicly available when this feature is enabled.

 

Response/Request Formats (xml, json,pretty_json)

this API supports both JSON (default) and XML formats. To get a response back in XML, simply append “.xml” to any of the session key (eg, “mysite.com/espresso-api/v1/events/{session_key}.xml?id__lt=10” or “mysite.com/espresso-api/v1/events/14/{session_key}.xml?). If you would like to have your JSON returned in a more readable, but less efficient, format, simply set the format to ‘pretty_json’ (eg, “mystei.com/espresso-api/v1/events/{session_key}.pretty_json?id__in=1,23,342)

 

Request Methods (GET, POST, PUT, DELETE)

According to RESTful principles, the HTTP request method sent to an endpoint dictates functionality in this API. Eg: sending the request method of DELETE on a request will be interpreted very differently by the API server than the same request using the PUT request method. In the following documentation, each endpoint is preceded by the HTTP request method that invokes that functionality. (Eg the title “GET /events” explains the functionality of sending a request to “/events” using the GET request method).

If you are unable to send PUT or DELETE request methods, we have provided a workaround: in the body of your request, provide a parameter called ‘request_method’ and set its value to the desired request method. Eg, if you want to send a PUT request but are unable, send a POST request with the request parameters ‘request_method’:’PUT’ (and the usual ‘body’ parameter with the json or xml to indicate what you want to update). Or if you want to send a DELETE request to /events/{id}/{sessionId}, send the following GET request /events/{id}/{sessionid}?request_method=DELETE.

 

GETting with Query Parameters

On all GET requests (eg, an HTTP GET request to mysite.com/espresso-api/v1/events,) you may add GET querystring variables to filter your results, eg mysite.com/espresso-api/v1/events?Datetime.event_start2012-04-23%2000:00:00.
But, what if you want all events before April 23rd 2012? you’d like to use mysite.com/espresso-api/v1/events?Datetime.event_start<2012-04-23%2000:00:00, but that’s invalid HTTP querystring syntax. If you want to alter a query like that simply append ‘__lt’ to the querystring parameter and it will be interpreted as < (or “less than”). ie mysitecom/espresso-api/v1/events?Datetime.event_start__lt=2012-04-23%2000:00:00. The following operators are available:


MySQL Operator String to Append to Query Parameter Example
< __lt eg: mysite.com/espresso-api/v1/events?Datetime.event_start__lt=2012-04-23%2012:23:56
<= __lte eg: mysite.com/espresso-api/v1/events?Datetime.event_start__lte=2012-04-23%2012:23:56
> __gt eg: mysite.com/espresso-api/v1/events?Datetime.event_start__gte=2012-04-23%2012:23:56
>= __gte eg: mysite.com/espresso-api/v1/events?Datetime.event_start__gt=2012-04-23%2012:23:56
LIKE __like eg: mystie.com/esresso-api/v1/attendees?fname__like=%25Tim%25 (note that ‘%’ urlencoded is %25)
IN __in eg: mysite.com/espresso-api/v1/registrations__in=234,432,345


You may also query based on most related models, as long as they are part of the response of the endpoint you’re currenlty querying.
For example, Price is a related model of Event, and is always included on any query to Events. So if you want to find all events with a price of 12.00, you could do a query like mysite.com/espresso-api/v1/events/{session_key}?Price.amount=12.00.

 

Further Examples:


Example Request Description generated SQL for WHERE statement
GET mysite.com/espresso-api/v1/events/{session_key}?name__like=%25party%25&description__like=%25all%20fun%25 Get all events where the name has a substring of ‘party’, and where the event description has the substring ‘all fun’ WHERE event_name LIKE ‘%party%’ AND event_desc LIKE ‘%all fun%’
GET mysite.com/espresso-api/v1/events/{session_key}?/events/{session_key}?Datetime.event_start__lt=2012-02-06%2012:23:56 get all events which start before february 6th 2012 WHERE Datetime.event_start < ‘2012-02-06%2012:23:56’
GET mysite.com/espresso-api/v1/registrations/{session_key}?Event.id__lt=5 get all registrations whose associated Event.id is less than 5 WHERE wp_events_detail < 5

 

POSTing (creating) with Temp Ids

When POSTing info to a resource to create a new one (eg, posting registration info to espresso-api/v1/registrations/{sessionId})
your soon-to-be-created resource will not yet have an ID. Insetad, you must provide a temporary ID. Temporary IDs are strings
starting with “temp-” and following by any unique string (eg, “temp-my-new-reg”, “temp-123”, “temp-a”, etc).

Why use Temporary Ids (instead of just ignoring the ID field)?

Temporary Ids are handy when creating multiple related resources, and thus allow you to refer to the soon-to-be-created resources.
Eg, creating 2 registrations on a single new transaction. Each registration would have their own unique Temp Id, (eg
“temp-reg1” AND “temp-reg2″”) and each would have their nested Transaction’s id set to a single
Temp Id (eg “temp-transaction-for-both-regs”). Example request:


{
   "Registrations":[
      {
         "id":"temp-reg1",
         "status":"not_approved",
         "date_of_registration":"2012-12-10 16:12:31",
         "final_price":10,
         "code":"1-50c67a6f172e1",
         "url_link":null,
         "is_primary":true,
         "is_group_registration":true,
         "is_going":true,
         "is_checked_in":false,
         "Transaction":{
            "id":"temp-transaction-for-both-regs"
         }
      },
      {
         "id":"temp-reg2",
         "status":"not_approved",
         "date_of_registration":"2012-12-10 16:12:31",
         "final_price":10,
         "code":"1-50c67a6f172e1",
         "url_link":null,
         "is_primary":false,
         "is_group_registration":false,
         "is_going":true,
         "is_checked_in":false,
         "Transaction":{
            "id":"temp-transaction-for-both-regs"
         }
      }
   ]
}

 

Query Limits

By default, all queries will return a maximum of 50 primary items (‘primary items’ meaning the item requested, not related items. So on a request to mysite.com/espresso-api/v1/events/public that would be ‘events’, not the
related datetimes, venues, or categories, etc.). If you wish to change this limit, provide another query parameter called ‘limit’. Eg, mysite.com/espresso-api/v1/events/{sessionkey}?limit=75 or mysite.com/espresso-api/v1/attendees/{sessionkey}?id__gt=50&limit=50 (the will

request the first 75 items, the second will get the first 50 items with an ID higher than 50, which might be a convenient way of doing pagination).

The query limit parameter used on regular endpoints for GETs is different from the query limit on cached results. Please see the section on ‘caching’. There is currently no ‘offset’ parameter for query limits on regular endpoints (ie, mysite.com/espresso-api/v1/events/{sessionkey}?limit=150,50 will NOT work).
This feature is planned in future versions of the API.

 

Endpoints

The API data structure is independent of the Event Espresso MySQL database structure (ie, the data is organized differently. Eg, in the Event Espresso 3.1 database, there is no concept of ‘registration’ or ‘transaction’, these are simply part of an attendee record.) Here is an image which shows how the data is organized and generally which resources contain what information.

 

Events

Currently, you may get events and filter them

GET /events

gets all events, and their related datetimes, prices, promocodes, categories, and venues. For efficiency, the related registrations are not returned on this endpoint. For those, see GET /events/{id}registrations. Also, by default only active events are returned (ie, mysite.com/espresso-api/v1/events/{session_key} will return the exact same results as mysite.com/espresso-api/v1/events/{session_key}?status_in=active,draft,secondary/waitlist), but you can of course override this by supplying a different value for the “status” parameter.

The following will all be part of the response, and may be used in querying


id:	the event’s DB id, eg 12
name:	name of the event, eg “mike party”
description:	description of the event, eg “all you can ease pizza!”
Datetimes:	list of tuples like GET /datetimes
Venues:	list of tuples of the venues, GET /venues
metadata:	list of tuples,eg “metadata”:{“id”:23,”{meta_key}”,”{meta_value}”, “date_added”:”2012-03-23 23:33:44”}
status:	string. one of 'active', 'inactive', 'pending', 'draft', 'secondary/waitlist', 'ongoing', 'denied', 'deleted'
limit:	integer
group_registrations_allowed:	boolean
group_registrants_max:	integer
active:	boolean
member_only:	boolean
Categories:	lsit of tuple like /categories
Promocodes:	list of tuples like /promocodes
virtual_url:	string
virtual_phone:	string
phone:	string


Example Request (gets all events submitted before march 24th 2012 by user with id 1)

 mysite.com/espresso-api/v1/events/{session_key}?submitted__lte=2012-03-24%2012:23:56&user_id=1



Example Response

{
   "status":"OK",
   "status_code":200,
   "body":{
      "Events":[
         {
            "id":"1",
            "name":"Jump Til You Drop",
            "description":"This is a test. <!--more-->\r\n\r\n[ESPRESSO_VENUE]",
            "status":"active",
            "limit":"500",
            "group_registrations_allowed":true,
            "group_registrations_max":"10",
            "active":true,
            "member_only":false,
            "virtual_url":"",
            "call_in_number":"",
            "phone":"",
            "metadata":{
               "default_payment_status":"",
               "venue_id":"0",
               "additional_attendee_reg_info":"3",
               "add_attendee_question_groups":{
                  "1":"1",
                  "11":"11"
               },
               "date_submitted":"June 18, 2012",
               "event_hashtag":"",
               "event_format":"",
               "event_livestreamed":"",
               "":""
            },
            "Datetimes":[
               {
                  "id":"120",
                  "is_primary":true,
                  "event_start":"2012-10-31 08:00:00",
                  "event_end":"2012-10-31 17:00:00",
                  "registration_start":"2012-07-01 00:01:00",
                  "registration_end":"2012-10-31 23:59:00",
                  "limit":"0",
                  "tickets_left":"500"
               }
            ],
            "Venues":[

            ],
            "Categories":[
               {
                  "id":"1",
                  "name":"Test category",
                  "identifier":"test-cat",
                  "description":"My category content",
                  "user":"1"
               }
            ],
            "Promocodes":[

            ],
            "Prices":[
               {
                  "id":"155.0",
                  "name":"Admission + T-shirt",
                  "amount":"2.00",
                  "description":null,
                  "limit":"500",
                  "remaining":999999,
                  "start_date":null,
                  "end_date":null,
                  "Pricetype":{
                     "id":1,
                     "name":"Base Price",
                     "is_member":false,
                     "is_discount":false,
                     "is_tax":false,
                     "is_percent":false,
                     "is_global":true,
                     "order":0
                  }
               },
               {
                  "id":"155.2",
                  "name":"Members Admission",
                  "amount":"2.00",
                  "description":null,
                  "limit":"500",
                  "remaining":99999,
                  "start_date":null,
                  "end_date":null,
                  "Pricetype":{
                     "id":4,
                     "name":"Member Price",
                     "is_member":true,
                     "is_discount":false,
                     "is_tax":false,
                     "is_percent":false,
                     "is_global":true,
                     "order":0
                  }
               },
               {
                  "id":"154.0",
                  "name":"General Admission",
                  "amount":"0.01",
                  "description":null,
                  "limit":"500",
                  "remaining":999999,
                  "start_date":null,
                  "end_date":null,
                  "Pricetype":{
                     "id":1,
                     "name":"Base Price",
                     "is_member":false,
                     "is_discount":false,
                     "is_tax":false,
                     "is_percent":false,
                     "is_global":true,
                     "order":0
                  }
               },
               {
                  "id":"154.2",
                  "name":"Members Admission",
                  "amount":"0.01",
                  "description":null,
                  "limit":"500",
                  "remaining":99999,
                  "start_date":null,
                  "end_date":null,
                  "Pricetype":{
                     "id":4,
                     "name":"Member Price",
                     "is_member":true,
                     "is_discount":false,
                     "is_tax":false,
                     "is_percent":false,
                     "is_global":true,
                     "order":0
                  }
               }
            ]
         }
      ]
   }
}



GET /events/{id}

retrieves a single event and its related , where {id} is the id of the event you want to retrieve. Accepts no querystring variables.

Example Request:

mysite.com/espresso-api/v1/events/123/{session_key}



Example Response:

{
   "status":"OK",
   "status_code":200,
   "body":{
      "Event":{
         "id":"1",
         "name":"Jump Til You Drop",
         "description":"This is a test. <!--more-->\r\n\r\n[ESPRESSO_VENUE]",
         "status":"active",
         "limit":"500",
         "group_registrations_allowed":true,
         "group_registrations_max":"10",
         "active":true,
         "member_only":false,
         "virtual_url":"",
         "call_in_number":"",
         "phone":"",
         "metadata":{
            "default_payment_status":"",
            "venue_id":"0",
            "additional_attendee_reg_info":"3",
            "add_attendee_question_groups":{
               "1":"1",
               "11":"11"
            },
            "date_submitted":"June 18, 2012",
            "event_hashtag":"",
            "event_format":"",
            "event_livestreamed":"",
            "":""
         },
         "Datetimes":[
            {
               "id":"120",
               "is_primary":true,
               "event_start":"2012-10-31 08:00:00",
               "event_end":"2012-10-31 17:00:00",
               "registration_start":"2012-07-01 00:01:00",
               "registration_end":"2012-10-31 23:59:00",
               "limit":"0",
               "tickets_left":"500"
            }
         ],
         "Venues":[

         ],
         "Categories":[
            {
               "id":"1",
               "name":"Test category",
               "identifier":"test-cat",
               "description":"My category content",
               "user":"1"
            }
         ],
         "Promocodes":[

         ],
         "Prices":[
            {
               "id":"155.0",
               "name":"Admission + T-shirt",
               "amount":"2.00",
               "description":null,
               "limit":"500",
               "remaining":999999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":1,
                  "name":"Base Price",
                  "is_member":false,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            },
            {
               "id":"155.2",
               "name":"Members Admission",
               "amount":"2.00",
               "description":null,
               "limit":"500",
               "remaining":99999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":4,
                  "name":"Member Price",
                  "is_member":true,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            },
            {
               "id":"154.0",
               "name":"General Admission",
               "amount":"0.01",
               "description":null,
               "limit":"500",
               "remaining":999999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":1,
                  "name":"Base Price",
                  "is_member":false,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            },
            {
               "id":"154.2",
               "name":"Members Admission",
               "amount":"0.01",
               "description":null,
               "limit":"500",
               "remaining":99999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":4,
                  "name":"Member Price",
                  "is_member":true,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            }
         ]
      }
   }
}

GET /events/{id}/registrations

returns all registrations for event with {id}. Output is identical to GET /registrations?Event.id={id}

 

Registrations

GET /registrations

gets all registrations, and their related attendee, transaction, event, price (and pricetype), and datetime.

id	id of registration (float NOT int)
Event:	tuple like topleve GET /event
Attendee:	tuple like toplevel GET /attendees
Transaction:	tuple like topleve GET transaction
Datetime:	tuple like toplevel GET /datetimes
Price:	tuple like GET /prices
status:	 ‘approved’,’cancelled’,’not_approved’,’pending’
date_of_registration:	datetime like ‘2012-03-23 23:12:53”
final_price:	string like “20.34”
code:	string
url_link:	string
is_primary:	boolean
is_group_registration:	string true or false
is_going:	boolean
is_checked_in:	boolean


Example Request:

mysite.com/espresso-api/v1/registrations/{session_key}?Attendee.firstname__like=%25Smith%25&is_checked_in=1 //note that '%' urlencoded is %25



Example Response

{
   "status":"OK",
   "status_code":200,
   "body":{
      "Registrations":[
         {
            "id":"9273",
            "status":"approved",
            "date_of_registration":"2012-10-22 21:14:04",
            "final_price":"0.01",
            "code":"1-50860b7c7d415",
            "url_link":null,
            "is_primary":true,
            "is_group_registration":false,
            "is_going":true,
            "is_checked_in":false,
            "Event":{
               "id":"1",
               "name":"Jump Til You Drop",
               "description":"This is a test. <!--more-->\r\n\r\n[ESPRESSO_VENUE]",
               "status":"active",
               "limit":"500",
               "group_registrations_allowed":true,
               "group_registrations_max":"10",
               "active":true,
               "member_only":false,
               "virtual_url":"",
               "call_in_number":"",
               "phone":"",
               "metadata":{
                  "default_payment_status":"",
                  "venue_id":"0",
                  "additional_attendee_reg_info":"3",
                  "add_attendee_question_groups":{
                     "1":"1",
                     "11":"11"
                  },
                  "date_submitted":"June 18, 2012",
                  "event_hashtag":"",
                  "event_format":"",
                  "event_livestreamed":"",
                  "":""
               }
            },
            "Attendee":{
               "id":"9273",
               "firstname":"aaa",
               "lastname":"aaa",
               "address":"",
               "address2":"",
               "city":"",
               "state":"",
               "country":"",
               "zip":"",
               "email":"",
               "phone":""
            },
            "Transaction":{
               "id":"9273",
               "timestamp":"2012-10-22 21:14:04",
               "total":"536.66",
               "paid":"0.00",
               "status":"pending",
               "details":null,
               "tax_data":null,
               "session_data":null
            },
            "Datetime":{
               "id":"120",
               "is_primary":true,
               "event_start":"2012-10-31 08:00:00",
               "event_end":"2012-10-31 17:00:00",
               "registration_start":"2012-07-01 00:01:00",
               "registration_end":"2012-10-31 23:59:00",
               "limit":"0",
               "tickets_left":"500"
            },
            "Price":{
               "id":"154.0",
               "name":"General Admission",
               "amount":"0.01",
               "description":null,
               "limit":"500",
               "remaining":999999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":1,
                  "name":"Base Price",
                  "is_member":false,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            }
         },
         {
            "id":"9274",
            "status":"approved",
            "date_of_registration":"2012-10-22 21:14:04",
            "final_price":"0.01",
            "code":"1-50860b7c7d415",
            "url_link":null,
            "is_primary":true,
            "is_group_registration":false,
            "is_going":true,
            "is_checked_in":false,
            "Event":{
               "id":"1",
               "name":"Jump Til You Drop",
               "description":"This is a test. <!--more-->\r\n\r\n[ESPRESSO_VENUE]",
               "status":"active",
               "limit":"500",
               "group_registrations_allowed":true,
               "group_registrations_max":"10",
               "active":true,
               "member_only":false,
               "virtual_url":"",
               "call_in_number":"",
               "phone":"",
               "metadata":{
                  "default_payment_status":"",
                  "venue_id":"0",
                  "additional_attendee_reg_info":"3",
                  "add_attendee_question_groups":{
                     "1":"1",
                     "11":"11"
                  },
                  "date_submitted":"June 18, 2012",
                  "event_hashtag":"",
                  "event_format":"",
                  "event_livestreamed":"",
                  "":""
               }
            },
            "Attendee":{
               "id":"9274",
               "firstname":"aaa",
               "lastname":"aaa",
               "address":"",
               "address2":"",
               "city":"",
               "state":"",
               "country":"",
               "zip":"",
               "email":"",
               "phone":""
            },
            "Transaction":{
               "id":"9274",
               "timestamp":"2012-10-22 21:14:04",
               "total":"536.66",
               "paid":"0.00",
               "status":"pending",
               "details":null,
               "tax_data":null,
               "session_data":null,
            },
            "Datetime":{
               "id":"120",
               "is_primary":true,
               "event_start":"2012-10-31 08:00:00",
               "event_end":"2012-10-31 17:00:00",
               "registration_start":"2012-07-01 00:01:00",
               "registration_end":"2012-10-31 23:59:00",
               "limit":"0",
               "tickets_left":"500"
            },
            "Price":{
               "id":"154.0",
               "name":"General Admission",
               "amount":"0.01",
               "description":null,
               "limit":"500",
               "remaining":999999,
               "start_date":null,
               "end_date":null,
               "Pricetype":{
                  "id":1,
                  "name":"Base Price",
                  "is_member":false,
                  "is_discount":false,
                  "is_tax":false,
                  "is_percent":false,
                  "is_global":true,
                  "order":0
               }
            }
         }
      ]
   }
}

 

GET /registrations/{id}

gets a single registration and its related attendee, transaction, event, datetime, and price (and pricetype), where {id} is the registration_id. It does not accept query string variables



Example Request

mysite.com/espresso-api/v1/registrations/9273/{session_key}?



Example Response

{
   "status":"OK",
   "status_code":200,
   "body":{
      "Registration":{
         "id":1.1,
         "status":"approved",
         "date_of_registration":"2012-12-10 16:12:31",
         "final_price":10,
         "code":"1-50c67a6f172e1",
         "url_link":null,
         "is_primary":true,
         "is_group_registration":true,
         "is_going":true,
         "is_checked_in":true,
         "Event":{
            "id":1,
            "code":"1-50c679c10fcf0",
            "name":"testevent1",
            "description":"",
            "status":"active",
            "limit":999999,
            "group_registrations_allowed":true,
            "group_registrations_max":3,
            "active":true,
            "member_only":false,
            "virtual_url":"",
            "call_in_number":"",
            "phone":"",
            "metadata":{
               "default_payment_status":"",
               "venue_id":"",
               "additional_attendee_reg_info":3,
               "add_attendee_question_groups":{
                  "1":"1"
               },
               "date_submitted":"December 11, 2012",
               "event_hashtag":"",
               "event_format":"",
               "event_livestreamed":"",
               "":""
            }
         },
         "Attendee":{
            "id":1,
            "firstname":"wef",
            "lastname":"few",
            "address":"",
            "address2":"",
            "city":"",
            "state":"",
            "country":"",
            "zip":"",
            "email":"michael@eventespresso.com",
            "phone":""
         },
         "Transaction":{
            "id":1,
            "timestamp":"2012-12-10 16:12:31",
            "total":10,
            "amount_paid":0,
            "status":"pending",
            "details":null,
            "tax_data":null,
            "session_data":null,
            "payment_gateway":"Check"
         },
         "Datetime":{
            "id":21,
            "is_primary":true,
            "event_start":"2012-12-11 09:00:00",
            "event_end":"2012-12-10 17:00:00",
            "registration_start":"2012-12-09 00:01:00",
            "registration_end":"2016-12-21 23:59:00",
            "limit":999999,
            "tickets_left":999983
         },
         "Price":{
            "id":0,
            "name":"Unknown",
            "amount":10,
            "description":null,
            "limit":9999999,
            "remaining":999999,
            "start_date":null,
            "end_date":null,
            "Pricetype":{
               "id":1,
               "name":"Base Price",
               "is_member":false,
               "is_discount":false,
               "is_tax":false,
               "is_percent":false,
               "is_global":true,
               "order":0
            }
         }
      }
   }
}

GET/POST/PUT /registrations/{id}/checkin

Marks the registration with {id} as checked-in. If that registration is already checked in, checks in another registration which has
the same attendee and event. Returns the list of registrations that were checked in. Accepts the following query string parameters:

 ignorePayment: boolean
quantity: (integer), using a quantity of 3 is equivalent to issuing the same checkin request 3 times.



Example Request

GET/POST/PUT mysite.com/espresso-api/v1/registrations/9273/checkin{session_key}



Example Response
Returns the updated registrations just like GET /registrations (not a single registration, for reasons mentioned above)

Note: if the payment has not been verified, the registration will not be marked as checked-in, and the following response will be sent:

{"status":"Checkin denied. Payment not complete and 'ignorePayment' flag not set.","status_code":500}

GET/POST/PUT /registrations/{id}/checkout

Marks the registration with {id} as checked-out. If that registration is already checked out, checks out another registration which has
the same attendee and event. Returns the list of registrations that were checked out. Accepts the following query string parameters:

quantity: (integer), using a quantity of 3 is equivalent to issuing the same checkout request 3 times.



Example Request

GET/POST/PUT mysite.com/espresso-api/v1/registrations/9273/checkout/{session_key}

Example Response



Returns a list of updated registrations just like GET /registrations (not a single registration, for reasons mentioned above)

POST/PUT /registrations

Creates or updates the listed registrations. The request should be sent in an almost identical format as what’s received from GET /registrations

When submitting this request to create/update the listed registrations, currently ALL fields received on GET /registrations must also be submitted.
(There are plans to have some fields set to default values, and to not require all fields on updates, but those are not yet implemented).



Example Request

 POST /registrations
//with POST form data/post parameter 'body' containing all the json/xml received in the 'body' section of the response from GET /registrations (ie, don't include 'status' or 'status_code')
body:{
   "Registrations":[
	{
		"id":"temp-new-one",
		"status":"not_approved",
		"date_of_registration":"2012-12-10 16:12:31",
		"final_price":10,
		"code":"1-50c67a6f172e1",
		"url_link":null,
		"is_primary":true,
		"is_group_registration":false,
		"is_going":true,
		"is_checked_in":true,
		"Event":{
			"id":1,
			"code":"1-50c679c10fcf0",
			"name":"testevent1",
			"description":"",
			"status":"active",
			"limit":999999,
			"group_registrations_allowed":true,
			"group_registrations_max":3,
			"active":true,
			"member_only":false,
			"virtual_url":"",
			"call_in_number":"",
			"phone":"",
			"metadata":{
				"default_payment_status":"",
				"venue_id":"",
				"additional_attendee_reg_info":3,
				"add_attendee_question_groups":{
				"1":"1"
				},
				"date_submitted":"December 11, 2012",
				"event_hashtag":"",
				"event_format":"",
				"event_livestreamed":"",
				"":""
			}
		},
		"Attendee":{
			"id":"temp-new-one2",
			"firstname":"fromapi",
			"lastname":"fromapiman",
			"address":"",
			"address2":"",
			"city":"",
			"state":"",
			"country":"",
			"zip":"",
			"email":"michael@eventespresso.com",
			"phone":""
		},
		"Transaction":{
			"id":"temp-new-one3",
			"timestamp":"2012-12-10 16:12:31",
			"total":10,
			"amount_paid":0,
			"status":"pending",
			"details":null,
			"tax_data":null,
			"session_data":null,
			"payment_gateway":"Check"
		},
		"Datetime":{
			"id":20,
			"is_primary":true,
			"event_start":"2012-12-11 09:00:00",
			"event_end":"2012-12-10 17:00:00",
			"registration_start":"2012-12-09 00:01:00",
			"registration_end":"2016-12-21 23:59:00",
			"limit":999999,
			"tickets_left":999984
		},
		"Price":{
			"id":12,
			"name":"General Admission",
			"amount":10,
			"description":null,
			"limit":9999999,
			"remaining":999999,
			"start_date":null,
			"end_date":null,
			"Pricetype":{
				"id":1,
				"name":"Base Price",
				"is_member":false,
				"is_discount":false,
				"is_tax":false,
				"is_percent":false,
				"is_global":true,
				"order":0
			}
		}
	}
	]
}

The above request will create a new Registration, new Attendee, and new Transaction. It will also associate the new
Registration with Price with ID 12, with the Event with ID 1, and the Datetime with ID 20. It will also simultaneously update each of those
related models: the Price, Event and Datetime (in case you’d rather not update those related models, in teh future you will only need to provide their IDs, but
not all their attributes).

Note that in order to create a registration (or any other related model) you simply provide a ‘temporary id’ titled ‘temp-{whatever}’,
(the above registration’s temporary id is ‘temp-new-one’, the attendee’s is ‘temp-new-one2’. Please see the above section on ‘POSTing using Temporary IDs’ for more info).
If you instead wanted to simply update a registration with ID {id}, then you’d provide it as the ID instead of the above temporary id.

When the request is completed, the newly-created registrations (and their associated Attendee, Transaction, Event, Price and Datetime) will be returned
in exactly the same format as GET /registrations.

PUT /registrations/{id}

Updates the registration (and associated Attendee, Transaction, Event, Datetime, and Price) with id {id}. The request’s body should be
in the same format as GET /registrations/{id} (except without the ‘status’ and ‘status_code’), and the updated registration (and related models) will be returned.



Example Request

{
   "Registration":{
      "id":1.1,
      "status":"not_approved",
      "date_of_registration":"2012-12-10 16:12:31",
      "final_price":10,
      "code":"1-50c67a6f172e1",
      "url_link":null,
      "is_primary":true,
      "is_group_registration":false,
      "is_going":true,
      "is_checked_in":true,
      "Event":{
         "id":1,
         "code":"1-50c679c10fcf0",
         "name":"testevent1",
         "description":"",
         "status":"active",
         "limit":999999,
         "group_registrations_allowed":true,
         "group_registrations_max":3,
         "active":true,
         "member_only":false,
         "virtual_url":"",
         "call_in_number":"",
         "phone":"",
         "metadata":{
            "default_payment_status":"",
            "venue_id":"",
            "additional_attendee_reg_info":3,
            "add_attendee_question_groups":{
               "1":"1"
            },
            "date_submitted":"December 11, 2012",
            "event_hashtag":"",
            "event_format":"",
            "event_livestreamed":"",
            "":""
         }
      },
      "Attendee":{
         "id":1,
         "firstname":"wef",
         "lastname":"few",
         "address":"",
         "address2":"",
         "city":"",
         "state":"",
         "country":"",
         "zip":"",
         "email":"michael@eventespresso.com",
         "phone":""
      },
      "Transaction":{
         "id":1,
         "timestamp":"2012-12-10 16:12:31",
         "total":10,
         "amount_paid":0,
         "status":"pending",
         "details":null,
         "tax_data":null,
         "session_data":null,
         "payment_gateway":"Check"
      },
      "Datetime":{
         "id":20,
         "is_primary":true,
         "event_start":"2012-12-11 09:00:00",
         "event_end":"2012-12-10 17:00:00",
         "registration_start":"2012-12-09 00:01:00",
         "registration_end":"2016-12-21 23:59:00",
         "limit":999999,
         "tickets_left":999984
      },
      "Price":{
         "id":0,
         "name":"Unknown",
         "amount":10,
         "description":null,
         "limit":9999999,
         "remaining":999999,
         "start_date":null,
         "end_date":null,
         "Pricetype":{
            "id":1,
            "name":"Base Price",
            "is_member":false,
            "is_discount":false,
            "is_tax":false,
            "is_percent":false,
            "is_global":true,
            "order":0
         }
      }
   }
}

The above request will update registration with id 1.1, and update all it’s fields to the supplied values. Note: it will also update the related
Attendee, Transaction, Event, Datetime and Price (in future you will only need to provide the ID). Currently, if you don’t want to update the related models, don’t provide them at all.
For example, the following request updates only registration information (and leave related models untouched).

{
   "Registration":{
      "id":1.1,
      "status":"not_approved",
      "date_of_registration":"2012-12-10 16:12:31",
      "final_price":10,
      "code":"1-50c67a6f172e1",
      "url_link":null,
      "is_primary":true,
      "is_group_registration":false,
      "is_going":true,
      "is_checked_in":true
   }
}

 

Attendees

GET /attendees

Gets all attendees and their related registrations and events

id	int
firstname:	string
lastname:	string
address:	string
address2:	string
city:	string
state:	string
country:	string
zip:	string
email:	string
phone:	string
comments:	string (in Event Espresso 3.1, this will always be blank)
notes:	string (in Event Espresso 3.1, this will always be blank)
Registrations:	list of tuples, like toplevel results of GET /registrations
Events: list of tuples, like toplevel results of GET /events

 

Unfinished Endpoints

These are endpoints that are not yet finished. However, you may want to know their response format when querying a related object, as they will eb part of teh response.
For example, although the endpoint espresso-api/v1/prices/{session_key} is not yet accessible, prices are returned with every request to espresso-api/v1/events/{session_key}, and so you’d
probably like to know what attributes to expect in responses and which are available for querying.

Prices

GET /prices

all prices.

id:	float (not int!). eg: 1.1, 1.2, 1.3, OR 1, 1234, etc.
Event:	event like GET /events
Pricetype:	tuple like GET /pricetypes
amount:	string, eg: “10.2”
name:	string
description:	string
limit:	int
remaining:	int
start_date:	date
end_date:	date

Note: if a price is returned as a related object of the one you queried (eg, you queried “events”, and got a related “price”)
then we avoid infinite recursion by not returning an “Event” object nested inside the “price” object.

Price Types

GET /pricetypes

In 3.1, there are 4 immutable price types: “Base Price”,”Surcharge Amount”,”Surcharge Percent”, and “Member Price”, which are stored
in the code and not the database

id:	int
name:	string
is_member:	boolean
is_discount:	boolean
is_tax:	boolean
is_percent:	boolean
is_global:	boolean
order:	boolean

 

Categories

GET /categories

gets all categories

id:	int
name:	string
identifier	:string
description:	string
user:	int (creator)

Promo codes

GET /promocodes

Gets all promo (discount) codes

id:	int
coupon_code:	string
amount: string (like "10.23")	
use_percentage:	boolean
description:	string
apply_to_each_attendee:	boolean
quantity_available:	int
expiration_date:	date 
user:	int (creator's wordpress id)

Date times

GET /datetimes

gets all date/times. in 3.1, this is a combination of times in events_details and events_start_end tables

id:	int
Event:	tuple like GET /events
is_primary:	boolean
event_start:	datetime
event_end:	datetime
registration_start:	datetime
registration_end:	datetime
limit:	int
tickets_left:	int

Venues

GET /venues

Gets all venues

id:	int
name:	string
identifier:	string
address:	string
address2:	string
city:	string
state:	string
zip:	string
country:	string
metas:	key-values like “metas”:{“{meta_key}”:{meta_value},....}
user:	int

 

Transactions

GET /transactions

gets all transactions (in 3.1, this is a subset of columns from the /attendees table)

id:	string (NOT int)
timestamp:	datetime
total:	decimal like 20.35
amount_paid:	decimal
status:	one of “complete”,”open”,”pending”
details:	tuples like {“{meta_key}”:{value}}
tax_data:	tuples like {“{meta_key}”:{value}}
session_data:	tuples like {“{meta_key}”:{value}}
Registrations:	tuple like GET /registrations
payment_gateway: string (indicating how the transaction was paid)

Caching and Counting

If you want to optimize your api client, you can utilize Event Espresso’s internal caching on any query. This is useful is you need to run a large query (eg, mysite.com/espresso-api/v1/registrations/{sessionkey}?limit=1000) which could potentially overburden the server, you want to get a count of items, or you want to implement pagination.

To do so, issue your query with an added query parameter of ‘cache_result’ (eg: mysite.com/espresso-api/v1/events/{session_key}?id__gt=10&limit=500&cache_result=true).

You will receive a response with a body containing the count of how many objects would be returned, an a cached_result_key like the following:

"count":16,"cached_result_key":"mafvjm903a59ms9schb2yglmysouw4sv72orjyao"

Instead of sending the entire response, we’ve just sent you a count of how many objects would be returned, and internally cached the result.
To access that cache, send a query to

{wordpress_site}/espresso-api/v1/cachedresults/{cached_result_key}/{session_key}

This will return a response exactly like your original query would have had you not added the ‘cache_result’ query parameter.
Also, when querying the cache you may add a special ‘limit’ query parameter to limit how much of the response is sent. Eg:

{wordpress_site}/espresso-api/v1/cachedresults/{cached_result_key}/{session_key}?limit=10

which will only return the first 10 objects. Just like the MYSQL ‘limit’ clause, you can also add a second value to ‘limit’ to
use an offset and limit. Eg ‘?limit=30,15’ will return 15 objects starting at the 30th one.

 

Permissions

The following users have permission to access the following resources. Public users can never update or create any resources, but they do have permissions to view certain resources, when “Public API Access” is enabled (Note: some of these roles are in the Event Espresso Permissions and Permission Pro plugins)

Version 2.1.x+ permissions

Integration with the Roles & Permission plugins (basic and pro) was significantly improved in this version. Basically, users should have access to the exact same resources via the API as they do via the normal web interface. E.g., if an Event Manager has permission to edit only events they create from wp-admin and only permission to view only active events on the website’s frontend event-list page, then in the JSON API when they submit a request to mysite.com/espresso-api/v1/events/{session_key}?editable_only=true then they should only see their events, and a request to mysite.com/espresso-api/v1/events/{session_key}?editable_only=false then they should see all active events (see below for a description of the “editable_only” query parameter added in version 2.1.0).

Also, the Roles & Permissions “Minimum Page Permissions” setting also applies users’ permissions in the JSON API. E.g., if you set the “Minimum Page Permission” for “Event/Attendee Listings Page” to “Master Admin”, then Event Managers and Regional Managers won’t be able to see either the Event Espresso Event Listing Page, or access mysite.com/espresso-api/v1/events/{session_key}.

Resource R&P associated “Minimum Page Permission” Public Event Managers Regional Manager Event Master Admins & WP Admins
View Edit View Edit View Edit View Edit
events Event/Attendee Listings Page active only none all active or owned owned all active, owned, or in region owned or in region all all
venues Venue Manager Page all none all all all all all all
categories Categories Page all none all all all all all all
datetimes Event/Attendee Listings Page all none all for owned events all for events owned & in region all all
prices Event/Attendee Listings Page all non-member prices none all for events owned all for events owned & in region all all
pricetypes Event/Attendee Listings Page all non-member prices none all all all all all all
registrations Event/Attendee Listings Page none none for events owned for events owned for events owned & in region for events owned & in region all all
attendees Event/Attendee Listings Page none none for registrations for events owned for registrations for events owned for registrations for events owned & in region for registrations for events owned & in region all all
transactions Event/Attendee Listings Page none none for registrations for events owned for registrations for events owned for registrations for events owned & in region for registrations for events owned & in region all all
answers Event/Attendee Listings Page none none for registrations for events owned for registrations for events owned for registrations for events owned & in region for registrations for events owned & in region all all
promocodes Discounts Page none none all all all all all all

As of the JSON API plugin version 2.1, the query parameter ‘editable_only’ is available, accepting either ‘true’ or ‘false’ as values. It can be added to any GET request in order to filter out any results the current user CANNOT edit. For example, if you wanted to only see all the events the current user can edit, you could send a request like mysite.com/espresso-api/v1/events/{session_key}?editable_only=true. Also, there is a setting titled “Show API Users Data They Can’t Edit” in the JSON API Settings page (when the Roles&Permissions add-on is also active) which sets the default for this query parameter.

Version 2.0.x permissions

(This version only provided limited support of Roles an Permissions. E.g., Event Managers could use the API to view events they normally didn’t have permission to see.)

Resource Public Event Managers Regional Manager Event Master Admins Admin
events only active and public events yes yes yes yes
venues yes yes yes yes yes
categories yes yes yes yes yes
datetimes yes yes yes yes yes
venues yes yes yes yes yes
prices yes yes yes yes yes
pricetypes yes yes yes yes yes
registrations no yes yes yes yes
attendees no yes yes yes yes
transactions no yes yes yes yes
answers no yes yes yes yes
promocodes no yes yes yes yes

 

Status Codes


Along with each response, there is both a ‘status’ and a ‘status_code’. These status codes should more-or-less correspond to normal HTTP status codes. They are as follows:

Status Code Status Details
200 OK Your request was successfully processed. If you requested an object, it should have been returned in the ‘body’ attribute. If you did a PUT, POST, or DELETE, it should have succeeded, and the updated/created/deleted object should have been returned in the ‘body’ parameter
400 {various messages} something about your request was illegal. You probably did a GET with an illegal query parameter
403 You are not authorized to access that endpoint Your session has probably expired and you need to re-authenticate/login. It’s also possible that you simply do not have sufficient permissions to access that specific endpoint. Eg: if you’re logged in as a event manager and only have event ID 123 assigned to you, then you can’t update event 987 and will get this same response.
404 Request is ok, but there is no object of specified type with id: {id} You made a request (like GET, PUT, or DELETE) on a specific resource (eg, /events/13), but that resource didn’t exist. Your request would have worked if the resource existed
412 {various messages} Your request was syntactically correct and all, but some precondition failed before your request could be fully processed as you wanted. Example: you tried to check a registrant into an event using /registrations/13/checkin, but they hadn’t paid yet. Capice?
500 {various messages} Some internal error occured. Your request was fine but our server software just died for some reason.
If the response is specifically “Endpoint not yet implemented” then we just haven’t finished working on that endpoint. Hassle Event Espresso to get it implemented.

 

Code Examples

Here are some examples of code that uses the API.


Summary and Link Description
Upcoming Events PHP code that fetches all upcoming events and displays them. Can be run from any domain.
Upcoming Events w/ Calendar PHP and HTML code that fetches all upcoming events and displays them in a calendar. Can be run from any domain.
Past Events PHP code that fetches all past evens and displays them. Can be run from any domain.
Upcoming Events with Caching PHP code that fetches all upcoming events, caches them, and displays them. Using caching can speed up your app, but requires a few more lines of code. Can be run from any domain.
Past Events with Caching PHP code that fetches all past events, caches them, and displays them. Using caching can speed up your app, but requires a few more lines of code. Can be run from any domain.

 

Future Developments

POST /events

(create new event)

/events/{id}/questions

POST /events/{id}/attendees

GET/questions/{id}/answer
…etc

Need to Buy a Support License for the JSON API add-on?
https://eventespresso.com/product/espresso-json-api/

Posted in | Comments Off on Espresso JSON API Add-on

EE3 Volume Discount Add-on

The Volume Discount add-on is only available as a Pre-release download.
Event Espresso 3.1.27 or newer is required.

Volume discounting can be a useful way to incentivize attendees to purchase more tickets or take action and purchase sooner. Automatic discounting can also save you administrative time and energy by granting volume discounts that someone would otherwise have to contact you about to get help with special pricing. So, this add-on for EE3 is good for earning more revenue and saving you money (in the form of time).

The Volume Discount add-on allows you to set thresholds for discounting when people purchase multiple tickets or register for multiple events.

Instructions:

We recommend creating categories for your events. Then you can set it up so that categories of events get the discount. However, if you are not using categories, then you have to set the volume discount settings to “All Categories”.

In this example, the discount threshold starts at $70. Then the system applies a 50% discount the total price of the combined registrations.

NOTES:

  • One-click updates are not available for this download at this time.
  • Please report any errors, bugs or corrections in the Pre-release Forum

The Volume Discount add-on is only available as a Pre-release download.

Posted in | Comments Off on EE3 Volume Discount Add-on

Event Espresso