Giter Club home page Giter Club logo

crm-api's Introduction

CRM API Documentation

This is a RESTful API for a CRM (Customer Relationship Management) system built using Node.js, Express, and MongoDB.

Setup and Initialization

  1. Clone the repository:

    git clone https://github.com/sinehan001/crm-api.git
  2. Installation Dependencies

     cd crm-api
     npm install
  3. Set up MongoDB: Make sure you have MongoDB installed and running locally or provide the MongoDB URI in app.js.

  4. Start the server:

    npm start

API Endpoints

Create Customer

  • URL: POST /api/customers
  • Request Body:
{
    "name": "John Doe",
    "email": "[email protected]",
    "phone": "1234567890"
}
  • Response:
{
  "_id": "60a9f3b4a4a2c835241882a1",
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "1234567890",
  "__v": 0
}

Read All Customers

  • URL: GET /api/customers
  • Response:
[
  {
    "_id": "60a9f3b4a4a2c835241882a1",
    "name": "John Doe",
    "email": "[email protected]",
    "phone": "1234567890",
    "__v": 0
  },
  {
    "_id": "60a9f3d5a4a2c835241882a2",
    "name": "Jane Smith",
    "email": "[email protected]",
    "phone": "9876543210",
    "__v": 0
  }
]

Read One Customer

  • URL: GET /api/customers/{id}
  • Response:
{
  "_id": "60a9f3b4a4a2c835241882a1",
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "1234567890",
  "__v": 0
}

Update Customer

  • URL: PUT /api/customers/{id}
  • Request Body:
{
    "name": "John Doe",
    "email": "[email protected]",
    "phone": "5555555555"
}
  • Response:
{
  "_id": "60a9f3b4a4a2c835241882a1",
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "5555555555",
  "__v": 0
}

Delete Customer

  • URL: DELETE /api/customers/{id}
  • Response:
{
  "message": "Customer deleted successfully"
}

Screenshots

App Screenshot Create Customer Get All Customer Get Customer By ID Update Customer Delete Customer

Authors

License

MIT

crm-api's People

Contributors

sinehan001 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.