Core employees

Частично изменить карточку сотрудника

Changed on

Nullable-ссылки и employed_at можно явно очистить значением null. Реквизиты (inn, bank_bic, bank_account, phone, email, notes) без права core.employee_requisites:write не применяются, хранимые значения остаются прежними.

patch/api/v1/core/employees/{id}

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or API key in header X-Api-Key
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate
    • or HTTP bearer

Path parameters

id, string uuid required

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

CoreEmployeePatch required
full_name, string
first_name, string
last_name, string
middle_name, string
position, string nullable
position_id, string uuid nullable
company_id, string uuid nullable
department, string
department_id, string uuid nullable

Подразделение — элемент справочника departments; null — вне оргструктуры

location, string
phone, string
email, string
user_id, integer nullable
manager_employee_id, string uuid nullable

Не задаётся: руководителя вычисляет оргструктура. Новое значение отклоняется кодом core.employee.manager_derived, прежнее пропускается

employed_at, string date nullable
is_active, boolean
notes, string
inn, string

Применяется только с правом core.employee_requisites:write

bank_bic, string

Применяется только с правом core.employee_requisites:write

bank_account, string

Применяется только с правом core.employee_requisites:write

affiliation, 'own' | 'external' | 'guest' | 'candidate'

Смена принадлежности. Внешнему и гостю нужна организация, иначе 400 core.employee.affiliation_invalid. Принятого в штат внешним или гостем не сделать — 409 core.employee.external_hired. Перевод гостя с доступом в own или external занимает место тарифа: мест нет — 409 core.employee.seat_limit. Кандидатом становятся только при заведении, выходят — только coreHireCandidate

organization_contact_id, string uuid nullable

Контрагент-организация внешнего участника; null снимает ссылку

hiring_stage, 'response' | 'interview' | 'offer' | 'rejected'

Этап кандидата; «принят» ставит только coreHireCandidate. У не кандидата — 400 core.employee.hiring_stage_invalid

vacancy_position_id, string uuid nullable

Вакансия кандидата; null снимает

Response

Обновлённая карточка

CoreEmployee required
id, string uuid required
full_name, string required
first_name, string required
last_name, string required
middle_name, string required
position, string required
position_id, string uuid nullable required
position_label, string required
company_id, string uuid nullable required
company_name, string required
department, string required
location, string required
manager_employee_id, string uuid nullable required

Руководитель из оргструктуры: руководитель подразделения сотрудника, а у самого руководителя — руководитель выше по дереву. Пересчитывается при любом изменении структуры

manager_name, string required
phone, string required

Пусто у чужой карточки без права core.employee_requisites:read

email, string required

Пусто у чужой карточки без права core.employee_requisites:read

user_id, integer nullable required
username, string required
role_name, string required
employed_at, string required

Date or empty string

is_active, boolean required
notes, string required

Пусто у чужой карточки без права core.employee_requisites:read

has_photo, boolean required
created_at, string date-time required
updated_at, string date-time required
inn, string

ИНН для выплаты; пусто у чужой карточки без права core.employee_requisites:read

bank_bic, string

БИК банка выплаты; пусто у чужой карточки без права core.employee_requisites:read

bank_account, string

Счёт или карта выплаты; пусто у чужой карточки без права core.employee_requisites:read

snils, string

СНИЛС: 11 цифр без разделителей; пусто у чужой карточки без права core.employee_requisites:read

affiliation, 'own' | 'external' | 'guest' | 'candidate' required

own — свой человек кабинета, external — внешний участник: интегратор, аутсорс; guest — гость-подрядчик: видит только задачи, чаты и папки, куда его позвали, места тарифа не занимает; candidate — кандидат подбора, ещё не принятый. Внешний, гость и кандидат не стоят в оргструктуре и штате и руководителем не выбираются

organization_contact_id, string uuid nullable required

Контрагент-организация, от которой пришёл внешний участник

organization_name, string required

Название организации внешнего участника

hiring_stage, '' | 'response' | 'interview' | 'offer' | 'hired' | 'rejected'

Этап подбора кандидата: отклик, собеседование, оффер, принят, отказ; пусто — карточка не из подбора (ERP-2139)

vacancy_position_id, string uuid nullable

Вакансия кандидата — штатная позиция финансов

placements, CoreOrgPlacement[]

Постановки в оргструктуру на сегодня; только в ответе одной карточки. Отдел и должность человека живут в постановках

Changes

    • info

      added the optional property snils to the response with the status

    • warning

      added the new candidate enum value to the affiliation response property for the response status

    • info

      added the new optional request property hiring_stage

    4 more changes in this revision