Import this Postman collection into Postman to understand the endpoints and their functionalities.
barber shop.postman_collection.json
This backend API is designed to support various functionalities for a Barber Shop application. It utilizes Express.js for routing and MongoDB for data storage. Key features include user authentication, product management, booking handling, payment processing, and more.
Base URL: <http://localhost:5000>
Registers a new user with email and password.
Example Request:
{
"email": "[email protected]",
"pass": "123456"
}
Returns 400 if email already exists.
Returns status of user registration.
Logs in a user with email and password.
Example Request:
{
"email": "[email protected]",
"password": "123456"
}
Returns a JWT token stored in a cookie upon successful login.
Handles user authentication with bcrypt for password comparison.
Retrieves services based on category name.
Example Request:
GET /serviceName?category=<category_name>
Returns service details for the specified category.
Retrieves available booking slots for a specific date and barber.
Example Request:
GET /slots?date=<date>&barberName=<barber_name>
Returns bookings for the specified barber and date.