Skip to content

Guidance on Check-ins API Calls #1405

@joshb227

Description

@joshb227

Related Product
Which product is this question related to?
Check-ins

Describe the question
I am working on a dashboard that deals with first-time check-ins to a particular event during a given month. The main component is a table where each row represents a person, and there are columns for phone number, grade, and school, as well as a column for each event_period in the given month, as well as the following month. A check mark is placed in those columns if the person checked in to that particular event_period. The idea is we want to see whether first-time check-ins for a given month visit us at least two more times before the end of the following month.

This is all working well enough, but I'm wondering if there are any tips to speed up the data retrieval. Currently I call /check-ins/v2/events/xyz/event_periods and query by starts_at and ends_at to get the event_periods for the given timeframe. Then I page through /check-ins/v2/events/xyz/event_periods/abc/check_ins for each event_period to get the list of people who checked in to each period. I ALSO make another request to the periods in the specified month, this time using the first_time filter.

At that point, I have all the attendance data that I need, but I have a feeling it could be improved to lessen the time the user spends looking at a spinner. For example, I wonder if there is a way to distinguish between first-time check-ins using only the response from our first set of calls, without having to call the same endpoints again with the filter parameter. Additionally, because we only display first-time check-ins during the month specified by the user, I disregard all check-ins from the following month that didn't check in during the specified month. I wonder if there's some clever way to exclude them from the calls in the first place to significantly reduce the result set.

After all that, I still have yet to fill in the personal info columns for each row. I believe I'll have to make calls to the People API for those columns. Rather than making individual calls for each person, I see that it is possible to query /people/v2/people with a list of IDs. However, I imagine I could run into very long URLs if I try to just throw all of my attendee's IDs into a call. Can you offer any guidance about the fastest way to retrieve that info for each of our attendees?

Any efficiencies at all are welcome, and thank you in advance for your input!

I have..

  • Reviewed the documentation found at https://developer.planning.center/docs
  • Searched for previous issues answering this question
  • Removed all private information from this issue (credentials, tokens, emails, phone numbers, etc.)
  • Reviewed my issue for completeness

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions