Skip to content

Employee ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /employee/create ​

This method allows adding employee into the account.

Тело запроса

ПолеТипОбязательноОписание
full_namestringДа
innstringНет
phone_numberstringДа
jshirstringНет
addressstringНет
passport_numberstringНет
passport_issued_datestringНет
passport_issued_bystringНет
acceptance_datestringНет
work_ratenumberНетПо умолчанию: 0
testing_end_timestringНет
contract_end_timestringНетПо умолчанию: false
holidaysnumberНетПо умолчанию: 0
commentstringНет
pincodestringДа
passwordstringДа
is_freebooleanДаПо умолчанию: false
accessesobject[]Нет
accesses[].organization_idstringДа
accesses[].positionsobject[]Нет
accesses[].positions[].position_idstringНет
accesses[].positions[].section_idstringНет
accesses[].role_idstringДа
accesses[].salariesobject[]Нет
accesses[].salaries[].typestringНетДопустимые значения: fixed, task_by
accesses[].salaries[].amountnumberДа
accesses[].salaries[].is_activebooleanНет
accesses[].salaries[].currency_idstringНет
accesses[].salaries[].unitstringНетДопустимые значения: hour, day
person_idstringНетperson id of employee
genderstringНетДопустимые значения: male, female
imagestringНетimage path of employee that uploaded to the server
last_namestringНет
middle_namestringНет
birth_datestringНетdate of birth of employee
legal_person_idstringНетid of legal person
telegram_linkstringНетlink of telegram account
emailstringНетemail of employee
is_supplierbooleanНетis supplier or not. По умолчанию: false
is_customerbooleanНетis customer or not. По умолчанию: false
statusstringНетstatus of employee. Допустимые значения: active, inactive
short_namestringНетshort name of employee
web-sitestringНетweb-site of employee
codestringНетcode of employee
postal_codestringНетpostal code of employee
owner_idstringНетid of owner
manager_idstringНетid of manager
delivery_addressobjectНетdelivery address of employee
delivery_address.latnumberДаПо умолчанию: 0
delivery_address.longnumberДаПо умолчанию: 0
delivery_address.human_addressobjectНет
delivery_address.human_address.addressstringНет
delivery_address.human_address.citystringНет
delivery_address.human_address.statestringНет
delivery_address.human_address.zipstringНет
json
{
  "full_name": "string",
  "inn": "string",
  "phone_number": "string",
  "jshir": "string",
  "address": "string",
  "passport_number": "string",
  "passport_issued_date": "string",
  "passport_issued_by": "string",
  "acceptance_date": "string",
  "work_rate": 0,
  "testing_end_time": "string",
  "contract_end_time": false,
  "holidays": 0,
  "comment": "string",
  "pincode": "string",
  "password": "string",
  "is_free": false,
  "accesses": [
    {
      "organization_id": "67b486d242ed76693cd2cc59",
      "positions": [],
      "role_id": "string",
      "salaries": []
    }
  ],
  "person_id": "string",
  "gender": "male",
  "image": "string",
  "last_name": "string",
  "middle_name": "string",
  "birth_date": "string",
  "legal_person_id": "string",
  "telegram_link": "string",
  "email": "string",
  "is_supplier": false,
  "is_customer": false,
  "status": "active",
  "short_name": "string",
  "web-site": "string",
  "code": "string",
  "postal_code": "string",
  "owner_id": "67b486d242ed76693cd2cc59",
  "manager_id": "67b486d242ed76693cd2cc59",
  "delivery_address": {
    "lat": 0,
    "long": 0,
    "human_address": {
      "address": "string",
      "city": "string",
      "state": "string",
      "zip": "string"
    }
  }
}

Ответ

