PATCH request for modifying form submission not working

Hello all,

I am trying to make a PATCH request using Python on Zapier to modify a form submission. For this, I first make a GET request to get the most recent form submission and then I am trying to modify it. The modification step somehow doesn’t work. It doesnt work on the Developer Docs Modify form submission UI either. The python is as follows:

import requests
form_submission_id = input_data[‘recent_submission’]
url = “https://api.webflow.com/v2/form_submissions/” + form_submission_id
payload = { “formSubmissionData”: {
“Country”: “de”,
“totals”: “8000”
} }
headers = {
“accept”: “application/json”,
“content-type”: “application/json”,
“authorization”: “Bearer [token]”
}

response = requests.patch(url, json=payload,headers=headers)
print(response.json())
return {“recent_submission”: response.json()}

To see if I have the right bearer token, I have tried to update a CMS item and it works. I have tried the PATCH request for form submission modification on zapier using JS as well, which doesnt work either. On Zapier, I have tried it as a Webhook as well (doesnt work either).

Basically what I am trying to do is a calculator, where the user puts in some entries (there are also some hidden inputs with value 0), a JS script runs on Zapier to calculate some results and update the form submission with these results in the hidden inputs. The form success then shows some pie charts with these results (a loading icon runs till the pie charts are generated). Any ideas for this workflow (along with why PATCH might not be working) are welcome as well!

Thanks a lot in advance.