This project is a backend API that's used to managed a person resource.
baseURL = https://jaguars-food-backend.vercel.app/
Endpoint | Method | Headers | Data | Description |
---|---|---|---|---|
/api/v1/auth/user/sugnup | POST | first_name, last_name, email, passwrod, phone_number, organization_name, lunch_price, currency and currency_code | user signup as admin, creates organization simultaneously | |
/api/v1/auth/organization/invite | POST | Authorization: Bearer <auth-token> |
send invite to user | |
/api/v1/auth/organization/staff/sugnup | POST | first_name, last_name, email, passwrod, phone_number, and otp_token | user signup using invitation token | |
/api/v1/auth/login | POST | email and password | Login to user account | |
/api/v1/user/profile | GET | Authorization: Bearer <auth-token> |
retrieve a user's details | |
/api/v1/user/profile | PUT | Authorization: Bearer <auth-token> |
update atleast one of user's first_name, last_name or password | |
/api/v1/user/bank | PATCH | Authorization: Bearer <auth-token> |
bankName, bankNumber, bankRegion and bankCode | Update user's bank details |
/api/v1/users | GET | Authorization: Bearer <auth-token> |
get all users in your organization | |
/api/v1/search/{nameoremail} | GET | Authorization: Bearer <auth-token> |
Search for users by name or email | |
/api/v1/auth/forgot-password | POST | request for password reset OTP | ||
/api/v1/auth/resend-otp | POST | request for password reset OTP | ||
/api/v1/auth/reset-password | POST | email, password and otp_token | update user password | |
/api/v1/lunch/send | POST | Authorization: Bearer <auth-token> |
receiverId, seb=nderId and quantity | send lunch to user |
/api/v1/lunch/:id | GET | Authorization: Bearer <auth-token> |
get details of lunch by id | |
/api/v1/withdrawal/request | POST | Authorization: Bearer <auth-token> |
withdraw lunch credit |
Use this endpoint to request for password reset otp code
make a post
request to /api/v1/auth/forgot-passord
{
"email": "[email protected]"
}
{
"message": "OTP sent to user email"
}
Use this endpoint to request for password reset otp code
make a post
request to /api/v1/auth/resend-passord
{
"email": "[email protected]"
}
{
"message": "OTP sent to user email"
}
Use this endpoint to request for password reset otp code
make a post
request to /ap-/v1/auth/reset-passord
{
"email": "[email protected]",
"password": "1Password",
"otp_token": "123456"
}
{
"message": "password updated successfully"
}