Working with server side API form data

The API i am currently using want form data submitted as JSON like this

{
  "status": "{{$_POST.status}}",
  "teststring": "{{$_POST.teststring}}",
  "testboolean": "{{$_POST.testboolean}}",
  "testint": "{{$_POST.testint}}"
}

The problem I am facing is that it works great only if all the data is completed, i.e. every field becomes a required field. I have tried a few ways to make this conditional, as in only if something has been completed in that field then send it, however I am not really coming right.

Anyone have any suggestions on this.

Community Page
Last updated: