Навигационное меню

post Add Or Update Employee

/Dictionaries/AddOrUpdateEmployee

Создание или обновление сотрудника

Request Body

{
    "birthdate": {
        "required": false,
        "type": "string",
        "description": "Дата рождения",
        "example": ""01.01.1970""
    },
    "department": {
        "required": false,
        "type": "object",
        "description": "Подразделение, в которое будет добавлен сотрудник, структура",
        "properties": {
            ""ext_id"": {
                "type": "string",
                "description": "ID внешней системы подразделения",
                "example": ""1""
            },
            ""Name"": {
                "type": "string",
                "description": "Название подразделения",
                "example": ""Склад3""
            }
        }
    },
    "Ext_ID": {
        "required": false,
        "type": "string",
        "description": "ID внешней системы сотрудника",
        "example": ""a63f5d29-d30b-11ed-a2d9-c860006e479a0""
    },
    "email": {
        "required": false,
        "type": "string",
        "description": "Адрес электронной почты сотрудника",
        "example": ""ivanov@domain.ru""
    },
    "FirstName": {
        "required": true,
        "type": "string",
        "description": "Имя",
        "example": ""Иван""
    },
    "LastName": {
        "required": true,
        "type": "string",
        "description": "Фамилия",
        "example": ""Иванов""
    },
    "MiddleName": {
        "required": true,
        "type": "string",
        "description": "Отчество",
        "example": ""Иванович""
    },
    "MobilePhone": {
        "required": false,
        "type": "string",
        "description": "Номер телефона сотрудника",
        "example": ""+7(910)111-11-16""
    },
    "Organization": {
        "required": false,
        "type": "object",
        "description": "Организация, структура",
        "properties": {
            ""Ext_ID"": {
                "type": "string",
                "example": ""45M45"",
                "description": "ID внешней системы организации"
            },
            ""name"": {
                "type": "string",
                "example": ""ООО Ромашка"",
                "description": "Название организации"
            },
            ""inn"": {
                "type": "string",
                "example": ""7799555551"",
                "description": "ИНН организации"
            },
            ""kpp"": {
                "type": "string",
                "example": ""779901001"",
                "description": "КПП организации"
            }
        }
    },
    "Position": {
        "required": false,
        "type": "string",
        "description": "Должность сотрудника",
        "example": ""Директор департамента""
    },
    "State": {
        "required": false,
        "type": "string",
        "description": "Статус:
- Работает
- Не оформлен
- В отпуске
- В командировке
- Уволен
", "example": ""Работает"" }, "WorkPhone": { "required": false, "type": "string", "description": "Номер телефона сотрудника", "example": ""+7(499)987-65-43"" }, "RequestID": { "required": false, "type": "string", "description": "ID запроса", "example": ""3896d212-b799-4dcc-8d73-617ff0224b46"" }, "ExtPhone": { "required": false, "type": "string", "description": "Добавочный к номеру телефона", "example": ""11"" }, "Telegram": { "required": false, "type": "string", "description": "Адрес в Telegram", "example": ""@ivanov"" }, "Skype": { "required": false, "type": "string", "description": "Адрес в Skype", "example": ""ivanov"" }, "WhatsApp": { "required": false, "type": "string", "description": "Адрес в Skype", "example": ""ivanov"" } }

Example

{
    "birthdate": "01.01.1970",
    "department": {
        "ext_id": "1",
        "Name": "Склад3"
    },
    "email": "ivanov@domain.ru",
    "FirstName": "Иван",
    "LastName": "Иванов",
    "MiddleName": "Иванович",
    "MobilePhone": "+7(910)111-11-16",
    "Organization": {
        "INN": "7799555551",
        "KPP": "779901001",
        "Name": "ООО Ромашка",
        "Ext_ID": "45M45"
    },
    "Position": "Директор департамента",
    "State": "Работает",
    "ExtPhone": "11",
    "Telegram": "@ivanov",
    "Skype": "ivanov",
    "WhatsApp": "ivanov",
    "Ext_ID": "a63f5d29-d30b-11ed-a2d9-c860006e479a0",
    "RequestID": "3896d212-b799-4dcc-8d73-617ff0224b46"
}

Responses

Response 200: OK - Информация о сотруднике создана/ обновлена

{
    "id": 63,
    "ext_ID": "a63f5d29-d30b-11ed-a2d9-c860006e479a0",
    "clientId": 1,
    "clientName": "EnSol",
    "departmentID": 45,
    "department": {
        "id": 45,
        "headDepartmentId": null,
        "headDepartment": null,
        "name": "Склад2",
        "fullName": null,
        "manager": null,
        "code": null,
        "ext_ID": "5678",
        "clientId": 1,
        "organizationID": null,
        "organizationName": null
    },
    "organizationID": 50,
    "organization": {
        "id": 50,
        "name": "ООО Ромашка",
        "inn": "7799555551",
        "kpp": "968601000",
        "clientId": 1,
        "client": null,
        "ext_ID": "45M45",
        "buttonDTO": {
            "id": 50,
            "clientId": 0,
            "organizationId": 0,
            "userId": null,
            "itemId": "50"
        },
        "fullName": null,
        "lawAddress": null,
        "address": null,
        "bill": null,
        "bank": null,
        "bik": null,
        "phone": null,
        "email": null,
        "director": null,
        "ogrn": null
    },
    "firstName": "Иван",
    "middleName": "Иванович",
    "lastName": "Иванов",
    "email": "ivanov@domain.ru",
    "mobilePhone": "+7(910)111-11-16",
    "extPhone": "11",
    "workPhone": "+7(499)987-65-43",
    "position": "Директор департамента",
    "telegram": "@ivanov",
    "skype": "ivanov",
    "whatsApp": "ivanov",
    "birthDate": "1970-01-01T12:00:00Z",
    "state": "Работает",
    "name": "Иванов Иван Иванович"
}

Response 400

No token received ( #err-30) - Токен не получен

Response 401

Could not find any client for this token ( #err-40) - Не найден клиент с данным токеном

EnDocs — единое информационное пространство для управления проектами, документами, задачами и сотрудниками