FoowearHub API
FoowearHub API
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 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