Support

Home Forums Pre-Sales JSON API Integration

JSON API Integration

Posted: February 28, 2015 at 4:13 am


Mr.P

February 28, 2015 at 4:13 am

Hi,

We are building a custom CMS to power an app and will require the use of your WP JSON API https://eventespresso.com/product/espresso-json-api/ does all or most of the key features work through the API?
1. Multiple ticket pricing options,
2. Multiple dates and time per event and
3. Country settings.
4. Ticketless Event
5. Social sharing
6. Ticketing
7. Ticket scanning


Lorenzo Orlando Caum

  • Support Staff

February 28, 2015 at 11:34 am

Hi, here is the documentation page for the JSON API add-on:

https://eventespresso.com/wiki/json-api-add-on/

It is currently used for communication between the mobile apps and a site running Event Espresso 3.

Information can be retrieved for events, registrations, and attendees.

Note: new events cannot be created through the API. Its primary use is reading information from an existing site.


Lorenzo


Mr.P

March 1, 2015 at 8:23 am

Hi,

Thank you. Does that mean it’s not compatible with EE4?

Regards


Lorenzo Orlando Caum

  • Support Staff

March 1, 2015 at 2:14 pm

Hi, it is only available for Event Espresso 3 at this time.

We will be rewriting it for Event Espresso 4 later this year.

Thanks again.


Lorenzo


Mr.P

March 2, 2015 at 3:41 am

Hi,

Thank you. Final question, I am about to purchase EE 3 personal license. Do i get to select the add ons that are applicable to my model? I ask because on the sale page I can see 5 pre defined add ons.

Thank you for confirming


Dean

March 2, 2015 at 5:57 am

Hi Mr. P,

The EE3 Personal Licence comes with the following addons:

Custom Template addon
JSON API
Social Media Buttons
Events Calendar
EE4 Events Calendar

Currently, EE3 licence holders also get access to EE4 as well (which is why you get the EE4 Calendar addon).

If you want addons, outside that list, I would recommend checking the EE3 Business licence as you get the most bang for your buck with that licence. Otherwise addons can be purchased separately.


Mr.P

March 11, 2015 at 3:15 am

I notice you mention offsite registration forms (coming soon), these would be very useful.

Do you have an ETA for these?


Dean

March 11, 2015 at 4:21 am

