Skip to content
Developerhome

Get started with RESTful API

  Less than to read

  1. Install Sage CRM. For details, see the System Administrator Help on the Sage CRM Help Center.

    RESTful API is enabled in Sage CRM by default.

  2. Configure your app or REST client to send HTTP requests using the following Authorization header and URL format.

    Authorization header

     Authorization: Basic {credentials}
    

    Where {credentials} is the user name and password of your Sage CRM account separated by a colon (:) and encoded in Base64. Your account must have logon permissions in Sage CRM. Disabled accounts and resource accounts do not have access to the RESTful API.

    URL format

     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 resource you want to access.

    If you keep the default installation name in the Setup Wizard, the RESTful API access URL is as follows:

     http://{server}/sdata/crmj/sagecrm2/-/{resource}
    

Using Postman

To see the RESTful API in action, you can use Postman, a multiplatform REST client with intuitive GUI for configuring HTTP requests, designing JSON payloads, and viewing HTTP responses.

We have prepared a Postman collection demonstrating how to create, retrieve, update, and delete records in Sage CRM via the RESTful API.

For steps on how to download and use the Postman collection, go to the home page, select the RESTful API reference for your Sage CRM version, and see the Postman collection section.


RESTful API behavior to consider

HTTP instead of HTTPS in record URLs

Even though your request sent to the RESTful API uses the HTTPS protocol, the URLs of records returned by the API use HTTP. This behavior is by design. The RESTful API always uses HTTP in the URLs of returned records.

Server name in base URL

To form the base URL of returned records, the RESTful API uses the server name stored in the Parm_Value column of the Custom_SysParams database table. However, this column can contain several names for your server, for example, its local name and fully qualified domain name (FQDN) separated by a semicolon:

myserver;myservername.mydomain.com

The RESTful API always uses the first server name stored in the Parm_Value column.

As a result, if you send a GET request containing the FQDN of your Sage CRM server (such as https://myservername.mydomain.com/sdata/crmj/-/person), the base URL of the returned records may contain the local server name instead (for example, http://myserver/sdata/crmj/-/person).

If you want the URLs of returned records to use FQDN, change the order of the server names in the Parm_Value column:

  1. See what server names are stored in the Parm_Value column by running the following query on the Sage CRM database:
      SELECT Parm_Value from Custom_SysParams  where Parm_Name='ServerNames'
    
  2. Back up the Sage CRM database.
  3. Change the order of the server names, so that FQDN comes first. For example:
      UPDATE Custom_SysParams SET Parm_Value = 'myservername.mydomain.com;myserver' WHERE Parm_Name = 'ServerNames'
    

Sage CRM help and guides

For detailed Sage CRM documentation, go to the Sage CRM Help Center.