Skip to content

A Node.js backend for an e-commerce website.

License

Notifications You must be signed in to change notification settings

ayusshrathore/ecommerce-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

eCommerce-API

Introducing a full-fledged eCommerce API solution, built using Node.js, is a one-stop for all your eCommerce needs. With a user-friendly interface and seamless integration, this API is designed to help you effortlessly manage your online store. From product management to payment processing, this API provides an all-in-one solution that will take your eCommerce business to the next level.


Table of Contents


Features

  • User Authentication
  • User Management
  • Product Management
  • Cart Management
  • Order Management
  • Payment Gateway Integration

Getting Started

Prerequisites

Installation

  1. Clone the repo
git clone https://github.com/ayusshrathore/ecommerce-api.git
  1. Install NPM packages
npm install

or

yarn install
  1. Create a .env file in the root directory and add the following
PORT=8080
MONGO_URI=mongodb://localhost:27017/ecommerce
JWT_SECRET=your_jwt_secret
  1. Run the server
npm start

API Documentation

End-point Method Description
/api/v1/user/login POST User login
/api/v1/user/register POST User register
/api/v1/user/update POST User update
/api/v1/user/update/address POST User address update
/api/v1/user/delete POST User delete
/api/v1/user/get GET User get
/api/v1/blog/add POST Blog add
/api/v1/blog/add POST Blog update
/api/v1/product/add POST Product add
api/v1/product/delete?_id=some_id POST Product delete
/api/v1/product/get GET Product get
/api/v1/mail/send POST Mail send
/api/v1/customer/add POST Customer add
/api/v1/admin/register POST Admin register
/api/v1/user/get POST User get by email
/api/v1/cart/add POST Cart add
/api/v1/cart/update POST Cart update
/api/v1/cart/delete POST Cart delete
/api/v1/cart/getAll GET Cart get all
/api/v1/cart/remove POST Cart remove
/api/v1/payment/verify POST Payment verify
/api/v1/payment/create POST Payment create
/api/v1/order/create POST Order create
/api/v1/order/get POST Order get
/api/v1/order/cancel POST Order delete
/api/v1/auth POST Check auth

End-point: User login

