Sugar API - create contact, quote

Hello, on one of my client's websites, we are using Zapier + SugarCRM (Zapier sends requests to Sugar in given situations). Now we want to get rid of the Zapier layer and send requests directly from the website to SugarCRM to create Contacts or Cases.

I'm checking the API documentation (https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/Endpoints/) but I can't find a way to create Sugar Contact or Case. To be sure we are on the same side, I mean those two options that can be found in Sugar dashboard:

Contact - /resized-image/__size/1000x750/__key/communityserver-discussions-components-files/54/pastedimage1673090882595v1.png

Quote - /resized-image/__size/1000x750/__key/communityserver-discussions-components-files/54/pastedimage1673090925996v2.png

My question is if that's even possible to do with a Sugar API? Ideally, I'd like to send all required details in a POST request and that should create contact/case.

Parents Reply
  • Thanks

    I managed to tweak a bit and got it working but currently, I got a problem with passing an email field for the "Contacts" module, maybe you will be able to help.

    Email field there is not a regular text/input, it's some kind of "repeater" field, where I can put more than one email. 

    I tried to post a regular string for the "email" field in my request but that apparently does not work (email field is not set with any value)

    Are you able to tell me what is the proper way to set this field with a request?

    Thanks

Children
  • Hello 

    Email Address is actually a separate module. 
    An easy way to double-check how to format the requests is to peek at how Sugar GUI does it and copy it for your request. 

    If you check the network tab in the browser developer console when adding a new Contact you can see how Sugar formats the request. 

    https://www.screencast.com/t/DOAKNiARyaC9

    In this case, would be something like this: 

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Let me know if this works for you. 

    Cheers, 

    André

  • Thanks , this is working great! You saved me lots of time.

    Thank you as well for the hint about checking the request payload, that should solve all my problems in the future when working with other modules.