sugarcrm v10 REST API Basic CRUD operations


First, ensure you log in, and add the access_token to your request header.

In this example, we're going to do some basic operations to access records. These use the Accounts module as an example, but other standard and custom modules (i.e. Leads, Contacts, Opportunities) behave in the same way.


To create an Account, we need to make a post request to the Accounts endpoint, with the details we want to add. Upon success, this returns an object containing the new record's ID, and the current data.

"name":"My New Account"


First, we'll retrieve the record we just created, for me the Id was "9174c58c-409c-11e7-bfdf-00163ef1f82f" so to retrieve all information for the record, we do the following:


That sure is a large object! What about just seeing the name, and the date I just created it?


Much better. But what if I have thousands of Accounts in the system already, and haven't managed to remember the GUID for it?

GET,date_entered&filter[0][name]=My New Account


So what if I decided I wanted to change something on the app? What about changing the name, and adding a description?

    "name":"My Updated Account",
    "description":"Updated via REST API"


Okay, that's all fine, but let's clear this up before putting real data in: