You are required to develop a CRUD (Create – Read – Update – Delete) application in NodeJs using ExpressJS framework in this round. Basically, you will use FreshSales CRM API to create a Contact in FreshSales CRM, Retrieve Contact, Update Contact, Delete Contact.
- FreshSales API Or (Zoho CRM API) documentation FreshSales API Documentation (Create a sample account with some dummy data for FREE here and get the API Key from the settings)
- NodeJS server NodeJS Documentation
- ExpressJS ExpressJS Documentation
-
Create one endpoint [POST /createContact] to create a new contact in CRM or Database.
- Accept the following parameters in the REST API call:
first_namelast_nameemailmobile_numberdata_store(possible values: 'CRM' or 'DATABASE')
- Based on the
data_storevalue, create the contact in either 'CRM' or 'DATABASE'.
API:
POST /createContact(first_name, last_name, email, mobile_number, data_store)
- Accept the following parameters in the REST API call:
-
Create one endpoint [GET /getContact] to retrieve the contact for a given
contact_id.- Accept the following parameters in the REST API call:
contact_iddata_store(possible values: 'CRM' or 'DATABASE')
- Based on the
data_storevalue, get the contact from either 'CRM' or 'DATABASE'.
API:
POST /getContact(contact_id, data_store)
- Accept the following parameters in the REST API call:
-
Create one endpoint [POST /updateContact] for a given
contact_idto update itsemailandmobile_number.- Accept the following parameters in the REST API call:
contact_idnew_emailnew_mobile_numberdata_store(possible values: 'CRM' or 'DATABASE')
- Based on the
data_storevalue, update the contact in either 'CRM' or 'DATABASE'.
API:
POST /updateContact(contact_id, new_email, new_mobile_number, data_store)
- Accept the following parameters in the REST API call:
-
Create one endpoint [POST /deleteContact] for a given
contact_id.- Accept the following parameters in the REST API call:
contact_iddata_store(possible values: 'CRM' or 'DATABASE')
- Based on the
data_storevalue, delete the contact from either 'CRM' or 'DATABASE'.
API:
POST /deleteContact(contact_id, data_store)
- Accept the following parameters in the REST API call: