Admin to create single user for an organisation
This api is for Admin to create single user for an organisation
REST
Headers
Fields | Type | Description | Example | O/M | Data Management |
---|---|---|---|---|---|
URL | string | /v1/employees | M | ||
METHOD | string | POST | M | ||
content-type | string | JSON | application/json | M | |
x-access-token | string | Session token with validity | token | M |
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