Skip to content

Adds a new employee

Request

Creates a new employee record within the current account context.

Behavior:

  • Associates the employee with the current account
  • Applies validation and business rules before persistence
  • Logs the action as an employee creation event
Body
employeeInfoobject(zLink.Business.zOne.Portfolio.RequestModels.EmployeeDetail)
curl -i -X POST \
  https://demozone.zlinkfm.com/RND/api/v1/portfolio/employees/add \
  -H 'Content-Type: application/json-patch+json' \
  -d '{
    "employeeInfo": {
      "fieldValues": [
        {
          "dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
          "dataFieldValue": "string",
          "dataFieldlabel": "string",
          "dataFieldValueIds": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "fromDate": "string",
          "toDate": "string",
          "dataFieldValueRangeType": "string"
        }
      ],
      "spaceDetails": {
        "buildingId": "string",
        "levelId": "string",
        "locationId": "string",
        "roomId": "string",
        "workSpaceId": "string",
        "isAssigned": true,
        "coordinates": [
          0.1
        ]
      },
      "employeeIds": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "isCreateUser": true,
      "userRoles": [
        "string"
      ]
    }
  }'

Responses

OK

Body
dataobject(zLink.Business.zOne.Portfolio.ResponseModels.EmployeeDetailsResponseModel)
messagestring or null
isErrorboolean
messageCodeinteger, (int32)
statusstring or null
errorTypestring or null
traceidstring or null
responseDescriptionstring or null
Response
{
  "data": {
    "employeeDesignation": {
      "employeeDesignationId": "13c54e83-ccf9-451e-af2b-796d4bf794ad",
      "employeeDesignationName": "string"
    },
    "organizationUnit": {
      "orgUnitLevel1": {
        "levelName": "string",
        "unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
        "unitName": "string"
      },
      "orgUnitLevel2": {
        "levelName": "string",
        "unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
        "unitName": "string"
      },
      "orgUnitLevel3": {
        "levelName": "string",
        "unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
        "unitName": "string"
      },
      "orgUnitLevel4": {
        "levelName": "string",
        "unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
        "unitName": "string"
      },
      "orgUnitLevel5": {
        "levelName": "string",
        "unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
        "unitName": "string"
      },
      "orgUnits": {
        "primaryUnits": "string",
        "secondaryUnits": "string"
      }
    },
    "phoneNumber1": "string",
    "phoneNumber2": "string",
    "gender": {
      "genderId": "75f81325-7c9a-45f2-9383-a04e731a55bd",
      "genderName": "string",
      "genderCode": "string"
    },
    "dateOfBirth": "string",
    "supervisor": {
      "locationInfo": {
        "location": "string",
        "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
        "building": "string",
        "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
        "level": "string",
        "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
        "room": "string",
        "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
        "workspace": "string",
        "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
        "spaceKey": "string",
        "spaceAssignedOn": "string",
        "spaceCategory": {
          "spaceCategoryId": "809d6029-69b4-43c2-a738-11abe5eaf804",
          "spaceCategoryName": "string",
          "spaceCategoryCode": "string"
        },
        "roomFunction": {
          "roomFunctionId": "21215e30-d522-4a6e-b350-1cf0e9b3df3c",
          "roomFunctionName": "string"
        },
        "spaceArea": 0.1,
        "levelPlanHandle": "string",
        "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
        "rollBackInfo": {
          "isRollBack": true,
          "rollBackType": "string",
          "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
          "comments": "string"
        },
        "levelPlanId": "0f5a21ff-233b-4dbc-8296-4521bcd60dc1",
        "planFile": {
          "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
          "fileName": "string",
          "fileSize": "string",
          "currentRevisionNumber": 0,
          "createdOn": "string",
          "fileSizeInBytes": 0,
          "createdDate": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "isLatest": true
        },
        "cadPlanCoordinates": [
          0.1
        ],
        "spaceAssignedOnDateTimeFormat": "string",
        "svgPlanAdded": true
      },
      "employmentType": {
        "employmentTypeId": "65542eea-2c60-4cde-825a-0aeb558a1843",
        "employmentTypeName": "string",
        "employmentTypeCode": "string"
      },
      "employeeCategory": {
        "employeeCategoryId": "ab1bf01c-a488-426a-a6e4-f62994a332c3",
        "employeeCategoryName": "string",
        "employeeCategoryDescription": "string",
        "isLaborCategory": true,
        "responseDescription": "string"
      },
      "supervisor": {},
      "status": {
        "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
        "statusCode": "string",
        "statusName": "string",
        "statusColor": "string"
      },
      "employeeWorkMode": {
        "employeeWorkModeId": "7c18b9a4-d553-4c6e-b8c5-444b8bd5f81c",
        "employeeWorkModeName": "string",
        "employeeWorkModeCode": "string"
      },
      "serviceEndDate": {
        "serviceEndDate": "string",
        "status": {
          "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
          "statusCode": "string",
          "statusName": "string",
          "statusColor": "string"
        }
      },
      "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
      "employeeName": "string",
      "employeeFirstName": "string",
      "employeeMiddleName": "string",
      "employeeLastName": "string",
      "email": "string",
      "employeeCode": "string",
      "employeeRole": "string",
      "profilePic": "string",
      "dateOfTermination": "string",
      "dateOfJoining": "string",
      "employeeUserId": "7705f2cd-52d6-461c-8f23-90ff1b383164",
      "isTechnician": true,
      "isCreateUserAccount": true,
      "userRoles": [
        {
          "accountAccessGroupId": "b7c311f8-ecd3-41e7-b5be-6ffc4403feac",
          "accountAccessGroupName": "string"
        }
      ],
      "isSupervisor": true,
      "isRollBackAllowed": true
    },
    "additionalInfo": [
      {
        "dataField": "string",
        "dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
        "dataIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "dataFieldValue": null,
        "dataFieldName": "string",
        "dataValueFormated": "string"
      }
    ],
    "location": "string",
    "employeeGrade": {
      "employeeGradeId": "74cc643b-8307-4f50-baae-c89fc7d3136c",
      "employeeGradeName": "string",
      "rank": 0
    },
    "responseDescription": "string",
    "locationInfo": {
      "location": "string",
      "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
      "building": "string",
      "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
      "level": "string",
      "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
      "room": "string",
      "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
      "workspace": "string",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
      "spaceKey": "string",
      "spaceAssignedOn": "string",
      "spaceCategory": {
        "spaceCategoryId": "809d6029-69b4-43c2-a738-11abe5eaf804",
        "spaceCategoryName": "string",
        "spaceCategoryCode": "string"
      },
      "roomFunction": {
        "roomFunctionId": "21215e30-d522-4a6e-b350-1cf0e9b3df3c",
        "roomFunctionName": "string"
      },
      "spaceArea": 0.1,
      "levelPlanHandle": "string",
      "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
      "rollBackInfo": {
        "isRollBack": true,
        "rollBackType": "string",
        "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
        "comments": "string"
      },
      "levelPlanId": "0f5a21ff-233b-4dbc-8296-4521bcd60dc1",
      "planFile": {
        "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
        "fileName": "string",
        "fileSize": "string",
        "currentRevisionNumber": 0,
        "createdOn": "string",
        "fileSizeInBytes": 0,
        "createdDate": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "isLatest": true
      },
      "cadPlanCoordinates": [
        0.1
      ],
      "spaceAssignedOnDateTimeFormat": "string",
      "svgPlanAdded": true
    },
    "employmentType": {
      "employmentTypeId": "65542eea-2c60-4cde-825a-0aeb558a1843",
      "employmentTypeName": "string",
      "employmentTypeCode": "string"
    },
    "employeeCategory": {
      "employeeCategoryId": "ab1bf01c-a488-426a-a6e4-f62994a332c3",
      "employeeCategoryName": "string",
      "employeeCategoryDescription": "string",
      "isLaborCategory": true,
      "responseDescription": "string"
    },
    "status": {
      "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
      "statusCode": "string",
      "statusName": "string",
      "statusColor": "string"
    },
    "employeeWorkMode": {
      "employeeWorkModeId": "7c18b9a4-d553-4c6e-b8c5-444b8bd5f81c",
      "employeeWorkModeName": "string",
      "employeeWorkModeCode": "string"
    },
    "serviceEndDate": {
      "serviceEndDate": "string",
      "status": {
        "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
        "statusCode": "string",
        "statusName": "string",
        "statusColor": "string"
      }
    },
    "employeeId": "b0e78c8f-8c8b-4410-8293-9239e39d9e17",
    "employeeName": "string",
    "employeeFirstName": "string",
    "employeeMiddleName": "string",
    "employeeLastName": "string",
    "email": "string",
    "employeeCode": "string",
    "employeeRole": "string",
    "profilePic": "string",
    "dateOfTermination": "string",
    "dateOfJoining": "string",
    "employeeUserId": "7705f2cd-52d6-461c-8f23-90ff1b383164",
    "isTechnician": true,
    "isCreateUserAccount": true,
    "userRoles": [
      {
        "accountAccessGroupId": "b7c311f8-ecd3-41e7-b5be-6ffc4403feac",
        "accountAccessGroupName": "string"
      }
    ],
    "isSupervisor": true,
    "isRollBackAllowed": true
  },
  "message": "string",
  "isError": true,
  "messageCode": 0,
  "status": "string",
  "errorType": "string",
  "traceid": "string",
  "responseDescription": "string"
}