planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

Registration Event to Check-In Event connection #1246

Open aberamseyer opened 1 week ago

aberamseyer commented 1 week ago

Related Product Which product is this question related to? Read-only access to both Check-Ins and Registrations

Describe the question I would like to determine whether a user has both registered for an event and checked in to it. In the original post of #862, @JonSeale mentioned that he tied a registration event to a check-in event, but I cannot figure out how he did it.

What have you tried that worked? Nothing has worked so far via the API. From the UI, I'm looking for whatever gives this webpage the connection that displays this banner:

Screenshot 2024-11-08 at 8 46 22 AM

What have you tried that didn't work? Exploring event ids and url links within registrations/v2/attendees, registrations/v2/events, check-in/v2/events

I see that calendar/v2/events/<event_id> has a registration_url that can link a calendar event to a registration event, but the same calendar event with a check-in connection does not return information about that check-in in the API response. Furthermore, we typically work directly with registrations and check-ins, not creating a calendar event and manual connections.

Additional context I can understand that a direct relationship may not make sense for my use case in the context of recurring events, but any sort of connection would be helpful.

Many closed issues reference the Registrations API not being publicly available, but apparently this functionality already exists.

I have..

sheck commented 2 days ago

Hi @aberamseyer 👋 You might be able to do most of this already.

  1. In the registrations api: You could find the person from one of the attendees endpoints
  2. In the check-ins api: you could find check-ins for that matching event (selecting the event would be manual but see note below) and match it to people on the check_ins endpoints

The manual part is knowing which check-ins event to look at. We have a private api that stores a reference connecting the check-in event to the registrations event, but it's (basically) just an ID. If that would be crucial to this working for you, let me know and I can discuss it with the team. Otherwise, you may be able to get what you're looking with existing public endpoints.

aberamseyer commented 1 day ago

Hey, thanks for getting back to me 👋

The manual part is knowing which check-ins event to look at. We have a private api that stores a reference connecting the check-in event to the registrations event, but it's (basically) just an ID.

Yes, that's exactly it! Starting with a check-in Event id, I was hoping to follow the connection to the registrations api and get a list of registered people to compare. Currently, I'm using /check-ins/v2/check_ins/?include=person,event,event_period to build a list of people who have checked in to events.

For my specific use case, there would ideally be a relationship within the associated Event (?include=event) that could point me to the connected Registration Event. Something like

{
    "relationships": {
        "registration": {
            "data": {
                "type": "Event",
                "id": "<connected_registration_event_id>"
            }
        }
    }
}

but I'm be happy to accept whatever makes the best sense for the API

sheck commented 21 hours ago

Thanks for the extra details! I'll discuss it with the team and update this thread when I have an update 👍