Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

JSON parse error.

Rajatlm10
New Contributor III
New Contributor III

Hi, 

Can anyone let me know whats wrong with my JSOn. 

{
"accountIdPath": "call1.message.user[0].userName",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://removed.com/profile/v4/Users ",
"httpMethod": "POST",
"httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\", \"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",
"value": [
{
"roleName": "EXP_USER"
},
{
"roleName": "EXP_APPROVER"
},
{
"roleName": "STATEMENT_APPROVER"
},
{
"roleName": "STATEMENT_USER"
}
]}]},
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}

 

I am getting the below error. 

Rajatlm10_0-1715958356932.png

[This message has been edited by moderator to mask URL]

2 REPLIES 2

Saathvik
All-Star
All-Star

@Rajatlm10 : Try below JSON, Missed escape characters after Value and closing quotes for httpParams block

 

 

 

{
    "accountIdPath": "call1.message.user[0].userName",
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
            "url": "https://removed.com/profile/v4/Users",
            "httpMethod": "POST",
            "httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\", \"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",\"value\": [{\"roleName\": \"EXP_USER\"},{\"roleName\": \"EXP_APPROVER\"},{\"roleName\": \"STATEMENT_APPROVER\"},{\"roleName\": \"STATEMENT_USER\"}]}]}",
            "httpHeaders": {
                "Authorization": "${access_token}"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    400,
                    401,
                    404,
                    500,
                    501,
                    502,
                    503,
                    504
                ]
            }
        }
    ]
}

 

 

 

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

rushikeshvartak
All-Star
All-Star

{
"accountIdPath": "call1.message.user[0].userName",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://removed.com/profile/v4/Users ",
"httpMethod": "POST",
"httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\",\"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",\"value\": [{\"roleName\": \"EXP_USER\"},{\"roleName\": \"EXP_APPROVER\"},{\"roleName\": \"STATEMENT_APPROVER\"},{\"roleName\": \"STATEMENT_USER\"}]}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.