Server is running ...

Created by @Arun-ez

API References

Products

GET /api/products

Get all Products

GET /api/products?category=eyes

Filter based on category

GET /api/products?category=eyes&filter=liner%kajal

Get Products by their subcategory

GET /api/products?category=lips&sort=asc

Sort Products by Price Ascending(asc) or Decending(dsc)

GET /api/products?category=eyes&filter=liner%kajal

Retrieving the wishlist status for the result ( pass the user auth token in the Authorization Header as bearer token )

GET /api/products/search?q=${query}

Search Products

GET /api/products/Search?q=${query}&sort=asc/dsc&filter=liner%matte

Sort and filter Search Results

GET /api/products/id

Get product by id

Account and Authorization

POST /api/account/register

Register new account

POST /api/account/login

Login to an account

POST /api/account/token

Login to an account by token ( required authorization header with bearer token )

POST /api/account/exist

Check a user exist or not

POST /api/otp/send

Send an otp to an Email ( required fields in request body { email } )

POST /api/otp/verify

Verify an otp ( required fields in request body { email, otp, hashkey } )

Cart

POST /api/cart

Post a Product to cart data of a user ( required authorization header with bearer token )

GET /api/cart

Get All cart data of a user ( required authorization header with bearer token )

PATCH /api/cart/${Id}

Patch a single Product from cart data of a user ( required authorization header with bearer token )

DELETE /api/cart/${Id}

Delete a single Product from cart data of a user ( required authorization header with bearer token )

DELETE /api/cart/clear/all

Erase all cart data of a user ( required authorization header with bearer token )

Wishlist

POST /api/wishlist

Post a Product to wishlist ( required authorization header with bearer token )

GET /api/wishlist

Get All wishlist data of a user ( required authorization header with bearer token )

DELETE /api/wishlist/${Id}

Delete single Product from wishlist data ( required authorization header with bearer token )

DELETE /api/wishlist/exist/${id}

Check a product exist in wishlist or not ( required authorization header with bearer token )

Address

POST /api/address

Post address data of a user ( required authorization header with bearer token, required fields in request body {name, number, flatno, locality, pincode, city, state} )

GET /api/address

Get All address data of a user ( required authorization header with bearer token )

PATCH /api/address/${Id}

Patch a single address from address data ( required authorization header with bearer token )

DELETE /api/address/${Id}

Delete a single address from address data ( required authorization header with bearer token )

Order

POST /api/order

Create a order (required fields in request body {orderId,amount, created, delivery, status, products}, required authorization header with bearer token )

GET /api/order

Get All Orders data of a user ( required authorization header with bearer token )

Payment

POST /api/payment/create

Create a new Payment (required fields in request body {amount} )

POST /api/payment/verify

Verify Payment signature ( required fields in request body { razorpay_order_id, razorpay_payment_id, razorpay_signature } )