Error code 6831 : "Input Parameter Missing" when trying to PUT via Invoke
I'm creating some custom script in Zoho Flow to associate the Zoho Projects Client Company. I've got the find piece of the code working but I want to update the found record with the CRM ID
Here is my code
- string ZP_getClientID(string varClientName, string varCRMID)
{
response = invokeurl
[
url :"https://projectsapi.zoho.eu/restapi/portal/MYPORTAL/clients/"
type :GET
connection:"MY CONNECTION"
];
// Change the response to a map to extract specific information
varClients = response.get("clients");
//
// iterate the list of clients to match the CRM Account ID
for each varRecord in varClients
{
clientanme = varRecord.getJSON("name");
if(clientanme = varClientName)
{
primaryclientid = varRecord.get("id");
}
}
//Update the CRM ID in projects
crmInfo = Map();
crmInfo.put("crm_account_id",varCRMID);
updateresponse = invokeurl
[
url :"https://projectsapi.zoho.eu/restapi/portal/MYPORTAL/projects/91102000002038530/clients/"
type :POST
parameters:crmInfo
connection:"MY CONNECTION"
];
info updateresponse;
return primaryclientid;
}
Where the record I am trying to update looks like this :
- {
- "clients": [
- {
- "crm_account_id": "",
- "name": "My Customer Name",
- "id": 91102000005162221
- }
- ]
- }
I'm just getting error
{
error : {
code : 6831,
message : "Input Parameter Missing"
}
}