Back to SugarCRM Programming Languages Index

Node.js SugarCRM REST API Examples

SugarCRM Authenticate
Demonstrates how to authenticate to the SugarCRM REST v10 API. This is how an OAuth2 access token is obtained.
Note: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Get MetaData
Retrieves SugarCRM metadata and saves (streams) the JSON metadata to a file. The metadata is quite large. For our sample SugarCRM database, the JSON metadata is approx. 3.5MB. Among many other things, the metadata contains the field names for each SugarCRM module.

For your convenience, Chilkat put the output of this sample code here:
Sample SugarCRM Metadata JSON. Load this URL in FireFox to browse the JSON. (FireFox provides nice JSON browsing capability..)

Note: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Get Accounts
Retrieves (exports) account records for accounts having names beginning with "C" and "D".
Note: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Favorite a Record
Favorites specific record using the /{module}/{record_id}/favorite endpoint.
Note: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Unfavorite a Record
Unfavorite a specific record using the /{module}/{record_id}/favorite endpoint.
Note: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Create a Note Record
Creates a Note record. (Another Chilkat example will demonstrate how to submit a file attachment to the Note record created here.).
Attention: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.

SugarCRM Submit a File Attachment
Uploads (submits) a file attachment to a Note record.
Attention: This example uses our own demo SugarCRM domain containing demo data. You should replace "cscspanset.demo.sugarcrm.eu" with your own domain.