-
Notifications
You must be signed in to change notification settings - Fork 0
User
Jaah edited this page Aug 30, 2020
·
25 revisions
Methods | Params | Description |
---|---|---|
getUserInfo |
-- | Return user information |
getOrderHistory |
-- | Get order history of a user |
getOrderDetail |
id:<order_id> | Get order detail of an order of a user |
setUserInfo |
name*, email*, birthday, anniversary, gender} | Update user information |
saveUserAddress |
tag*, sub_locality*, lat* , lng*, address_1*, address_2, pin} | Save address of a user |
changePassword |
oldPassword, newPassword, confirmPassword, phone | Change current password |
deleteAddress |
id | Delete address from user profile |
getWalletTransactions |
-- | get all wallet transactions |
getWalletTransactions |
-- | get all wallet transactions |
getNotifications |
-- | Get all notifications |
getCoupons |
-- | Get all coupons |
reorder |
id, location_id, lat, lng | Reorder |
Note:
- (*) required
- All methods return a promise.
- This will throw an error if the user is not logged in.
.getUserInfo()
Sample response:
{
success: true,
data: {
"addresses": [],
"balance": 0,
"email": "",
"name": "Mukesh Biswas",
"phone": "+919833010430",
"points": 0,
"signup_date": 1542102597000,
"total_order_value": 0
}
}
Here, balance
is the amount that the user has in their Wallet.
setUserInfo(params)
This will update the user information. The following information can be updated:
- Name
- Birthday
- Anniversary,
- Gender
Obj structure:
{
name: <String>,
email: <String>,
birthday: <Time in milli sec>,
anniversary: <Time in milli sec>,
gender: <String>,
}
.getOrderHistory
.changePassword()
Params:
{
oldPassword: <oldPassword>,
newPassword: <newPassword>,
confirmPassword: <newPassword>,
phone: <signed in phoneno>
}
.deleteAddress({id})