planningcenter / developers

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

Include archived groups in `/groups/v2/tags/` endpoint #1189

Closed jmezzera closed 4 months ago

jmezzera commented 4 months ago

Related Product Which product is this question related to? Groups

Describe the question Im trying to get a list of groups, both active and archived, tagged with a specific tag.

What have you tried that worked? I had partial success with the endpoint /groups/v2/tags/:id/groups. It's returning a list with the active groups.

What have you tried that didn't work? As part of the response meta, the endpoint claims to support the following query params:

    "can_query_by": [
      "archive_status",
      "name"
    ],

/groups/v2/tags/:id/groups?where[archive_status]=archived yields the same response as /groups/v2/tags/:id/groups?where[archive_status]=active. Am I doing anything wrong?

Additional context /groups/v2/tags/:id/groups?where[name]=foo works as expected?

I have..

americanmouths commented 4 months ago

Hi @jmezzera, thanks for bringing this to our attention. The archive_status query can be used with values of not_archived, only and include. not_archived will return only active groups, only will return only archived groups and include will include both active and archived groups.

It appears that this is not documented so I will work on getting that fixed! I'm going to close this issue but let us know if you need anything else.

jmezzera commented 4 months ago

Awesome! That did the trick!!

Thanks for the reply