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

Code Message
ms.entity.users.add

Query Parameters

Code Message
entityName The entity in which you want to add.
data(request) The required details to add a user.
_id Unique 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

Code Message
ms.entity.users.edit

Query Parameters

Code Message
EntityName The entity in which you want to update.
data(request) The required details to update a user.
_id Unique 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

Code Message
ms.entity.users.changePassword

Query Parameters

Code Message
entityName The name of the entity.
email The email Id of the user who want to change password.
current_password Current password of the user.
new_password New 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

Code Message
ms.entity.users.resetPassword you have changed your password successfully

Query Parameters

Code Message
entityName Name of the entity.
email Email Id of the user.
password New password of the user.
verified_text The 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

Code Message
ms.entity.users.forgotPassword Email has been sent to your email address.

Query Parameters

Code Message
entityName The name of the entity.
email Email id of the user
AdminLogin POST /admin/entity/ms.users/_/adminLogin

This method helps in admin login with given input.

Example

Message

Code Message

Query Parameters

Code Message
entityName The name of the entity.
email Email id of user admin
password Password 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

Code Message
ms.entity.users.addToWishlist

Query Parameters

Code Message
entityName Name of the entity.
_id Unique 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

Code Message
ms.entity.users.logout Logout Successful

Query Parameters

Code Message
entityName Name of the entity.
isLoggedIn States 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

Code Message

Query Parameters

Code Message
entityName Name of the entity.
email Email Id of the user
Verification GET /api/1/entity/ms.users/_/verification

This method helps for user verification with given key.

Example

Message

Code Message

Query Parameters

Code Message
entityName Name of the entity.
key Unique 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

Code Message
ms.entity.users.login Login Successful

Query Parameters

Code Message
entityName Name of the entity.
email Email id of the user
password Password of the user
isLoggedIn States 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

Code Message
ms.entity.users.register You have registered Successfully

Query Parameters

Code Message
entityName Name of the entity.
first_name First name of the new user.
email Email Id of the new user
password Password of the new user
isLoggedIn States 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

Code Message
ms.entity.users.delete

Query Parameters

Code Message
entityName Name of the entity
resourceId Unique 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

Code Message

Query Parameters

Code Message
entityName The name of the entity.
isLoggedIn States 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

Code Message
ms.entity.users.removeToWishlist

Query Parameters

Code Message
entityName The name of the entity you want to update
_id Unique user ID.
item_id Unique ID of the product you want to remove from wishlist