The EE3 JSON API already contains code that will allow offsite registration forms (https://eventespresso.com/wiki/json-api-add-on/#POST.2FPUT_.2Fregistrations).

Please bear in mind that the JSON API addon is designed as a platform for custom coding and integration, not as a plugin that will insert pre built things like registration forms.


Khurram Javed

March 16, 2015 at 8:39 am

Hi,

We have install EE4 on our staging server. Not yet finalized to move on to live, but it looks great and as per our expectation.

Meanwhile we want to create mobile application (android/iOS) for our attendees,who will get upcoming event details on their mobile and will be available to register from with in app.

Question:

Is it possible with EE4 or do we have to move back to EE3?
Does Json API is the only solution and is it available in our purchase?
How we can access data from database to get this done via webservices?


Lorenzo Orlando Caum

  • Support Staff

March 16, 2015 at 10:47 am

Hi Khurram,

The JSON API integration is only available for Event Espresso 3 at this time.

We are planning on rewriting it for Event Espresso 4 later this year.

Please get in touch with our sales team and they will provide some options for switching to Event Espresso 3:

sales [at] eventespresso.com


Lorenzo


Khurram Javed

March 17, 2015 at 12:26 am

Thanks for prompt reply. Can you please share sales staff email?
Is there any documentation for developers to study and access database directly and write their own queries?


Dean

March 17, 2015 at 5:32 am

sales [at] eventespresso.com

just replace [at] with @

Documentation wise:

High level info http://code.eventespresso.com/

More general stuff can be found in the documentation: https://eventespresso.com/support/documentation/versioned-docs/?doc_ver=ee4

Snippet library (not much here just yet but hopefully it will grow): https://github.com/eventespresso/ee-code-snippet-library


Mr.P

March 20, 2015 at 12:29 pm

Hi Guys

Thanks for the links

I’m trying to make a new registration via the json API

http://liveapps.info/test.html

You can see the JSON I am posting here which is directly copied from the registrations endpoint

When I submit it, I get a 404 everytime.

I can visit the same link, but only get a 404 when posting.

I understand that submitting this info should update and existing entry

Please let me know whats wrong

Thanks

Michael


Tony

  • Support Staff

March 23, 2015 at 3:08 am

Hi Michael,

When I submit that form I see a status code of 200 is returned (meaning success).

So this appears to be working now?

Have you enabled public access within the API settings?


Mr.P

March 23, 2015 at 3:26 am

Hi Tony

Yes the public access is enabled. I find this strange because exactly the same form was not working on Friday, but now it does.

Let me have a play with it now it is working and I will ask here if I have any more questions.

Thanks


Tony

  • Support Staff

March 23, 2015 at 4:33 am

Please do let me know how you get on 🙂

To note, if you have caching enabled on the site, check that the API pages are excluded from this caching.

Adding /espresso-api/ to the never cache strings should help.


Mr.P

March 23, 2015 at 11:54 am

Hi Tony

Ok so if you can take a look at this now it would be helpful
http://liveapps.info/test.php

It seems to do something now as I get a registration returned. I want to be able to submit a registration through the API and then get a url to make payment.

I have autogen the “code” of the “Registration” and then I want to go to:

http://liveapps.info/thank-you/?r_id=1427132518

to make the payment, but you can see the “amount” and “event name” is incorrect (0 should be 1000 and blank should be event name)

Can you see anything wrong with the JSON that I’m submitting

Thanks


Mr.P

March 25, 2015 at 1:44 pm

March 23, 2015 at 11:54 am
Hi Tony
Ok so if you can take a look at this now it would be helpful
http://liveapps.info/test.php
It seems to do something now as I get a registration returned. I want to be able to submit a registration through the API and then get a url to make payment.
I have autogen the “code” of the “Registration” and then I want to go to:
http://liveapps.info/thank-you/?r_id=1427132518
to make the payment, but you can see the “amount” and “event name” is incorrect (0 should be 1000 and blank should be event name)
Can you see anything wrong with the JSON that I’m submitting
Thanks


Mr.P

March 26, 2015 at 6:05 am

Hi Sorry we had some server issues, here is the new link

http://liveapps.info/test_reg1.php

submit the form and you should be taken to a screen here:

https://docs.google.com/file/d/0BwtUE1W9YK4UV0sycFB1TkNiMEE/edit?usp=drivesdk

copy the code in red and go to

http://liveapps.info/thank-you/?r_id={paste code here}

https://docs.google.com/file/d/0BwtUE1W9YK4UdmZWQmFtSFdBazA/edit?usp=drivesdk

You will see that the price and the event is missing.

Can you please assist me in how to get your plugin working, thanks


Mr.P

March 27, 2015 at 7:50 am

Hi,

Please can you attend or respond to our request. It’s almost 4 days since we asked a question

Thank you


Tony

  • Support Staff

March 27, 2015 at 12:24 pm

Hi Michael,

I am sorry for the delay, I can’t actually connect to your site (the page timesout each time)

However I have requested some feedback from one of you developers and will update this post shortly.


Mr.P

March 27, 2015 at 12:40 pm

Thanks, yes there was an error earlier in the week but it is working now, look forward to hearing from you


Michael Nelson

  • Support Staff

March 27, 2015 at 2:38 pm

Hi Mr P; the error you are experiencing is an integration issue between the JSON API and EE3’s frontend code. We have just written a fix for the issue and would like to send it to you to verify it resolves the issue for you (it resolved it for me on my test site). We will try to send it to you shortly…


Mr.P

March 27, 2015 at 3:10 pm

yes please, thanks


Tony

  • Support Staff

March 27, 2015 at 3:22 pm

Hi Michael,

I have emailed the update copy of the JSON API Add-on to the email address listed on your account.

Please let us know if this resolves your issue.


Mr.P

March 30, 2015 at 5:47 am

Hi,

Thank you. We are still experiencing some issue. Please see below..

Consider these 2 urls, the first made through the JSON API and the 2nd made through the website
(you can make more urls to test by following my instruction above at this link:
http://liveapps.info/test_reg1.php)

http://liveapps.info/thank-you/?r_id=5-1427708303
(I notice this one doesn’t have a transaction page but the other does)

http://liveapps.info/thank-you/?r_id=5-55191a92cf9fd

Go to the bottom and select pay by money order/check

You’ll see that the one created via the website updates the payment status, but the one created via the API doesn’t

Please can you adivse asap what is causing this or supply a fix.

Thanks


Michael Nelson

  • Support Staff

March 30, 2015 at 2:01 pm

Hi Mr P,
The JSON data on your page is a little invalid: the transaction’s amount_paid was 1000 which equalled the amount owed, and yet its status was “incomplete”.
Also, the registration’s status was set to “Incomplete” which isn’t a valid status (see https://eventespresso.com/wiki/json-api-add-on/#GET_.2Fregistrations). You probably meant “not_approved” or “pending”.
Also, each time you submit that form you should be changing the reg_code, otherwise there will be multiple registrations with the same reg_code, meaning that when you expect to retrieve one you may actually get another.
So by changing the transaction’s amoutn paid to 0, the registration’s status to “pending”, and changing the reg_code to something random, I was able to create a valid registration on your system; I then visited the thank you page, and selected “money order” and the registration’s status changed from “incomplete” to “pending”: http://liveapps.info/thank-you/?r_id=5-1different57&id=5&payment_type=cash_check&type=check
Here is a video showing what I changed: https://drive.google.com/file/d/0B2KCao4zFjaxYmdWM2U5clcwXzg/view?usp=sharing

Are you able to get it to work making those changes like I showed above?


Mr.P

March 31, 2015 at 2:40 am

Yes I am, thanks so much for that, last question, how do I submit multiple attendees?

I want to create the scenario where a user has purchased more than 1 ticket.

Thanks again for your help


Mr.P

April 1, 2015 at 5:12 am

strange, now it has stopped working, wordpress is 404ing all http post


Mr.P

April 1, 2015 at 7:03 am

nvm the server must have though I was a hacker its working now.

Ok so only 1 question, how do I add multiple attendees through the API?


Mr.P

April 10, 2015 at 9:25 am

Afternoon team,

Thanks for you previous support.

We still have some outstanding question

1.how do I add multiple attendees through the API. For instance we have two attendee types with different pricing. ‘General Admission’ and ‘VIP’ defined on the backend. However we only get one option on the front end. Please can you assist?

Thank you so much


Josh

  • Support Staff

April 20, 2015 at 9:18 am

Hi Mr.P,

From what I understand about the way EE3 handles multiple ticket types within one registration, it would need to be two separate registrations. The exception would be if you could replicate a cart process like Multi Event Registration.


Mr.P

April 21, 2015 at 5:48 am

Hi Josh,

Thank you for the feedback.

How do we add multiple tickets to s registration through the JSON API?

That’s the missing element.

Thank you for your swift response


Josh

  • Support Staff

April 22, 2015 at 6:08 am

Hi Mr. P,

It turns out that is something that would need to be custom developed.


Mr.P

April 27, 2015 at 11:58 am

Hello,

That’s a bit of a shame. Isn’t the multiple event registration addon a feature of EE3? Will you be fixing this issue?

Regards


Jonathan Wilson

April 27, 2015 at 3:40 pm

Hi there,

Since we are focusing on the development of EE4 now, we aren’t adding any new features to EE3. We update EE3 for bug and security fixes.


Jonathan Wilson

April 27, 2015 at 3:41 pm

Also, if you would like to speak to someone about developing this for you, please feel free to contact one of our Pro-Developers here: https://eventespresso.com/developers/event-espresso-pros/

The support post ‘JSON API Integration’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso