The Sage CRM RESTful API allow developers and system administrators to programmatically manipulate entity records in Sage CRM. Sage provides a RESTful API which enables developers and system administrators to create, read, update, and delete record for entities in Sage CRM with the help of standard HTTP methods such as GET, POST, PATCH, and DELETE. With the help of RESTful API, developer can work on entities without accessing the Sage CRM system. To access and use the RESTful API with Sage CRM there must be an active user with logon permissions. Disabled or Users set as resource are not supported.
The RESTful API provides access to Sage CRM entities via URL paths. To use the RESTful API, your application must make an HTTP request in a specific format and parse the response. The RESTful API always returns JSON responses.
New Post: Sage CRM 2021 R1: Documents & Reports Configuration Updates
In this blog, we are going to discuss about how to call RESTful API using HTTP methods for create, read, update, and delete entities in Sage CRM. Before that, let’s see the URL Format used to call using HTTP Method.
To access a Sage CRM record data via the RESTful API, use the following URL format for your HTTP request:
http://{server}/sdata/{installName}j/sagecrm2/-/{resource}
Where:
- {server} is the Sage CRM server name or IP address.
- {installName} is the Sage CRM installation name specified in the Setup Wizard. The default installation name is CRM.
- {resource} is the Sage CRM entity name you want to access.
Follow the below steps one by one to achieve the same:
- Create new ASP.NET Project and add an empty web form.
- Add grid view in the web form to perform create, read, update, and delete operations using RESTful API with the help of standard HTTP methods such as GET, POST, PUT, PATCH, and DELETE.
- Add below code to read all records of an entity. With the help of GET method of HTTP you can get the result. Here we are considering the example of Notes entity against the Company entity. Refer below screen shot for your reference –
4. To perform an insert operation, use below code with the help of POST method of HTTP. Refer below code for your reference. If response from JSON is “Created” that means record inserted successfully in CRM. You can insert multiple records of the same entity by sending a single POST request.
5. For updating entity record using RESTful API, just change the method type as PATCH and call below URL for updating entity record. You can refer the code from point no. 4.
http://{server}/sdata/{installName}j/sagecrm2/-/Notes(‘NoteId’)?returnPartial=false
6. Now for deleting entity record from CRM using RESTful API, change the method type as DELETE and use below URL format for deleting entity from CRM. You can refer the code from point no. 3.
http://{server}/sdata/{installName}j/sagecrm2/-/Notes(‘NoteId’)
In this way developers can easily perform the Insert, read, update, and delete operations for entities using Sage CRM RESTful API with the help of standard HTTP methods such as GET, POST, PATCH, and DELETE. In the next part of the blog, we will discuss about how to host the asp.net project in IIS as well as how display the web form in CRM.
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes add-ons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature, Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.
For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.