Ms.users

Stores the information about customer and admin users.
Customer objects allow you to perform recurring charges and track multiple charges that are associated with the same customer. The API allows you to create, delete, and update your customers. You can retrieve individual customers as well as a list of all your customers.

Fields

first_name
Type: string

Read Only: No

Required: No
{ "first_name" : "test name" }

First name of user.
last_name
Type: string

Read Only: No

Required: No
{ "last_name" : "kumar" }

Last name of user
email
Type: string

Read Only: No

Required: Yes
{ "email" : "test@manusis.com" }

Email address associated with user account
Password
Type: string

Read Only: No

Required: Yes
{ "password" : "***********************" }

Password of user in encrypted form.
Image
Type: file

Read Only: No

Required: No
{ "images" : "http://example.com/burton.jpg" }

Image field contains the url of image of user.
Dob
Type: datetime

Read Only: No

Required: No
{ "dob" : "232131231" }

Date of birth of user.
Phone
Type: string

Read Only: No

Required: No
{ "phone" : "1234567890" }

Phone number of user.
 
Add_user POST /api/1/entity/ms.users

This method helps to add user.

Example

User Add Example
POST

Example Request Json

{
 "first_name": "test",
 "last_name": "test1",
 "email": "test@gmail.com", 
 "password" : "testing",
 "phone": '9876543210',
 "dob": '641779200000',
 "account": [],
 "customer_group": ["abc-2"],
 "active": '1',
 "verified": '1'
 }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

messages: [ { level: 'success', key: 'ms.entity.users.add' } ] }

Message

CodeMessage
ms.entity.users.add

Query Parameters

CodeMessage
entityNameThe entity in which you want to add.
data(request)The required details to add a user.
_idUnique ID of the user that is added.
Update PUT /api/1/entity/ms.users/{#_id}

This method helps to update user details.

Example

User update Example
PUT

Example Request Json

{
   "first_name" : "Amit",
    "last_name" : "Yadav",
    "phone" :  1234567890
}

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :&nbsp;</span>

Example Response Json

{ 
    data: 'updated successfully',
    messages: [
        { key: 'ms.entity.users.edit' }
    ]
}

Message

CodeMessage
ms.entity.users.edit

Query Parameters

CodeMessage
EntityNameThe entity in which you want to update.
data(request)The required details to update a user.
_idUnique ID of the user that is update.
ChangePassword PUT /api/1/entity/ms.users/_/changePassword

This method helps to change user password with given data.

Example

User Change Password Example
PUT

Example Request Json

data: {
     email: user.email,
     current_password: user.password,
     new_password: 'newpassword',
     confirm_password: 'newpassword'
 }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

{  status: 200,
  messages: 
   [ { level: 'success',key: 'ms.entity.users.changePassword', } ] 
}

Message

CodeMessage
ms.entity.users.changePassword

Query Parameters

CodeMessage
entityNameThe name of the entity.
emailThe email Id of the user who want to change password.
current_passwordCurrent password of the user.
new_passwordNew password of the user.
ResetPassword PUT /api/1/entity/ms.users/_/resetPassword

This method helps to reset password with given data

Example

User Reset Password Example
PUT

Example Request Json

data:{
             email:  new_user.email,
             password: '1234'  ,
             verified_text: res.data.verified_text,
             verified_time: res.data.verified_time
            }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

{ status: 200,
  messages: 
   [ { level: 'success', key: 'ms.entity.users.resetPassword', message: 'you have changed your password successfully' } ] }

Message

CodeMessage
ms.entity.users.resetPasswordyou have changed your password successfully

Query Parameters

CodeMessage
entityNameName of the entity.
emailEmail Id of the user.
passwordNew password of the user.
verified_textThe verified text to verify user.
ForgotPassword PUT /api/1/entity/ms.users/_/forgotPassword

This method helps to send mail with password reset link to registered email id when user forgets password with given data.

Example

User Forgot Password Example
PUT

Example Request Json

data:{
             email:user.email
           }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

{ status: 200,
  messages: 
   [ { level: 'success', key: 'ms.entity.users.forgotPassword', message: 'Email has been sent to your email address.' } ] }

Message

CodeMessage
ms.entity.users.forgotPasswordEmail has been sent to your email address.

Query Parameters

CodeMessage
entityNameThe name of the entity.
emailEmail id of the user
AdminLogin POST /admin/entity/ms.users/_/adminLogin

This method helps in admin login with given input.

Example

Message

CodeMessage

Query Parameters

CodeMessage
entityNameThe name of the entity.
emailEmail id of user admin
passwordPassword of user admin
AddToWishlist PUT /admin/entity/ms.users/_/addToWishlist

This method help to add product to user wishlist with given product ID.

Example

addToWishlist Example
PUT

Example Request Json

Product json

{
                        name: '22222',
                        alias: '22222',
                        "images": [],
                        "categories": [],
                        "brand": "brand1",
                        "publish": "1",
                        "price": 1001,
                        "compare_price": 1011,
                        "sku": "1001",
                        "weight": "1511"
                    }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

messages: 
   [ { level: 'success',
       key: 'ms.entity.users.addToWishlist'} ] }

