I just started using the api and it’s great – it gets me almost all the way to where I need to go. However, the page I’m working on needs to check the answer to a particular registration question for each attendee before proceeding. I can get the attendees using the api, but according to the docs it looks like the ‘answers’ endpoint has yet to be written. I assume I’ll have to use php, which is no problem, but I’m not sure how to best structure my code to retrieve this particular answer. Can you point me in the right direction?
You could write your own custom Query to do this but Event Espresso has a shortcode built into core that will pull the answer for you – [EE_ANSWER]
EE_ANSWER requires the Question ID for your specific question (q=”Question_ID”) and the Attendee ID to pull the answer for (a=”Attendee_ID”). So if you have the Attendee ID stored within $id and the Question ID is 12 you could do something like this:
The support post ‘Get registration questions/answers using json 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.
Support forum for Event Espresso 3 and Event Espresso 4.