Skip to Content

How to pass the body content which is in Json format in Rest API's Post method?

Hi Experts,

We are building a connector with markto and SAP C4C by using the REST API's and i have some queries regarding the ABSL.

1. How to pass the Body content in the post method of the API in Json format?

2. And how to parse the response that is in JSON format string?

Below are some screen shots.

Body Should be in Below Json Format how to send it through our ABSL?

Below is the response we get in Json format(Requested the API from online Tool).

How to parse this response in ABSL.

Kindly help me in this issue.



Rest_Body.PNG (24.9 kB)
JSON Format.PNG (5.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Mar 11, 2016 at 02:58 AM

    Do string concatenation:

    var Body = "{" +
    "action" + ":" + "createOnly" + ","+

    + "}";

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Siraj,

      Yes as expected the special character which will separate out each entry is comma(,) in the above request syntax.

      So please try to build your Body in the above JSON format with the help of (,) for separating multiple entries.I see in previous threads you already had a code structure to build the body in JSON format. Please use it.

      Hope this should work for your and obtained response can be parsed as mentioned in my first thread.




Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.