Message

CodeMessage
ms.entity.users.addToWishlist

Query Parameters

CodeMessage
entityNameName of the entity.
_idUnique id of the product the user want to add to wishlist
Logout GET /api/1/entity/ms.users/_/logout

This method helps in user logout with given data.

Example

Logot user Example
GET

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

messages: 
   [ { level: 'success',
       key: 'ms.entity.users.logout',
       message: 'Logout Successful' } ] }

Message

CodeMessage
ms.entity.users.logoutLogout Successful

Query Parameters

CodeMessage
entityNameName of the entity.
isLoggedInStates whether the user is logged in or not.
Mail_verification GET /api/1/entity/ms.users/_/verification?key=552c9d9dbb9f35ec575e1e14

This method helps to send verification mail with given input.

Example

Message

CodeMessage

Query Parameters

CodeMessage
entityNameName of the entity.
emailEmail Id of the user
Verification GET /api/1/entity/ms.users/_/verification

This method helps for user verification with given key.

Example

Message

CodeMessage

Query Parameters

CodeMessage
entityNameName of the entity.
keyUnique Id of the unverified user
Login PUT /api/1/entity/ms.users/_/login

This method helps in user login with given input.

Example

User Login Example
PUT

Example Request Json

data: {
            email: verified_user.email,
            password: verified_user.password
           }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

data: 
   { isLoggedIn: true,
     _id: '56decdfd58a9e1bc3a6206e6',
     first_name: 'test',
     last_name: 'test1',
     email: '1234@gmail.com',
     phone: '9876753476',
     customer_groups: [ 'abc-2' ],
     role: 'member',
     current_role: 'member',
     active: '1',
     verified: '1',
     currency: { name: 'INR', conversion_rate: '1' },
     language: 'EN' },

  messages: 
   [ { level: 'success', key: 'ms.entity.users.login',  message: 'Login Successful' } ] }

Message

CodeMessage
ms.entity.users.loginLogin Successful

Query Parameters

CodeMessage
entityNameName of the entity.
emailEmail id of the user
passwordPassword of the user
isLoggedInStates whether the user is logged in or not.
Register PUT /api/1/entity/ms.users/_/register

This method helps to register user with given data.

Example

User Register Example
PUT

Example Request Json

{
        "first_name": "test",
        "last_name": "test1",
        "email": "12134@gmail.com",
        "password": "testing",
        "active": '1',
        "phone": '9876753476',
        "dob": 641779200000,
        "account": [],
        "customer_groups": ["abc-2"],
        "verified": '1'
    }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

data: 
   { isLoggedIn: true,
     _id: '56decdfd58a9e1bc3a6206e6',
     first_name: 'test',
     last_name: 'test1',
     email: '12134@gmail.com',
     phone: '9876753476',
     customer_groups: [ 'abc-2' ],
     role: 'member',
     current_role: 'member',
     active: '1',
     verified: '1' },

  messages: 
   [ { level: 'success', key: 'ms.entity.users.register' ,message: 'You have registered Successfully' } ] }

Message

CodeMessage
ms.entity.users.registerYou have registered Successfully

Query Parameters

CodeMessage
entityNameName of the entity.
first_nameFirst name of the new user.
emailEmail Id of the new user
passwordPassword of the new user
isLoggedInStates whether the user is logged in or not.
Delete GET /api/1/entity/ms.users/_/:id

This method helps to delete a user with given resourceId

Example

User delete Example
GET

Example Response

Response to request will be like this :&nbsp;

Example Response Json

data: 'updated successfully',
  messages: 
   [ { level: 'success',
       key: 'ms.entity.users.delete' } ] }

Message

CodeMessage
ms.entity.users.delete

Query Parameters

CodeMessage
entityNameName of the entity
resourceIdUnique user Id of user that needs to be deleted
IsUserLoggedIn GET /api/1/entity/ms.users/_/isUserLoggedIn

This method helps to check whether the user have logged in.

Example

Message

CodeMessage

Query Parameters

CodeMessage
entityNameThe name of the entity.
isLoggedInStates whether the user is logged in or not.
RemoveFromWishlist PUT /entity/ms.users/_/removeFromWishlist

This method helps in removing product from user wishlist.

Example

removeFromWishlist Example
PUT

Example Request Json

Product json:-


{   name: '22222',
        alias: '22222',
          "images": [],
          "categories": [],
                "brand": "brand1",
                    "publish": "1",
                        "price": 1001,
                        "compare_price": 1011,
                        "sku": "1001",
                        "weight": "1511"
                    }

Example Response

<span style="line-height: 20.8px;">Response to request will be like this :</span>

Example Response Json

messages: 
   [ { level: 'success',
       key: 'ms.entity.users.removeToWishlist'} ] }

Message

CodeMessage
ms.entity.users.removeToWishlist

Query Parameters

CodeMessage
entityNameThe name of the entity you want to update
_idUnique user ID.
item_idUnique ID of the product you want to remove from wishlist