Hi, thanks for the question, but I don't think the code is the problem since I can recreate the issue with 2 Post requests on Postman, which are the following:
POST
myserver.com/index.php?r=admin/remotecontrol
body:
{
"method" : "add_response",
"params" : [
"mySessionID",
123456,
{
"123456X1234X234567": "Y",
"submitdate":null
}
],
"id": 1
}
to which I get {"id":1,"result":"1","error":null}. Then
POST
myserver.com/index.php?r=admin/remotecontrol
body:
{
"method" : "update_response",
"params" : [
"mySessionID",
123456,
{
"id" : 1,
"submitdate":null,
"123456X1234X765432": "N",
}
],
"id" : 1
}
to which I get {"id":1,"result":"Error: Survey does not allow edit after completion.","error":null}
Today I noticed that if I turn on "Allow multiple responses or update responses with one token:" under participant settings, then the update works and I get
{"id":1,"result":true,"error":null}
But still I'm confused as to why I get "Survey does not allow edit after completion." if the response is marked as not completed.