Skip to content

ajaybor0/Task-01-FreshSales-CRM-API

Repository files navigation

Task-01-FreshSales-CRM-API

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.

Required Resources/ Documentation

Data format for all the endpoints should be in JSON

  1. Create one endpoint [POST /createContact] to create a new contact in CRM or Database.

    • Accept the following parameters in the REST API call:
      • first_name
      • last_name
      • email
      • mobile_number
      • data_store (possible values: 'CRM' or 'DATABASE')
    • Based on the data_store value, create the contact in either 'CRM' or 'DATABASE'.

    API:

    POST /createContact(first_name, last_name, email, mobile_number, data_store)
  2. Create one endpoint [GET /getContact] to retrieve the contact for a given contact_id.

    • Accept the following parameters in the REST API call:
      • contact_id
      • data_store (possible values: 'CRM' or 'DATABASE')
    • Based on the data_store value, get the contact from either 'CRM' or 'DATABASE'.

    API:

    POST /getContact(contact_id, data_store)
  3. Create one endpoint [POST /updateContact] for a given contact_id to update its email and mobile_number.

    • Accept the following parameters in the REST API call:
      • contact_id
      • new_email
      • new_mobile_number
      • data_store (possible values: 'CRM' or 'DATABASE')
    • Based on the data_store value, update the contact in either 'CRM' or 'DATABASE'.

    API:

    POST /updateContact(contact_id, new_email, new_mobile_number, data_store)
  4. Create one endpoint [POST /deleteContact] for a given contact_id.

    • Accept the following parameters in the REST API call:
      • contact_id
      • data_store (possible values: 'CRM' or 'DATABASE')
    • Based on the data_store value, delete the contact from either 'CRM' or 'DATABASE'.

    API:

    POST /deleteContact(contact_id, data_store)

About

Interactly – BACKEND NodeJS DEVELOPER –Coding Task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published