-
paulninjaAsked on September 17, 2017 at 1:19 PM
I've been testing it but I'm not able to successfully update a record
even though I'm using the right api key with full access.
What should be the payload? Should I use the name of the fields or the number key?
-
paulninjaReplied on September 17, 2017 at 1:27 PM
Please close. I got it resolved by using 'submission' as the payload.
Sorry, I still am having issues. Anyone here who can show how to do API update using Guzzle Client.
I tried this and it's failing:
// update submission with mollie_payment_id
$client = new HttpClient;
$client->request(
'POST', 'https://api.jotform.com/submission/'.$submission['submission_id'].'?apiKey='.$this->jf_api_key, ['submission[7]' => $mollie_payment->id]);
-
paulninjaReplied on September 17, 2017 at 1:59 PM
Or should I do this payload?
['submission'=> ['7'=>'11'] ]
My field is question #7 -
paulninjaReplied on September 17, 2017 at 2:16 PM
Alright, I was able to get this done using post_params in Guzzle.
For others who will encounter the same issue, just do this:
$client->request(
'POST',
'https://api.jotform.com/submission/{submission_id}?apikey={apikey}',
[
'form_params' => [
'submission[7]' => 'bar',
]
]);
-
JanReplied on September 17, 2017 at 3:25 PM
Thank you for sharing your knowledge. We are glad to hear that you were able to fix the issue.
If you need any help, let us know. You may also contact our API team at api@jotform.com.