REST API - getting error - Method failed: (/updateIncident) with code: 400

Shivani29
Mega Guru

Hi All,

I am new to Integrations. I have created an Outbound rest message with HTTP Method PUT but getting error code:

Method failed: (/updateIncident) with code: 400
and response: [ISS.0086.9249] Missing Parameter: document

I have checked the connectivity through Postman as well and it is working fine. 
Checked Postman connectivity at 3rd party end and that is also fine. I am able to receive the data from third party but not able to send the data. Below are the snapshots for Rest Message and Business rule:

Rest Message:

find_real_file.png

find_real_file.png

Business Rule:

find_real_file.png

Kindly let me know where and what I am doing wrong. In Dev environment it is working fine.

Rgds,
Shivani

1 ACCEPTED SOLUTION

can you show me the snapshot of http request form section? n compare it with your dev. are you missing some headers

View solution in original post

19 REPLIES 19

Hi,

As I mentioned before have you tried commenting below line r.setEndpoint('your URL') ?

find_real_file.png

 

You are overriding the endpoint set in Method, and that URL need sys_id as parameter.

Please comment this line and try.

 

Thanks,
Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi Anil,

 

I tried it by commenting this endpoint line in business rule but it is giving the same error. 

Rgds,
Shivani

Michael de Boer
Giga Guru

Can you remove the , after "sys_updated_on" : current.sys_updated_on.toString() and try again?

Regards,

Michael

Regards,
Michael

Please mark the suggestion as helpful/like, if you find it useful to you or others who wants to refer similar content.
Please mark the solution as correct, if the answer provided has resolved your query.

Hi Michael,

Same error. Still getting response from 3rd part as Missing Parameter: document instead of updated successfully.

Rgds,
Shivani

shivambitanwar
Tera Expert

Hi Shivani,

 

Looks like an issue with r.setRequestBody() parameter. can you log whats coming in JSON.stringify(body)

 

400 error comes when you are not sending a valid JSON body. probably its missing a parameter which has been defined mandatory as part of payload that third party should be receiving.

 

 

Regards,

Shivambi