Support

Home Forums Event Espresso Premium Event Espresso Api, Steps needed for a complete registration done via the api

Event Espresso Api, Steps needed for a complete registration done via the api

Posted: January 17, 2019 at 4:15 pm

Viewing 1 reply thread


Folabi Ogunkoya

January 17, 2019 at 4:15 pm

Following on from the thread at
https://github.com/eventespresso/event-espresso-core/issues/283

I am wondering if anyone has successfully used the event espresso api to create a fully formed event espresso registration.

And if so if they can provide a guideline of sorts on what is required to achieve this


Josh

  • Support Staff

January 30, 2019 at 9:16 am

Hi,

I believe someone has done this, but they’re not going to see this topic in order to give you a reply.

What you can do is follow these steps to get started:

1) Review and follow the examples in the documentation:
a) https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-introduction.md
Especially important: Learn how to use the discovery endpoints and Authentication.
b) https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-writing-data.md
2) Create a registration via Event Espresso’s UI in the WordPress dashboard
3) Review the site’s database tables to see everything that was just written to the database. You’ll note that Event Espresso tables have an _esp_ prefix. Also note that an attendee custom post type is also written to the _posts table, and specific entities within event related tables need to be updated when a registration is added. For example, a ticket’s sold count needs to be incremented when an approved registration is added.
4) Learn how to read/GET the related registration data using the REST API:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-reading-data.md
https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-GET-including-specific-fields-and-related-entities-in-results.md
Here you’ll note how to do GET requests for registration-related data, which you’ll use much of the same syntax for POSTing data.
5) Once you’ve gotten this far, you can start putting together REST API requests to write to the database

Viewing 1 reply thread

The support post ‘Event Espresso Api, Steps needed for a complete registration done via the api’ 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