Method: POST
http://localhost:8080/api/v1/user/login
Body (raw)
{
	"email": "[email protected]",
	"password": "123456"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: User register

Method: POST
http://localhost:8080/api/v1/user/register
Body (raw)
{
	"firstName": "Ayush",
	"lastName": "Rathore",
	"email": "[email protected]",
	"phone": "123456789",
	"password": "123456"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: User update

Method: POST
http://localhost:8080/api/v1/user/update
Headers
Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiMTIzNDU2Nzg5IiwiaWF0IjoxNjU1ODA4NDcyLCJleHAiOjE2NTU4OTQ4NzJ9.t714_A7DccbFEyyf7DcqK7HU6RQm4l0RKSlDcq_73GU
Body (raw)
{
	"firstName": "Ayush",
	"lastName": "Rathore",
	"email": "[email protected]",
	"phone": "987654321"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: User address update

Method: POST
http://localhost:8080/api/v1/user/update/address
Headers
Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiMTIzNDU2Nzg5IiwiaWF0IjoxNjU1ODA4NDcyLCJleHAiOjE2NTU4OTQ4NzJ9.t714_A7DccbFEyyf7DcqK7HU6RQm4l0RKSlDcq_73GU

Body (raw)

{
	"email": "[email protected]",
	"house": "007",
	"street": "Durga Colony",
	"city": "Jodhpur",
	"state": "Rajasthan",
	"pincode": "342012"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: User delete

Method: POST

http://localhost:8080/api/v1/user/delete

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyOTA3NDJjMjNjOWU0ZDFjNTc2ZGQ3ZiIsIm5hbWUiOiJGcmVha2VyIiwiZW1haWwiOiJoZXlmc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kpXVCJ9.eyJpZCI6IjYyOTA3NDJjMjNjOWU0ZDFjNTc2ZGQ3ZiIsIm5hbWUiOiJGcmVha2VyIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1MzYzNDExMCwiZXhwIjoxNjUzNzIwNTEwfQ.KuNGAtKRg9Jh41EBHwRHOV_2uKVcB58z_oNhPTUi1fo

Body formdata

Param value Type
title Blog title text
content Blog content text
image /home/freaker/Pictures/Ayush.jpg file
description Blog description text
category Blog category text
author Freaker text

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Blog update

Method: POST

http://localhost:8080/api/v1/blog/add

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyOTA3NDJjMjNjOWU0ZDFjNTc2ZGQ3ZiIsIm5hbWUiOiJGcmVha2VyIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1MzY0NTkxMiwiZXhwIjoxNjUzNzMyMzEyfQ.gNSzwrFa6SeXXjLksV3wmoFKsf8qZxnqiZeOzGkllog

Body (raw)

{
    ""
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Product add

Method: POST

http://localhost:8080/api/v1/product/add

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyOTFkNDFmMDMzNzMyM2U4OGZjY2NhZCIsIm5hbWUiOiJGcmVha2VyIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1MzcyNDIxOCwiZXhwIjoxNjUzODEwNjE4fQ.p-9VhzhRT5_q_2R1cXG-MfgCD2A4CyNoxZiDP3ITYHk

Body formdata

Param value Type
image /home/freaker/Pictures/Ayush.jpg file
name Product 2 text
price 200 text
description Product 2 description text
category Category 2 text

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Product delete

Method: POST

http://localhost:8080/api/v1/product/delete?_id=6290c9741847935bb3b462d8

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyOTA3NDJjMjNjOWU0ZDFjNTc2ZGQ3ZiIsIm5hbWUiOiJGcmVha2VyIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTY1MzYzNDExMCwiZXhwIjoxNjUzNzIwNTEwfQ.KuNGAtKRg9Jh41EBHwRHOV_2uKVcB58z_oNhPTUi1fo

Query Params

Param value
_id 6290c9741847935bb3b462d8

⁃ ⁃ ⁃ ⁃ ⁃ ⁃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zUwSNG1vyGY9FdJSRm0No2PL_rXuj0

Body (raw)

{
	"email": "[email protected]",
	"name": "Ayush Rathore"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Customer add

Method: POST

http://localhost:8080/api/v1/customer/add

Body (raw)

{
	"name": "John Doe",
	"email": "[email protected]",
	"phone": "123456789"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Admin register

Method: POST

http://localhost:8080/api/v1/admin/register

Body (raw)

{
	"name": "Freaker",
	"email": "[email protected]",
	"password": "123456"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: User get by email

Method: POST

http://localhost:8080/api/v1/user/get

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTg3NjU0MzIxIiwiaWF0IjoxNjU1ODEzNTU0LCJleHAiOjE2NTU4OTk5NTR9.6jk-QlD1seZQuCHbgjx9Rtl2_RlhHbXT3vowhRBbONA

Body (raw)

{
	"email": "[email protected]"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Cart add

Method: POST

http://localhost:8080/api/v1/cart/add

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NTkwNjMwMywiZXhwIjoxNjU1OTkyNzAzfQ.m2_aNRd3K_5zOkdl98yj5ZmYKkl76sxNT-eun6fmbBA

Body (raw)

{
	"name": "Henna",
	"price": "250",
	"category": "Herbal",
	"quantity": 1,
	"userId": "[email protected]",
	"id": "1"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Cart update

Method: POST

http://localhost:8080/api/v1/cart/update

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NTkwNjMwMywiZXhwIjoxNjU1OTkyNzAzfQ.m2_aNRd3K_5zOkdl98yj5ZmYKkl76sxNT-eun6fmbBA

Body (raw)

{
	"id": "62aec60a9518dc5197404c39"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Cart remove

Method: POST

http://localhost:8080/api/v1/cart/delete

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NTkwNjMwMywiZXhwIjoxNjU1OTkyNzAzfQ.m2_aNRd3K_5zOkdl98yj5ZmYK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 ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Cart remove

Method: POST

http://localhost:8080/api/v1/cart/remove

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NTkwNzE4MSwiZXhwIjoxNjU1OTkzNTgxfQ.jH-BFiwPDlBxbyEVd9seorFunp2-_rF2aSFC9Qq1lgk

Body (raw)

{
	"id": "62b320a50521d6f236d809fa"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Payment verify

Method: POST

http://localhost:8080/api/v1/payment/verify

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NjA2ODM5MSwiZXhwIjoxNjU2MTU0NzkxfQ.VAy-XS9AcP5xNh4Wi4LhfjLpy0-VuCiBJX1Mc8saFLg

Body (raw)

{
	"razorpay_order_id": "order_JlbstvXZZJCiLI",
	"razorpay_payment_id": "pay_JlbtK1nfACKN9Z",
	"razorpay_signature": "a94fadc9fde88d9ccf3aa5766f7cf2b4808c287d53a6401f830ea1aace56337d"
}

πŸ”‘ Authentication basic

Param value Type

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Payment create

Method: POST

http://localhost:8080/api/v1/payment/create

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NjA2ODM5MSwiZXhwIjoxNjU2MTU0NzkxfQ.VAy-XS9AcP5xNh4Wi4LhfjLpy0-VuCiBJX1Mc8saFLg

Body (raw)

{
	"amount": "500",
	"currency": "INR",
	"receipt": "receipt_bhumija_1"
}

πŸ”‘ Authentication basic

Param value Type

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Order create

Method: POST

http://localhost:8080/api/v1/order/create

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NjE2NjE5NCwiZXhwIjoxNjU2MjUyNTk0fQ.j-qTr12FHcJFQPW_gJFgXFxawy3LAwcwEo2ckjydWsU

Body (raw)

{
	"name": "Henna",
	"price": "250",
	"category": "Herbal",
	"quantity": 1,
	"userId": "[email protected]",
	"productId": "1",
	"user": "Ayush Rathore",
	"phone": "9413503230",
	"address": {
		"house": "1",
		"street": "Durga Colony",
		"city": "Jodhpur",
		"state": "Rajasthan",
		"pincode": "342001"
	},
	"orderId": "62b71740814034c3f953008e"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Order get

Method: POST

http://localhost:8080/api/v1/order/get

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NjE2NjE5NCwiZXhwIjoxNjU2MjUyNTk0fQ.j-qTr12FHcJFQPW_gJFgXFxawy3LAwcwEo2ckjydWsU

Body (raw)

{
	"userId": "[email protected]"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Order cancel

Method: POST

http://localhost:8080/api/v1/order/cancel

Headers

     |
Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyYjFhMDk2YzA5MTdlZTEzYWZhOWQ5OSIsImZpcnN0TmFtZSI6IkF5dXNoIiwibGFzdE5hbWUiOiJSYXRob3JlIiwiZW1haWwiOiJoZXlmcmVha2VyQGdtYWlsLmNvbSIsInBob25lIjoiOTQxMzUwMzIzMCIsImlhdCI6MTY1NjE2NjE5NCwiZXhwIjoxNjU2MjUyNTk0fQ.j-qTr12FHcJFQPW_gJFgXFxawy3LAwcwEo2ckjydWsU

Body (raw)

{
	"orderId": "62b71740814034c3f953008e"
}

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

End-point: Check auth

Method: POST

http://localhost:8080/api/v1/auth

Headers

Content-Type Value
access-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhleWZyZWFrZXJAZ21haWwuY29tIiwiaWQiOiI2MmJmMTYwMjk0OWQ0ZDJmMjc1YmFkYmMiLCJjb2xsZWN0aW9uIjoidXNlcnMiLCJpYXQiOjE2NTY4NTgxNTUsImV4cCI6MTY1NzQ2Mjk1NX0.waeGCtbjl4W3tM5pHdIGygj9LnSEpeh0i0taN_6iYl4

Field Type
_id ObjectId
firstName String
lastName String
email String
phone String
address addressSchema
password String
createdAt Date
updatedAt Date
deletedAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
name String
email String
password String
createdAt Date
updatedAt Date
deletedAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
name String
email String
phone String
createdAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
house String
street String
city String
state String
pincode String

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
title String
content String
image String
mimeType String
description String
category String
tags [String]
author userSchema
createdAt Date
updatedAt Date
deletedAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
name String
price Number
image String
description String
category String
mimeType String
tags [String]
quantity Number
createdAt Date
updatedAt Date
deletedAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
id String
productId String
name String
price Number
image String
category String
quantity Number
userId String
createdAt Date

⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃

Field Type
_id ObjectId
productId String
name String
amount Number
image String
category Date
quantity Number
user userSchema
status String
status Date
deliveredOn Date
createdAt Date

Authors


License

MIT


Credits

  • @aaaravv for contributing to the docs.

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.