planningcenter / developers

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

Event ids are not consistent across Check-Ins and Groups products #1165

Closed ascalabrini-montevideolabs closed 5 months ago

ascalabrini-montevideolabs commented 5 months ago

Affected Product Check-Ins and Groups

Describe the bug I'm making a request /groups/v2/events/ with an event-id that came from the /check-ins/v2/check_in?include=event and the response I get from the /groups/v2/events/ request is that the resource does not exist.

This happens the other way around - I can get a list of events from the Groups product, but when I try to make a request by event id to the Check-Ins product, I get that the resource does not exist.

For instance, a GET request to https://api.planningcenteronline.com/check-ins/v2/events/543871 returns an Event object, while a GET request to https://api.planningcenteronline.com/groups/v2/events/543871 returns the following response: {"errors":[{"status":"404","title":"Not Found","detail":"The resource you requested could not be found"}]}.

Also, a GET request to https://api.planningcenteronline.com/groups/v2/events/34832731 returns an Event object, while a GET request to https://api.planningcenteronline.com/check-ins/v2/events/34832731 returns the same 404 error as above.

To Reproduce

  1. I make a GET request to https://api.planningcenteronline.com/check-ins/v2/check_ins?include=event and pull a set of check-ins with their corresponding event.
  2. I then make a GET request to https://api.planningcenteronline.com/check-ins/v2/events/ with one of the event-ids I got from step 1 and the API returns an Event object.
  3. With that same event-id I used on step 2, I make a GET request to https://api.planningcenteronline.com/groups/v2/events/ and I get a 404 with a message that the resource could not be found.

Expected behavior I'm expecting to find the same event with the same event-id on both Check-Ins and Groups products as I need to get to which group each check in corresponds to.

seven1m commented 5 months ago

Each product has its own IDs, and you cannot expect to find an event in one product with an ID from another product.

Events in Groups and Events in Check-ins do not represent the same thing.

Please let us know if you have more questions!

ascalabrini-montevideolabs commented 5 months ago

Hi @seven1m, thanks for your reply! If that's the case, is there any chance that I can get from the API to which group a check-in corresponds?

seven1m commented 5 months ago

A check-in corresponds to an Event in the Check-ins product, but does not correspond to an Event in the Groups product. You might be thinking of Group Event attendance? In that case, you can get attendance from a URL like: https://api.planningcenteronline.com/groups/v2/events/1/attendances. The Events docs here might help: https://developer.planning.center/docs/#/apps/groups/2023-07-10/vertices/event