Click HERE to see how Saviynt Intelligence is transforming the industry. |
11/02/2023 06:26 AM
Hi,
Getting the below error when trying to use the default InContact createAccountJson included with the package. Any assistance would be greatly appreciated.
{"call1":{"headers":null,"message":{"error":"invalid_request","error_description":"Invalid agents - Property 'agents' has not been defined and the schema does not allow additional properties."},"statusCode":400,"description":null,"status":"Failed"}}
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://api-na1.niceincontact.com/inContactAPI/services/v29.0//agents/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"agents\":[{\"isActive\":false}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
11/02/2023 06:32 AM - edited 11/02/2023 06:35 AM
@myasin Is url used in the JSON is correct?
"https://api-na1.niceincontact.com/inContactAPI/services/v29.0//agents/${account.accountID}",
// used in URL.
"httpParams": "{\"agents\":[{\"isActive\":\"false\"}]}",
11/02/2023 06:44 AM
thanks, same error message when I fix the url
https://api-na1.niceincontact.com/inContactAPI/services/v29.0/agents/${account.accountID}
11/02/2023 06:49 AM - edited 11/02/2023 07:21 AM
@myasin try below
"httpParams": "{\"isActive\":\"false\"}",
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://api-na1.niceincontact.com/inContactAPI/services/v29.0/agents/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"isActive\":\"false\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
also did you try in postman?