Support

Home Forums Event Espresso Premium Register an Attendee to an Event via rest API Call (/wp-json/ee/v4.8.36)

Register an Attendee to an Event via rest API Call (/wp-json/ee/v4.8.36)

Posted: September 12, 2023 at 5:49 am


mdony72

September 12, 2023 at 5:49 am

hi,
Could somebody help a little on how to register an attendee to an event. I have succesfully add a registration for the attendee, but seems I am still missing some steps
current steps are as follow :
1. POST A New Transactions , parameters
‘{“TXN_total”:10,”TXN_paid”:0,”STS_ID”:”TIN”,”PMD_ID”:6}’
I got a TXN_ID
2. POST A New Registration, with parameters :
{“EVT_ID”:106,”ATT_ID”:149′
.’,”TXN_ID”:226′
.’,”STS_ID”:”RPP”‘
.’,”TKT_ID”:1}
the registrations is recorded inside Event Registration/Transaction menu and I got A registration ID with a status “Pending For Payment” as expected
but also I got a warning message that REG_code is not defined (the response from the /Regisrations POST Call Return.
In I could not print INVOICE
I must have miss some step, could somebody help me on this

Thanks


Rio

  • Support Staff

September 12, 2023 at 7:33 pm

Where you able to check this article?

https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-introduction.md

Thanks.


mdony72

September 12, 2023 at 8:32 pm

yes i ve read it back n forth, if i had not read i wouldn’t be able to post data to EE
and i have managed to GET and POST data to EE. my question is the proper flow to register an attende to an event. I repeat my steps
1. post to …/transactions to get a new TNX ID
2. post A …/registrations with EVT_ID, TXN_ID, TKT_ID, ATT_ID
it works to put a registration entry, but it still lack some information, REG_code ( i got a return error eventhoug a REG_ID is returned )
is there a proper step or a precise link where i can learn ?
thanks


Brent Christensen

  • Support Staff

September 13, 2023 at 4:48 pm

Hi mdony72,

I’m Event Espresso’s lead dev. The reg code is just a unique string that is used in some places to identify the registrant. They are created server side by the EventEspresso\core\domain\entities\RegCode class, and are simply a combination of the transaction ID, ticket ID, and part of the “reg_url_link”. You can create your own and supply that. It doesn’t have to follow that same format as long as it is unique for each registrant.


mdony72

September 20, 2023 at 6:21 am

Hi Brent
thanks for replying. yeah I had I predicted that, i did try create my own reg code. I think I have missed a step, that is we need to create line_item for the transaction. But I still miss another step i guess, now i can access the detail transaction of of the registration but i still failed to create the invoice from the adminstrator menu

The support post ‘Register an Attendee to an Event via rest API Call (/wp-json/ee/v4.8.36)’ 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