Help

Re: Curl with PHP doesn't update record

3326 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Albert_Muela_Do
5 - Automation Enthusiast
5 - Automation Enthusiast

Mi update with curl doesn’t work and i dont know where is the error
image
Record id, url and key are corrects (they works with delete and create rows), but not with update.
¿Can someone help me?
Thanks for your time!

14 Replies 14

Mi params are correct: $field → Column name, $value → boolean (is check column)
Im updating only one record.
Im using table endpoint (that works on delete and insert statements)
The record’s key is in $record[‘id’] in $params, i not sure about that, for that i asked for mi param’s array.

This is mi create record
image
And this, si mi delete record:
image
They works fine, i dont know why mu update doesn’t, only the param’s array is the difference…

The top level object in the body should have a key of “records” whose value is the array of records. This key is at the same level as the “typecast” key.

Finally it works, the array was the problem. If i use this, all go fine:
image
Thanks all for your time and help!

Glad you got it working.

Is there a reason why you switched to doing the JSON encoding manually? That step is unrelated to including the top level “records” object key, which was your main problem. Depending on the names and values of your fields, you may eventually get values that will be very difficult to encode manually.