03/17/2023 11:39 AM
Hi All,
To create accounts in target system, we have Configured the REST connector. The API response code for both success and failure is 200. How can we configure success and unsuccess responses within CreateAccountJSON? Below is the response body which we are receiving from target:--
The response body has a "Response_Type" field. How can we map this field in success responses?
"message": {
"rXML": {
"Response": {
"Response_Details": {
"rXML": {
"Response": {
"Resp_Code": 502,
"Persistent_State": 2,
"Error_Type": 3,
"Response_Details": {
"Application_Advice": {
"Tran_Set_Identifier_Code": "",
"Application_Ackg_Code": "TR",
"Imported_Message_Id": "",
"Transaction_Purpose_Code": 11,
"Imported_Object_Id": null,
"Response_Type": "Error",
"Transaction_Date": "3/17/23 11:00",
"Shipper_ID": "",
"Imported_Object_Type": "User",
"Business_Unit": "",
"App_Advice_Errors": {
"App_Advice_Error": {
"App_Error_Text": "ompany does not exist in the system",
"App_Err_Cond_Code": 75000021,
"Error_Message_Tokens": {
"Error_Message_Token": "****S*ffer"
}
}
}
}
}
},
"Header": {
"Msg_Locale": "",
"External_Date_Time_Stamp": "",
"Action_Type": "",
"Version": "",
"Internal_Date_Time_Stamp": "2023-03-17 11:00:57",
"External_Reference_ID": "",
"Company_ID": ***,
"Internal_Reference_ID": 8010,
"Message_Type": "RESPONSE",
"Sequence_Number": "",
"Source": "***"
}
}
}
},
"Header": {
"Msg_Locale": "",
"External_Date_Time_Stamp": "",
"Action_Type": "",
"Version": "",
"Internal_Date_Time_Stamp": "2023-03-17 11:00:57",
"External_Reference_ID": "",
"Message_Type": "RESPONSE",
"Company_ID": ***,
"Internal_Reference_ID": ***,
"Reference_ID": "",
"Source": "***"
}
}
},
"statusCode": 200,
"description": null,
"status": "Success"
}
}
Solved! Go to Solution.
03/17/2023 12:08 PM - edited 03/17/2023 12:16 PM
Instead of response code you can differentiate using response details
https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm#top
Above content is the response body? If so try below
"response.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Error"
03/19/2023 10:02 AM
Hi Sathvik,
Thank you for replying.
But it's not working. below is the exact response we are getting :-
I tried with below options, but no luck-
1. response.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"
2.call1.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"
3.message.rXML.Response.Response_Details.rXML.Response.Response_Details.Application_Advice.Response_Type": "Confirmation"
Thanks & Regards,
Mamta
03/20/2023 11:28 PM
Hi Experts,
Any updates on this ?
Thanks & Regards,
Mamta
03/31/2023 09:35 AM
Hi Mamta,
Try below it should work.
04/03/2023 07:02 AM
Hi Vivek,
Its working. Thank you.
Regards,
Mamta