Service to fetch the customer details from the backend MongoDB
Pre- requiste node - lastest version
-
Clone the project [cd to the directory]
-
npm install
-
npm start
- Authentication
URI http://localhost:3000/user/auth Method - post
{ "userId": "Boris", "password": "Stupid" }
{ "authenticated": "true" } **roles & token yet to be added to the response
- To create new customer
URI - http://localhost:3000/customers Method - post
{ "custId": "897121212", "custName":"dummy - 2", "businessType":"Logistics", "Status":"In Progress", "Purpose":"Trade", "RMTeam":"Trade Segment", "PEP":"No", "AnnualTurnOver":"234,888", "EstimateTurnOver":"898,765" } **custId should be auto generated in future
- To get all customers
URI - http://localhost:3000/customers Method - get
Response Structure
[ { "_id": "5eb1d05812107c1ec3ef3ae9", "custName": "dummy", "businessType": "Trasportation", "Status": "In Progress", "Purpose": "Trade", "RMTeam": "Trade Segment", "PEP": "No", "AnnualTurnOver": "234,888", "EstimateTurnOver": "898,765", "__v": 0 }, { "_id": "5eb1d18e2c13d81ed37ea428", "custName": "dummy - 2", "businessType": "Logistics", "Status": "In Progress", "Purpose": "Trade", "RMTeam": "Trade Segment", "PEP": "No", "AnnualTurnOver": "234,888", "EstimateTurnOver": "898,765", "__v": 0 } ]