POST api/V3/Employee/AddHierarchyV2
API to add an Employee in the Company(updates if Employee ERP is present)
Request Information
URI Parameters
None.
Body Parameters
EmployeeHierarchyV2| Name | Description | Type | Additional information |
|---|---|---|---|
| ErpId |
ERP ID of the User |
string |
Required String length: inclusive between 0 and 100 |
| IsDeactive | boolean |
None. |
|
| Name |
User name |
string |
Required String length: inclusive between 0 and 50 |
|
email of user |
string |
Data type: EmailAddress String length: inclusive between 0 and 500 |
|
| UserType |
Type of the fielduser (SR, DSR ,ISR, Supervisor) |
EmployeeType |
Required |
| ParentErpId |
ERP ID of the parent which is to be mapped to the user (manadatory except for userrole global sales manager) |
string |
String length: inclusive between 0 and 100 |
| Mobile |
Contact Number of the user |
string |
String length: inclusive between 0 and 15 |
| HQ |
HeadQuarter of the User |
string |
None. |
| DateOfJoining |
Joining Date of the User in 'YYYY-MM-DD' format |
date |
None. |
| Designation |
Active Designation of the user |
string |
None. |
| IsOrderBookingAllowed |
Bool: True or False, if Order Booking is allowed |
boolean |
None. |
| IsFieldUser |
Bool: True or False, if user is a field user |
boolean |
None. |
| RegionErpId |
Region erp to which the user should get attached to |
string |
None. |
| PositionCodeLevel |
Position Level of User |
PositionCodeNomenclaureWiseLevel |
None. |
| PositionCode |
PositionCode of User |
string |
None. |
| EmployeeAttributeText1 |
Attribute Text 1 of the User |
string |
String length: inclusive between 0 and 50 |
| EmployeeAttributeText2 |
Attribute Text 2 of the User |
string |
String length: inclusive between 0 and 50 |
| EmployeeAttributeBoolean1 |
Attribute Boolean 1 of the User |
boolean |
None. |
| EmployeeAttributeBoolean2 |
Attribute Boolean 2 of the User |
boolean |
None. |
| EmployeeAttributeNumber1 |
Attribute Number 1 of the User |
decimal number |
None. |
| EmployeeAttributeNumber2 |
Attribute Number 2 of the User |
decimal number |
None. |
| EmployeeAttributeDate |
Attribute Date of the User |
date |
None. |
| UserRole |
User Role: Text of the User Roles in the company (Employees, AreaSalesManager, RegionalSalesManager, ZonalSalesManager, NationalSalesManager, GlobalSalesManager |
PortalUserRole |
None. |
Request Formats
application/json, text/json
{
"UserRole": "GlobalAdmin",
"ErpId": "sample string 1",
"IsDeactive": true,
"Name": "sample string 3",
"Email": "sample string 4",
"UserType": "SR",
"ParentErpId": "sample string 5",
"Mobile": "sample string 6",
"HQ": "sample string 7",
"DateOfJoining": "2025-10-19T23:45:11.0688487+00:00",
"Designation": "sample string 8",
"IsOrderBookingAllowed": true,
"IsFieldUser": true,
"RegionErpId": "sample string 9",
"PositionCodeLevel": "L8Position",
"PositionCode": "sample string 10",
"EmployeeAttributeText1": "sample string 11",
"EmployeeAttributeText2": "sample string 12",
"EmployeeAttributeBoolean1": true,
"EmployeeAttributeBoolean2": true,
"EmployeeAttributeNumber1": 1.1,
"EmployeeAttributeNumber2": 1.1,
"EmployeeAttributeDate": "2025-10-19T23:45:11.0688487+00:00"
}
application/xml, text/xml
<EmployeeHierarchyV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.V3"> <DateOfJoining>2025-10-19T23:45:11.0688487+00:00</DateOfJoining> <Designation>sample string 8</Designation> <Email>sample string 4</Email> <EmployeeAttributeBoolean1>true</EmployeeAttributeBoolean1> <EmployeeAttributeBoolean2>true</EmployeeAttributeBoolean2> <EmployeeAttributeDate>2025-10-19T23:45:11.0688487+00:00</EmployeeAttributeDate> <EmployeeAttributeNumber1>1.1</EmployeeAttributeNumber1> <EmployeeAttributeNumber2>1.1</EmployeeAttributeNumber2> <EmployeeAttributeText1>sample string 11</EmployeeAttributeText1> <EmployeeAttributeText2>sample string 12</EmployeeAttributeText2> <ErpId>sample string 1</ErpId> <HQ>sample string 7</HQ> <IsDeactive>true</IsDeactive> <IsFieldUser>true</IsFieldUser> <IsOrderBookingAllowed>true</IsOrderBookingAllowed> <Mobile>sample string 6</Mobile> <Name>sample string 3</Name> <ParentErpId>sample string 5</ParentErpId> <PositionCode>sample string 10</PositionCode> <PositionCodeLevel>L8Position</PositionCodeLevel> <RegionErpId>sample string 9</RegionErpId> <UserRole>GlobalAdmin</UserRole> <UserType>SR</UserType> </EmployeeHierarchyV2>
Response Information
Resource Description
ApiResponseMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| ERPId |
ERPID of the Requested insertion/updation |
string |
None. |
| Message |
Error Message for the indicated ERPID |
string |
None. |
| ResponseStatus |
Status of the action requested from Api |
ResponseStatus |
None. |
| GUID |
GUID of the database Entry with respect to the ERP Id Provided |
string |
None. |
Response Formats
application/json, text/json
{
"ERPId": "sample string 1",
"Message": "sample string 2",
"ResponseStatus": "Failure",
"GUID": "sample string 3"
}
application/xml, text/xml
<ApiResponseMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.Common"> <ERPId>sample string 1</ERPId> <GUID>sample string 3</GUID> <Message>sample string 2</Message> <ResponseStatus>Failure</ResponseStatus> </ApiResponseMessage>