planningcenter / developers

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

Services:: Help with getting Team Positions for specific people #1196

Closed matchmee closed 4 months ago

matchmee commented 4 months ago

Related Product Which product is this question related to? Services

Describe the question I am working on integrating the Planning Center API with Google Sheets to fetch and display data for team members and their respective positions. Despite following the API documentation, I am encountering issues with fetching the correct data.

Here's a summary of the current problem:

We are using the endpoint https://api.planningcenteronline.com/services/v2/people with the query parameter where[team_ids][]. Although the response code is 200, the API returns all people in the organization, not just those associated with the specified teams. We also attempted fetching team position assignments from https://api.planningcenteronline.com/services/v2/people/{person_id}/person_team_position_assignments, which resulted in a 404 error. Could you please provide guidance on the correct usage of these endpoints to filter people by their team IDs and fetch their corresponding team positions?

Additionally, if there are specific nuances or requirements for the parameters that need to be met, your insight would be greatly appreciated.

I have..

matchmee commented 4 months ago

I spoke with @seven1m in Slack and he got me straightened out. Thanks guys! The link we got to work was:

https://api.planningcenteronline.com/services/v2/me(or personID)/person_team_position_assignments?include=team_position