Add Resolution and Close Request via API

Add Resolution and Close Request via API

Hello, I would like to close requests via API which requires a resolution and an input to our custom field.

My curl Request:
  1. curl -k https://servicedesk.xxx.de/api/v3/requests/19038/close -X PUT -H "Accept: application/vnd.manageengine.sdp.v3+json" -H "authtoken: xxx" -H "Content-Type: application/x-www-form-urlencoded" -d input_data= '{"request": {"closure_info": {"requester_ack_resolution": true, "requester_ack_comments": "Mail fetching is up and running now", "closure_comments": "Reset the pasword solved the issue", "closure_code": {"name": "success"}}}}'
The Answer which is to be expected:
  1. {"response_status":{"status_code":4000,"messages":[{"status_code":4003,"type":"failed","message":"Request cannot be completed. Please fill the closure mandatory fields","fields":["udf_pick_1801","resolution"]}],"status":"failed"}}
But if I try to add a resolution with this curl request before closing the ticket:
  1. curl -k https://servicedesk.xxx.de/api/v3/requests/19038/resolutions -X POST -H "Accept: application/vnd.manageengine.sdp.v3+json" -H "authtoken: xxx" -H "Content-Type: application/x-www-form-urlencoded" -d input_data= '{"resolution": {"content": "sample resolution"}}'
I get this answer:
  1. {"response_status":{"status_code":4000,"messages":[{"status_code":4000,"type":"failed","message":"Input Json Data not found for entity."}],"status":"failed"}}
Now my questions:
  1. What am I doing wrong when I try to add the resolution?
  2. How Can I add data to our custom field?

                  New to ADSelfService Plus?