Users

(ms.users)

It allows you to perform recurring charges and track multiple charges that are associated with the same user.



Fields

ValueDescription
first_name   
Type: string
First name of the user.
Dennis
last_name   
Type: string
Last name of the user.
Richie
email   
Type: string
Required
Email address of the user.
dennis.richie@gmail.com
password   
Type: string
Password of user in encrypted form.
************
created_on   
Type: datetime
Date and time of addition of the user.
2014-08-26T12:09:05.008Z
use_temporary_password   
Type: string
Enable the field, if you want to enable automatic generation of temporary password when you add a new user.
0
image   
Type: file
Image of the user is uploaded here.
http://example.com/burton.jpg
dob   
Type: date
The date of birth of the user.
04/23/1990
phone   
Type: string
Contact number of the user.
8895656388
gender   
Type: string
Gender of the user.
Female
active   
Type: string
Enable the flag, if the user is active. It is checked by default but if the user is inactive, you can disable it.
1
orders   
Type: relation
customer_groups   
Type: array
This field holds the names of groups to which a customer belongs.
{
  "customer_groups": ["retailers", "distributors"]
}
phone_verified   
Type: string
Enable this flag, if the phone number of the user is verified.
1
role   
Type: string
Roles are the set of permissions for a specific user.
seller
mobile_otp   
Type: string
client_details   
Type: object
This object contains the detail of system of the user.
device
Type: string
The device of the user.
language
Type: string
The language in which the user is using the store.
substore
Type: string
The substore which is being used by the user.
wallets   
Type: object
StoreCredit
Type: string

Commands (Endpoints)

POST /api/1.1/entity/ms.users   
Creates a new user
DEL /api/1.1/entity/ms.users/{resource_id}   
Deletes a user
PUT /api/1.1/entity/ms.users/{resource_id}   
Updates an existing user
GET /api/1.1/entity/ms.users/_/forgotPasswordPhone   
Resend Otp to verify mobile number
phone

Examples

forgotPasswordPhone

Request
{
    "phone": "+919876543210"
}
Response
{
    "fileBaseUrl": "https://cdn.storehippo.com/s/58934ba3bc87057a5b6ee2bc/",
    "data": {
        "_id": "5de8ecfd57085844c99deaac"
    }
}
GET /api/1.1/entity/ms.users/{resource_id}   
Retrieves a single user
GET /api/1.1/entity/ms.users   
Retrieves a list of users
default_sort
excludeHistory
GET /api/1.1/entity/ms.users/_/login   
loggedIn as a user

Examples

login

Request
{
    "data": {
        "username": "john@storehippo.com",
        "password": "john022@",
        "role": "member"
    }
}
Response
{
    "isBot": false,
    "device": {
        "app_info": null,
        "type": "desktop"
    },
    "storeVariants": {},
    "currency": {
        "name": "USD",
        "conversion_rate": 1,
        "decimal_points": 2,
        "symbol": "$"
    },
    "language": "EN",
    "isLoggedIn": true,
    "_id": "5d81e23701808dd8dfe3201f",
    "first_name": "John",
    "last_name": "Neon",
    "email": "john@storehippo.com",
    "use_temporary_password": "0",
    "phone": "+91987654321",
    "metafields": {},
    "role": "member",
    "current_role": "member",
    "available_roles": [
        "member"
    ],
    "active": "1",
    "verified": "0",
    "phone_verified": "0",
    "cart_id": "5d81e2b7c9422e72b422aabb"
}
GET /api/1.1/entity/ms.users/_/register   
Register a new User

Examples

register

Request
{
    "data": {
        "email": "john@storehippo.com",
        "first_name": "John",
        "last_name": "Neon",
        "password": "john022@",
        "phone": "+91987654321"
    }
}
Response
{
    "isBot": false,
    "device": {
        "app_info": null,
        "type": "desktop"
    },
    "storeVariants": {},
    "currency": "USD",
    "language": "EN",
    "isLoggedIn": true,
    "_id": "5d81e23701808dd8dfe3201f",
    "first_name": "John",
    "email": "john@storehippo.com",
    "use_temporary_password": "0",
    "phone": "+91987654321",
    "metafields": {},
    "role": "member",
    "current_role": "member",
    "active": "1",
    "verified": "0",
    "phone_verified": "0",
    "last_name": "Neon"
}