How do I register a new user for an event with the API

I am building a web application for an organization that has set up an Event in the system. I've looked at the Participate API and I don't think it's clear to me how to register a new user for an event. On the custom website, I have a First Name, Last Name and Email address field for users to register for the online event. After they click submit I would like to simply send a request to the Blackbaud Event API to register the user using only their email address, first and last name. Is this possible and could someone give me an example on how to accomplish this?


Comments

  • Did you get this figured out?
  • Hi Matthew,


    The Event SKY API has a CreateParticipant endpoint for adding a new participant to an event. This endpoint accepts a constituent_id in the request body, which means it requires that the constituent already exist.


    So if you have first/last/email from your website, then what you might consider doing is first calling the SearchConstituent endpoint from the Constituent SKY API, and providing the email as the search_text parameter to determine if the record is already a constituent. If so, the response will contain the constituent_id that you can use with the CreatePariticpant endpoint. If the email address isn’t found, then you can use the CreateConstituent endpoint to add a new constituent (with the first/last/email you have from the website), and the response will contain the ID of the newly added constituent (which you can then use with the CreateParticipant endpoint).


    I hope that helps – let us know if you have any questions!



Categories