planningcenter / developers

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

Creating a Group through Rest API and modifying Existing Attributes #1176

Closed paigeale closed 4 months ago

paigeale commented 4 months ago

Hello Planning Center Team,

I am working on automating creating of different groups through the Groups rest api interface....

I am experiencing the following issues...

1) Cannot create a group through the Rest API here is my post request.... res = requests.post("https://api.planningcenteronline.com/groups/v2/groups", proxies=proxies,json=payload,auth=(api_key,api_pass))

Output: {"errors":[{"status":"403","title":"Forbidden","detail":"You do not have access to this resource","meta":{"description":"User with id 70255 cannot create a Group."}}]}

Note that I have no problem creating groups with my user account through the GUI that my rest api is linked too.

2) Modifying specific attributes gives me issues res = requests.patch("https://api.planningcenteronline.com/groups/v2/groups/2332773", proxies=proxies,json={"data":{"attributes": {"description": "My new description"}}},auth=(api_key,api_pass))

Output: {"errors":[{"status":"422","title":"Forbidden Attribute","detail":"description cannot be assigned"}]}

Are there locked down attributes that are not able to be updated via the rest api? I can modify the "name" attribute for example but not "description".

halloffame commented 4 months ago

Hi @paigeale, thanks for reaching out and using groups! Most of the endpoints in the groups api are read-only at the moment. We would like to open it up at some point in the future, but there are some performance considerations we would need to address first. So it is on our radar but is not something we have committed to working on yet in the short to medium term.

In our API documentation you can look at the "Endpoints" section to see if it is writable and what attributes are able to be updated. Groups: https://developer.planning.center/docs/#/apps/groups/2023-07-10/vertices/group#endpoints People: https://developer.planning.center/docs/#/apps/people/2023-02-15/vertices/person#endpoints

paigeale commented 4 months ago

@halloffame / @seven1m thank you for you reply.

This is unfortunate news to hear. I see I am limited to just membership updating..... we have upwards to 100 groups at our church per semester and use a different form software called typeform for collecting the needed data. Thus hand transferring this info is days worth of effort, whereas a script could do it very quickly.

Any chance I can get api approval for beta access to these endpoints?

Thanks, Alex Paige