0

My request body

{"formId":"D11601C6-5A9B-4AAC-8B39-8BA62991E373","sectionId":"fb9b80dd-7f59-4de0-bc19-c13558e69226","employeeCode":"EMPCODE","orgUnitCode":0,"customTextOutput1":"SAVE","accessId":"FA~0000001","questionResponseValue":"{"name":"New Joiner Declaration ","description":"This section captures details of previous employment during the same tax year.","id":"fb9b80dd-7f59-4de0-bc19-c13558e69226","questions":[{"id":"4c3a31ef-2538-4128-8672-f7580df8d61e","type":"MULTILINE","responseValue":"[{\"1710910377462\":\"TESTEMP1\",\"1710910389883\":\"2025-03-03\",\"1710910391035\":\"2025-04-09\",\"1706075827274\":{\"valueField\":\"PTAX\",\"displayField\":\"Profession Tax Deducted\"},\"1706075925427\":\"10000\"}]"},{"id":"f6f61114-8139-4ec9-a313-b6f5484455a0","type":"ATTACHMENT","responseValue":"[{\"fileId\":\"${C_FILEID}\",\"name\":\"${C_FILENAME}\",\"contentType\":\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"fileSizeBytes\":${C_FILEBYTES},\"createdTimeUTC\":\"${C_CREATEDTIME}\"}]"}]}"}

View results tree request

{"formId":"D11601C6-5A9B-4AAC-8B39-8BA62991E373","sectionId":"fb9b80dd-7f59-4de0-bc19-c13558e69226","employeeCode":"EMPCODE","orgUnitCode":0,"customTextOutput1":"SAVE","accessId":"FA~0000001","questionResponseValue":"{"name":"New Joiner Declaration ","description":"This section captures details of previous employment during the same tax year.","id":"fb9b80dd-7f59-4de0-bc19-c13558e69226","questions":[{"id":"4c3a31ef-2538-4128-8672-f7580df8d61e","type":"MULTILINE","responseValue":"[{\"1710910377462\":\"TESTEMP1\",\"1710910389883\":\"2025-03-03\",\"1710910391035\":\"2025-04-09\",\"1706075827274\":{\"valueField\":\"PTAX\",\"displayField\":\"Profession Tax Deducted\"},\"1706075925427\":\"10000\"}]"},{"id":"f6f61114-8139-4ec9-a313-b6f5484455a0","type":"ATTACHMENT","responseValue":"[{\"fileId\":\"NPPT000029_UPLOAD_DOC_SAMP_NJD_20250416221353974.docx\",\"name\":\"UPLOAD_DOC_SAMP_NJD.docx\",\"contentType\":\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"fileSizeBytes\":37381,\"createdTimeUTC\":\"2025-04-17T05:13:53.9945446Z\"}]"}]}"}

\\ is changed to \ while executing & response failed.

1 Answer 1

0

None of your requests is a valid JSON, refer to your API contract to see what is the expected.

Also be aware that instead of building the request manually you can record it using JMeter's HTTP(S) Test Script Recorder or JMeter Chrome Extension.

If you're uploading a file - make sure to copy the file to "bin" folder of your JMeter installation, this way JMeter will properly generate the relevant HTTP Request sampler

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.