How to close a deal from the API?

Hello,
I would like to be able to close a deal from the API. So I need to do what’s happening here:

image

My questions are:

  • Can I get the “lost reason” list from the API?
  • Where can I enter the lost reason? Is it the lost_reason(string) field? If yes, then where should I submit the comment?

Thanks a lot for the support here

Hi David,

  1. You can get the Lost Reason list via the GET/dealFields (as it’s a Deal Field)

  2. You can enter the lost reason from the lost_reason string, but you can’t add a comment here. The Lost Reason feature is kind of weird in this manner as it’s really 2 features together. The comment is a Note so if you want to leave a comment, you would have to create a Note for the Deal after marking it as Lost.

1 Like

Hi David,

Thanks a lot. I guess I have all I need to implement my feature! Have a nice weekend

1 Like