Admin to create single user for an organisation

This api is for Admin to create single user for an organisation


REST


Headers

FieldsTypeDescriptionExampleO/MData Management
URLstring/v1/employeesM
METHODstringPOSTM
content-typestringJSONapplication/jsonM
x-access-tokenstringSession token with validitytokenM

Request

{
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "9891055604",
            "employee_id":"843778",
            "password":"password",
            "company":"company_id",
            "isVerified":true,
            "entityId":"old_entity_id",
            "isCompanyAdmin":true
 }


Success

{
           "_id": "54da47cfefa0c9420757e0e4",
           "__v": 0,
            "first_name":"abc",
            "last_name":"xyz",
            "gender": "male",
            "email": "employee@test.com",
            "mobile": "+919891055604",
            "employee_id":"843778",
            "company":"12da47cfe33442420757e0e4",
            "isCompanyAdmin" : true
}


Error



"mobile" - it is the responsibility of the client to always send country code with the mobile number, server will not perform any checks "company" : id of the company to be associated with this employee