planningcenter / developers

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

I need an API to pull people are are scheduled for several tasks #1195

Closed csdunaway closed 3 months ago

csdunaway commented 3 months ago

We need a way to pull data from the API to get the people who are scheduled each week. We need this each of the teams. Which product is this feature related to?

This is in the Services

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

I have..

michaelbenzinger commented 3 months ago

Hi Clifton!

Thanks for writing in. There are a couple of steps you can take to get this information through the API. The key parts you'll need are plans, teams, and team_members.

  1. Determine what Service Types you want to pull info for:

    /service_types
  2. Then within a Service Type, find all the Plans that fall within a date or date/time range:

    /service_types/(id)/plans?filter=after,before&after=2024-06-05&before=2024-06-12
    • (You can use iso8601 strings instead to filter to certain times if you want)
  3. Decide what Teams you want to filter to:

    /service_types/(id)/teams
  4. For each Plan from Step 2, get scheduled Team Members and query by Team ID from Step 3:

    /service_types/(id)/plans/(id)/team_members?where[team_id]=(id)

Let us know if this is what you're looking for or if you need anything else!

michaelbenzinger commented 3 months ago

I wanted to add that you can also do this through Lists in the People app, which may be easier depending on your needs. Lists has built-in features like relative dates and chaining more complex rules together. You can use the Services > Scheduled rule which will give you options for Service Type, Team, and dates.