Skip to content

API Endpoints

Sam Handelsman edited this page Oct 16, 2023 · 1 revision

API Endpoints

Method URL Description
POST /api/auth/login Logs in user, Receive body containing credential & password
POST /api/auth/signup Signs up user, Receive body containing username, email, password & address
GET /api/auth/logout Logs out user
GET /api/users Fetches all users
GET /api/users/:userId Fetches single user
GET /api/products?= Fetches all products, takes optional query string
GET /api/products/:productId Fetches single product
POST /api/products/new Creates new product
PUT /api/products/:productId Updates product
DELETE /api/products/:productId Deletes product
GET /api/cart Fetches user cart
POST /api/products/:productId/cart Adds product to user cart
DELETE /api/carts/:productId Removes product from cart
PUT /api/carts Updates quantity of product in cart

Clone this wiki locally