Rest API payload issues (1 reply and 1 comment)
mlamboms,
Within JSON writer select the first option in the Generate File Per Transaction dropdown box. Also select Omit Header Object checkbox as in screenshot below.
This is covered hereĀ https://www.realisable.co.uk/support/Documentation/iman-user-guide/Writers/JSON/JSONWriter.htm
very helpful thanks
I'm trying to post the following json payload to a rest end point and always getting invalid request response
{
"trxnID": 204623243,
"value": 300.00,
"trcNo": "0865232523",
"domainName": "www.example.com",
"aType": "TP_PAYMENT",
"prvNm": "EFT_A2",
"qrEweb": "DEP",
"bnK": "STD",
"sampleText": "2020-10-14 IB PAYMENT FROM 0865232523"
}
If I send it via postman it works fine. The problem seems to be with the mandatory JPath parameters on Iman which have to be specified and in this case it's just a single object with no nested objects in it. How do I overcome this. If I Specify Initial JPath to $ then the logs show the request being sent as
"$": [
{
"trxnID": 204623243,
"value": 300.00,
"trcNo": "0865232523",
"domainName": "www.example.com",
"aType": "TP_PAYMENT",
"prvNm": "EFT_A2",
"qrEweb": "DEP",
"bnK": "STD",
"sampleText": "2020-10-14 IB PAYMENT FROM 0865232523"
}
]
and the above is not what is expected by the rest endpoint hence the Invalid Request response