ПолеТипОписание
_idstringid of employee
full_namestring
innstring
phone_numberstring
jshirstring
passport_numberstring
passport_issued_datestring
passport_issued_bystring
acceptance_datestring
work_ratenumberПо умолчанию: 0
testing_end_timestring
contract_end_timestringПо умолчанию: false
holidaysnumberПо умолчанию: 0
commentstring
is_freebooleanПо умолчанию: false
addressstringaddress of employee
genderstringДопустимые значения: male, female
imagestringimage path of employee that uploaded to the server
last_namestring
middle_namestring
birth_datestringdate of birth of employee
legal_person_idstringid of legal person
telegram_linkstringlink of telegram account
emailstringemail of employee
is_supplierbooleanis supplier or not. По умолчанию: false
statusstringstatus of employee. Допустимые значения: active, inactive
short_namestringshort name of employee
web-sitestringweb-site of employee
codestringcode of employee
postal_codestringpostal code of employee
delivery_addressobjectdelivery address of employee
delivery_address.latnumberПо умолчанию: 0
delivery_address.longnumberПо умолчанию: 0
delivery_address.human_addressobject
delivery_address.human_address.addressstring
delivery_address.human_address.citystring
delivery_address.human_address.statestring
delivery_address.human_address.zipstring
numberstringnumber of employee
balance_actionstringaction of balance
is_bossbooleanis boss or not. По умолчанию: false
employment_typestring
salaryobject
salary.is_activeboolean
salary.employee_idstring
salary.organization_idstring
salary.typestringДопустимые значения: fixed, task_by
salary.amountnumberПо умолчанию: 0
salary.currency_idstringid of currency
salary.unitstringДопустимые значения: hour, day
salary_currency_idstringid of currency
boss_idstringid of boss
balanceobject
balance.organization_idstring
balance.payment_method_idstring
balance.currency_idstring
balance.amountnumberПо умолчанию: 0
balance_currency_idstringid of currency
balance_listobject[]
balance_list[]._idstring
balance_list[].amountnumberПо умолчанию: 0
balance_list[].organization_idstring
balance_list[].payment_method_idstring
balance_list[].currency_idstring
positionsobject[]
positions[].organization_idstring
positions[].sectionobject
positions[].section._idstring
positions[].section.is_deletedboolean
positions[].section.completely_deletedboolean
positions[].section.namestring
positions[].positionobject
positions[].position._idstring
positions[].position.is_deletedboolean
positions[].position.completely_deletedboolean
positions[].position.namestring
positions[].roleobject
positions[].role._idstring
positions[].role.is_deletedboolean
positions[].role.completely_deletedboolean
positions[].role.namestring
positions[].role.webboolean
positions[].role.mobileboolean
positions[].role_idstring
is_deletedbooleanПо умолчанию: false
completely_deletedbooleanПо умолчанию: false
created_atstringdate of creation
updated_atstringdate of update
personobject
person._idstringid of person
person.namestringname of person
person.full_namestringlast name of person
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "67b486d242ed76693cd2cc59",
    "full_name": "string",
    "inn": "string",
    "phone_number": "string",
    "jshir": "string",
    "passport_number": "string",
    "passport_issued_date": "string",
    "passport_issued_by": "string",
    "acceptance_date": "string",
    "work_rate": 0,
    "testing_end_time": "string",
    "contract_end_time": false,
    "holidays": 0,
    "comment": "string",
    "is_free": false,
    "address": "string",
    "gender": "male",
    "image": "string",
    "last_name": "string",
    "middle_name": "string",
    "birth_date": "string",
    "legal_person_id": "string",
    "telegram_link": "string",
    "email": "string",
    "is_supplier": false,
    "status": "active",
    "short_name": "string",
    "web-site": "string",
    "code": "string",
    "postal_code": "string",
    "delivery_address": {
      "lat": 0,
      "long": 0,
      "human_address": {
        "address": "string",
        "city": "string",
        "state": "string",
        "zip": "string"
      }
    },
    "number": "string",
    "balance_action": "string",
    "is_boss": false,
    "employment_type": "string",
    "salary": {
      "is_active": false,
      "employee_id": "string",
      "organization_id": "string",
      "type": "fixed",
      "amount": 0,
      "currency_id": "string",
      "unit": "hour"
    },
    "salary_currency_id": "string",
    "boss_id": "string",
    "balance": {
      "organization_id": "string",
      "payment_method_id": "string",
      "currency_id": "string",
      "amount": 0
    },
    "balance_currency_id": "string",
    "balance_list": [
      {
        "_id": "string",
        "amount": 0,
        "organization_id": "string",
        "payment_method_id": "string",
        "currency_id": "string"
      }
    ],
    "positions": [
      {
        "organization_id": "string",
        "section": {
          "_id": null,
          "is_deleted": null,
          "completely_deleted": null,
          "name": null
        },
        "position": {
          "_id": null,
          "is_deleted": null,
          "completely_deleted": null,
          "name": null
        },
        "role": {
          "_id": null,
          "is_deleted": null,
          "completely_deleted": null,
          "name": null,
          "web": null,
          "mobile": null
        },
        "role_id": "string"
      }
    ],
    "is_deleted": false,
    "completely_deleted": false,
    "created_at": "string",
    "updated_at": "string",
    "person": {
      "_id": "string",
      "name": "string",
      "full_name": "string"
    }
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /employee/update ​

This method allows updating employee in the account.

Тело запроса

