Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views3 pages

FoowearHub API

Uploaded by

dhvaninakum2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

FoowearHub API

Uploaded by

dhvaninakum2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Project Name : FootwearHub

shoes, footwear, and sandals for men, women, and children. The platform offers a seamless
shopping experience with user-friendly navigation, detailed product descriptions, secure payment
User Module

Serial no. API Name Request Parameter Response Data Description HTTP Method
firstName,
{
lastName,
"responseCode": 200,
email,
"responseMessage": "User registered successfully", Check the validation
password,
"responseData": { Make the object of the user detail
1 signUp mobileNumber, POST
"_id": "mongoose ID of the new user" Check the existance of email
dateOfBirth,
} Save the user data to user collection
gender
}
email, Check email exist in user collection
"responseData": {
2 login password, "user":"JWT
[list],token for authentication" Compare the password enter in request body and exist in user collection POST
page (number), "token": Ensure pagination
3 listUser "page": number, "Success",
"responseMessage": Generate the tokenparameters are valid GET
perPage (number) Return ifusers
Verify and total
the userId count
exists
4 detailUser id => (mongoose ID of the user) "perPage": number,
"responseData": { GET
Fetch the user detail by ID
id => (mongoose ID of the user) "userInfo": { detail }
firstName, {
lastName, "responseCode": 200, Check the validation
email, "responseMessage": "Profile updated successfully", Authenticated user can update their profile
5 updateProfile password, "responseData": { Chek param id is not equal to then response user not found PUT
mobileNumber, "_id": "mongoose ID of the updated user" Return a success message with updated user Id in the response body
dateOfBirth, }
gender }

{
"responseCode": 200,
id => (mongoose ID of the user) Ensure the user ID exists
6 deleteProfile "responseMessage": "Profile deleted successfully" DELETE
Authenticated the user to delete their profile
}

Product Module

Serial no. API Name Request Parameter Response Data Description HTTP Method
name,
brandId: mongoose ID of the brand,
{
categoryId: mongoose ID of the category,
"responseCode": 200,
price,
"responseMessage": "Product created successfully", Check the validation
description
1 addProduct "responseData": { Ensure brandId and categoryId exist and are valid POST
image,
"_id": "mongoose ID of the new product" Save the product data to product collection
size,
}
color,
}
stock
"product": [list],
page (number), Ensure pagination parameters are valid
2 listProduct "page": number, "Success",
"responseMessage": GET
perPage (number) Return ifproducts
Verify and total
the product count
ID exists
3 detailProduct id => (mongoose ID of the product) "perPage": number,
"responseData": { GET
Ensure the user has authorization to view product details
id => (mongoose ID of the product) "productInfo": { detail }
name,
{
brandId: mongoose ID of the brand,
"responseCode": 200,
categoryId: mongoose ID of the category, Check the validation
"responseMessage": "Product updated successfully",
price, Ensure the product ID exists
"responseData": {
4 updateProduct description, Return a success message with updated product Id in the response body PUT
"_id": "mongoose ID of the updated product"
image,
}
size,
}
color,
stock
Ensure the product ID exists
"responseCode": 200,
5 deleteProduct id => (mongoose ID of the product) Authenticated the user to delete the product DELETE
"responseMessage": "Product deleted successfully"

Category Module
Serial no. API Name Request Parameter Response
"responseMessage": "Category Datasuccessfully",
added Description HTTP Method
name, Validate required fields such as name and description
1 addCategory "responseData": {
"category": [list], POST
description
page (number), Check ifpagination
Ensure the category name already
parameters exists to prevent duplicates
are valid
2 listCategory "_id": "mongoose
"page": number,ID"Success",
"responseMessage": of the new category" Verify GET
perPage (number) Return ifcategory
the categoryId
and totalexists
count
3 detailCategory id => (mongoose ID of the category) "perPage": number,
"responseData": { Ensure the user has authorization
Ensure the category ID exists to view category details GET
"responseData": { { detail }
"categoryInfo":
4 updateCategory name, "responseCode": 200, Return a success message with updated category Id in the response body PUT
"_id": "mongoose ID of the updated category" Ensure the category ID exists
5 deleteCategory description
id => (mongoose ID of the category) "responseMessage": "Category deleted successfully" DELETE
Authenticated the user to delete category
}
Brand Module

Serial no. API Name name, Request Parameter Response Data Description HTTP Method
"responseData": { Validate required fields such as name, description, and logo
1 addBrand description, "brand": [list], ID of the new brand" POST
page (number), "_id": "mongoose Check ifpagination
Ensure the brand parameters
name already
areexists
valid to prevent duplicates
2 listBrand logo "page": number, "Success",
"responseMessage": Verify GET
perPage (number) Return ifbrand
the brand ID exists
and total count
3 detailBrand id => (mongoose ID of the brand) "perPage": number,
"responseData":
"responseMessage": { "Brand updated successfully", Ensure the
Ensure the brand
user has
IDauthorization
exists to view brand details GET
name, "brandInfo": {{200,
detail }
4 updateBrand "responseData":
"responseCode": Return a success message with updated brand Id in the response body PUT
description, Ensure the brand ID exists
5 deleteBrand id => (mongoose ID of the brand) "_id": "mongoose ID
"responseMessage": of thedeleted
"Brand updatedsuccessfully"
brand" DELETE
Authenticated the user to delete brands
}
Order Module

Serial no. API Name Request Parameter


productId: mongoose ID of the product, Response Data Description HTTP Method
"responseData": { Ensure the userId, productId, and addressId exist in your database.
1 placeNewOrder quantity, POST
page "_id": "mongoose ID of the new order" Calculate and validate totalAmount
2 listOrder price (number), "page": number,
"responseMessage": "Success",
Ensure pagination parameters are valid
GET
perPage (number) "perPage": number, Retrieve
Verify if orders basedexists
the orderId on user authorization
3 detailOrder id => (mongoose ID of the order) "responseData": { GET
productId: mongoose ID of the product, "responseData": Ensure the
the order
user has
ID authorization to view the order details.
4 updateOrder "orderInfo": {{200,
"responseCode": detail } Ensure exists.
PUT
quantity, "_id": "mongoose ID of the updated order" Return athe
Ensure success message
order ID exists with updated order Id in the response body
5 deleteOrder id => (mongoose ID of the order) "responseMessage": "Order deleted successfully" DELETE
Authenticated the user to delete orders
}
Wishlist Module

Serial no. API Name Request Parameter Response


"responseMessage": "Product Data
added to wishlist successfully", Description HTTP Method
userId: mongoose ID of the user, Validate required fields such as userId and productId
1 addToWishlist "responseData": { POST
productId: mongoose
page (number), ID of the product, "page": number,ID of the new wishlist item" Check
Ensure pagination parameters are the
if the product is already in user's wishlist to prevent duplicates
valid
2 listWishlist "_id": "mongoose
"responseCode": 200, GET
perPage (number) "perPage": number, Retrieve
Ensure theand return item
wishlist wishlist items based on the user's ID
ID exists
3 removeWishlist Id => (mongoose ID of the wishlist item) "responseMessage": "Product removed from wishlist successfully" DELETE
Authenticated the user to remove items from their wishlist
}
Review Module

Serial no. API Name Request Parameter Response Data Description HTTP Method
productId: mongoose ID of the product, "responseData": { Validate required fields such as userId, productId, rating, and comment.
1 addReview Ensure POST
rating,(number),
page "_id": "mongoose
"page": number,ID of the new review" Ensure pagination
the user andparameters areexist
product IDs validin your database.
2 listReview "responseMessage": "Success", Retrieve and return reviews based on the product ID GET
perPage (number) "perPage": number, Verify if the review ID exists
3 detailReview Id
Id => (mongoose ID
=> (mongoose ID of
of the
the review)
review) "responseData": { Ensure GET
"responseData": { Ensure the
the review
user hasID exists
authorization to view the review details.
4 updateReview rating, "reviewInfo":200,
"responseCode": { detail } Return a success message with updated review Id in the response body PUT
"_id": "mongoose ID of the updated review" Ensure the review ID exists
5 deleteReview comment
Id => (mongoose ID of the review) "responseMessage": "Review deleted successfully" DELETE
Authenticated the user to delete reviews
}
Coupon Module

Serial no. API Name amount, Request Parameter Response Data Check the validation Description HTTP Method
"responseData": {
1 addCoupon expiryDate, Ensure pagination
Ensure no duplicateparameters
coupon codes are added
are valid POST
page (number), "_id": "mongoose
"page": number, ID of the new coupon"
2 listCoupon maxUses, "responseMessage": "Success", Ensure
Retrievethe expiry
and returndate is in the
coupons future
based on the product ID GET
perPage (number) "perPage": number, Verify if the coupon ID exists
3 detailCoupon Id => (mongoose ID of the coupon) "responseData": { "Coupon updated successfully",
"responseMessage": GET
amount, Ensure the
Ensure the coupon
user hasIDauthorization
exists to view the coupon details.
4 updateCoupon "couponInfo":{200,
"responseData":
"responseCode": { detail } PUT
expiryDate, Return athe
Ensure success
couponmessage with updated coupon Id in the response body
ID exists
5 deleteCoupon Id => (mongoose ID of the coupon) "_id": "mongoose ID
"responseMessage": of the updated
"Coupon deleted coupon"
successfully" DELETE
Authenticated the user to delete coupons
}
UserAddress Module

Serial no. API Name street, Request Parameter Response


"responseMessage": "User addressData
added successfully", Description HTTP Method
Check the validation
1 addUserAddress city, "responseData": { POST
page Ensure the user ID exists in your database
2 listUserAddress state, (number), "page":
"_id": number,ID of the new user address"
"mongoose
"responseMessage": "Success",
Ensure pagination parameters are valid
GET
perPage (number) "perPage": number, Retrieve
Verify if and return
the user addresses
address based on the user ID
ID exists
3 detailUserAddress Id => (mongoose ID of the user address) "responseData": { "User address updated successfully",
"responseMessage": Ensure GET
city, Ensure the
the user
user address ID exists to view the address details.
has authorization
4 updateUserAddress "addressInfo":
"responseData": { { detail } Return a success message with updated userAddress Id in the response body PUT
state,
"_id": "mongoose ID of the updated user address"
"responseCode": 200,
Ensure the user address ID exists
5 deleteUserAddress Id => (mongoose ID of the user address) "responseMessage": "User address deleted successfully" DELETE
Authenticated the user to delete addresse
}
Shipping Module

Serial no. API Name Request Parameter


trackingNumber, Response Data Description HTTP Method
"responseData": { Check the validation
1 addShippingDetail status, POST
page (number), "_id": "mongoose
"page": number,ID of the new shipping detail" Ensure pagination
Ensure the order IDparameters
exists in your database
are valid
2 listShippingDetail estimatedDelivery "responseMessage": "Success", GET
perPage (number) "perPage": number, Retrieve
Verify if and return shipping
the shipping details
detail ID existsbased on the order ID
3 detailShipping Id => (mongoose ID of the shipping detail) "responseData": { GET
status, "responseData": { Ensure the
Ensure the shipping
user has authorization to view the shipping details.
detail ID exists
4 updateShippingDetail "shippingInfo":
"responseCode": { detail }
200, PUT
estimatedDelivery "_id": "mongoose ID of the updated shipping detail" Return
Ensure athe
success message
shipping detail with updated shipping Id in the response body
ID exists
5 deleteShippingDetail Id => (mongoose ID of the shipping detail) "responseMessage": "Shipping detail deleted successfully" DELETE
Authenticated the user to delete shipping details
}

You might also like