Consumer
API LINK: https://consumerapi.docs.apiary.io/#
List of all routes:
Register
- POST https://nite-apigateway.herokuapp.com/users/consumer - Create consumer profile
req.body = { name: String, email: String, password: String, birth: Date, phone: String }
Login
- POST https://nite-apigateway.herokuapp.com/users/consumer/login - Consumer login
req.body = { email: String, password: String }
Update Password
- POST https://nite-apigateway.herokuapp.com/users/consumer/resetPassword - Consumer update password
headers: { Authorization: `Bearer ${token}` }
req.body = {
password: String
}
Update info
- PUT https://nite-apigateway.herokuapp.com/users/consumer - Consumer update own info
headers: { Authorization: `Bearer ${token}` }
req.body = {
name: String,
email: String,
phone: String,
birth: Date
}
Update Password
- PUT https://nite-apigateway.herokuapp.com/users/consumer/password - Update consumer password.
headers: { Authorization: `Bearer ${token}` }
req.body = {
oldPassword: String,
newPassword: String
}
Reset Password
- GET https://nite-apigateway.herokuapp.com/users/consumer/sendMail?email= - Ask email to resetPassword
Email in req.query
.
List all consumers
- GET https://nite-apigateway.herokuapp.com/users/consumer - List all consumers
headers: { Authorization: `Bearer ${token}` }
Get Historic
- GET https://nite-apigateway.herokuapp.com/users/consumer/historic - Get own historic
headers: { Authorization: `Bearer ${token}` }