REST POST leads to bad request when there are nested objects

0
hi there ! question about REST calls ; I'm using Mx 9.12.1 ; when there are nested objects in the payload, I got 400 responses on my REST calls, while the request seems to be okay : TRACE logs on "JSON export" logger shows a perfect payload, if I copy/paste it in Postman, it works fine. I'm using Mapping system to create the payload And if I use "Custom Request template" with the same payload, it works too (I just need to double the brackets '{' to make it work). There's obviously something wrong with the mapping .... Am I the only one facing this issue ?
asked
2 answers
0

If the payload is fine, then perhaps it’s the headers? You could be missing a Content-Type header?

If the JSON export logger shows a perfect payload then the mapping is definitely not the problem.

answered
0

The custom request template is a string template, and the { character is a reserved character. So you need to write {{ to indicate that you mean a real curly brace, and not the start of a parameter.

answered