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
  • 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
    1
    2
    3
    4
    { "first_name":"John",
    "last_name":"Doe API2",
    "email":[{"email_address":"apitest6@test.com","primary_address":true,"opt_out":false}]
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Let me know if this works for you. 

    Cheers, 

    André

Children