Support

Home Forums Event Espresso Premium Fetching all the answers for an attendee using JSON API

Fetching all the answers for an attendee using JSON API

Posted: June 17, 2021 at 5:04 pm


TTBC

June 17, 2021 at 5:04 pm

Hi is it possible to fetch all the Questions and answers for all attendees on an event using JSON?

It would be nice to grab this data somehow by TXN-ID?

As I pull in the Event Data and Attendee data on one Get Request.
Then on the Second Get Request, I would match the Questions and answers by TXN_ID


Tony

  • Support Staff

June 18, 2021 at 8:47 am

Hi there,

If I understand correctly, you need something like this:

/wp-json/ee/v4.8.36/answers?where[Registration.Transaction.TXN_ID]=XXX&include=Question.*

Which pulls in answers to custom questions for all registrations linked to th TXN_ID you passed over and then also includes the related question data for each answer.

We have some details on this here:

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

and

https://github.com/eventespresso/event-espresso-core/blob/master/docs/C–REST-API/ee4-rest-api-GET-filtering-results.md#related-resources-fields-are-also-queryable

Is that what you are looking for?

The support post ‘Fetching all the answers for an attendee 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.

Event Espresso