ПолеТипОбязательноОписание
_idstringДа
full_namestringДа
innstringНет
phone_numberstringДа
jshirstringНет
addressstringНет
passport_numberstringНет
passport_issued_datestringНет
passport_issued_bystringНет
acceptance_datestringНет
work_ratenumberНетПо умолчанию: 0
testing_end_timestringНет
contract_end_timestringНетПо умолчанию: false
holidaysnumberНетПо умолчанию: 0
commentstringНет
is_freebooleanДаПо умолчанию: false
accessesobject[]Нет
accesses[].organization_idstringДа
accesses[].positionsobject[]Нет
accesses[].positions[].position_idstringДа
accesses[].positions[].section_idstringДа
accesses[].role_idstringДа
accesses[].salariesobject[]Нет
accesses[].salaries[].typestringДаДопустимые значения: fixed, task_by
accesses[].salaries[].amountnumberНет
accesses[].salaries[].is_activebooleanДа
accesses[].salaries[].currency_idstringДа
accesses[].salaries[].unitstringДаДопустимые значения: hour, day
person_idstringНетperson id of employee
genderstringНетДопустимые значения: male, female
imagestringНетimage path of employee that uploaded to the server
last_namestringНет
middle_namestringНет
birth_datestringНетdate of birth of employee
legal_person_idstringНетid of legal person
telegram_linkstringНетlink of telegram account
emailstringНетemail of employee
statusstringНетstatus of employee. Допустимые значения: active, inactive
short_namestringНетshort name of employee
web-sitestringНетweb-site of employee
codestringНетcode of employee
postal_codestringНетpostal code of employee
owner_idstringНетid of owner
manager_idstringНетid of manager
delivery_addressobjectНетdelivery address of employee
delivery_address.latnumberНетПо умолчанию: 0
delivery_address.longnumberНетПо умолчанию: 0
delivery_address.human_addressobjectНет
delivery_address.human_address.addressstringНет
delivery_address.human_address.citystringНет
delivery_address.human_address.statestringНет
delivery_address.human_address.zipstringНет
json
{
  "_id": "67b486d242ed76693cd2cc59",
  "full_name": "string",
  "inn": "string",
  "phone_number": "string",
  "jshir": "string",
  "address": "string",
  "passport_number": "string",
  "passport_issued_date": "string",
  "passport_issued_by": "string",
  "acceptance_date": "string",
  "work_rate": 0,
  "testing_end_time": "string",
  "contract_end_time": false,
  "holidays": 0,
  "comment": "string",
  "is_free": false,
  "accesses": [
    {
      "organization_id": "67b486d242ed76693cd2cc59",
      "positions": [],
      "role_id": "string",
      "salaries": []
    }
  ],
  "person_id": "string",
  "gender": "male",
  "image": "string",
  "last_name": "string",
  "middle_name": "string",
  "birth_date": "string",
  "legal_person_id": "string",
  "telegram_link": "string",
  "email": "string",
  "status": "active",
  "short_name": "string",
  "web-site": "string",
  "code": "string",
  "postal_code": "string",
  "owner_id": "67b486d242ed76693cd2cc59",
  "manager_id": "67b486d242ed76693cd2cc59",
  "delivery_address": {
    "lat": 0,
    "long": 0,
    "human_address": {
      "address": "string",
      "city": "string",
      "state": "string",
      "zip": "string"
    }
  }
}

Ответ

Структура ответа совпадает с POST /employee/create.

DELETE /employee/delete/{id} ​

Delete a employee

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

GET /employee/get-by-id/{id} ​

Get employee using its _id

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /employee/create.

GET /employee/get-deleted ​

Get deleted employee ids

Параметры запроса

ПараметрТипОбязательноОписание
deleted_atstringДа

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    "string"
  ],
  "time": "2025-05-01T12:00:00Z"
}

POST /employee/get-paging ​

Get employees by paging

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНет
position_idstringНет
section_idstringНет
searchstringНет
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "67b486d242ed76693cd2cc59",
  "position_id": "67b486d242ed76693cd2cc59",
  "section_id": "67b486d242ed76693cd2cc59",
  "search": "string"
}

Ответ

data.total — общее количество записей, data.data[] — записи текущей страницы. Таблица ниже описывает одну запись.

ПолеТипОписание
_idstringid of employee
full_namestringfull name of employee
numberstringnumber of employee
phone_numberstringphone number of employee
balance_listobject[]
balance_list[]._idstring
balance_list[].amountnumberПо умолчанию: 0
balance_list[].organization_idstring
balance_list[].payment_method_idstring
balance_list[].currency_idstring
person_idstringid of person
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "data": [
      {
        "_id": "67b486d242ed76693cd2cc59",
        "full_name": "string",
        "number": "string",
        "phone_number": "string",
        "balance_list": [
          {
            "_id": "string",
            "amount": 0,
            "organization_id": "string",
            "payment_method_id": "string",
            "currency_id": "string"
          }
        ],
        "person_id": "string"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

POST /employee/get-by-phone-number ​

Fetch a single employee by phone number. The number is normalised before lookup, so it may be sent with or without a leading +. Returns 400 when no employee carries that number.

Тело запроса

ПолеТипОбязательноОписание
phone_numberstringДаEmployee phone number in international format (required).
json
{
  "phone_number": "998901234567"
}

Ответ

Структура ответа совпадает с POST /employee/create.


Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API