Skip to content

Employee ​

INFO

Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.

POST /employee/create ​

This method allows adding employee into the account.

Request body

FieldTypeRequiredDescription
full_namestringYes
innstringNo
phone_numberstringYes
jshirstringNo
addressstringNo
passport_numberstringNo
passport_issued_datestringNo
passport_issued_bystringNo
acceptance_datestringNo
work_ratenumberNoDefault: 0
testing_end_timestringNo
contract_end_timestringNoDefault: false
holidaysnumberNoDefault: 0
commentstringNo
pincodestringYes
passwordstringYes
is_freebooleanYesDefault: false
accessesobject[]No
accesses[].organization_idstringYes
accesses[].positionsobject[]No
accesses[].positions[].position_idstringNo
accesses[].positions[].section_idstringNo
accesses[].role_idstringYes
accesses[].salariesobject[]No
accesses[].salaries[].typestringNoOne of: fixed, task_by
accesses[].salaries[].amountnumberYes
accesses[].salaries[].is_activebooleanNo
accesses[].salaries[].currency_idstringNo
accesses[].salaries[].unitstringNoOne of: hour, day
person_idstringNoperson id of employee
genderstringNoOne of: male, female
imagestringNoimage path of employee that uploaded to the server
last_namestringNo
middle_namestringNo
birth_datestringNodate of birth of employee
legal_person_idstringNoid of legal person
telegram_linkstringNolink of telegram account
emailstringNoemail of employee
is_supplierbooleanNois supplier or not. Default: false
is_customerbooleanNois customer or not. Default: false
statusstringNostatus of employee. One of: active, inactive
short_namestringNoshort name of employee
web-sitestringNoweb-site of employee
codestringNocode of employee
postal_codestringNopostal code of employee
owner_idstringNoid of owner
manager_idstringNoid of manager
delivery_addressobjectNodelivery address of employee
delivery_address.latnumberYesDefault: 0
delivery_address.longnumberYesDefault: 0
delivery_address.human_addressobjectNo
delivery_address.human_address.addressstringNo
delivery_address.human_address.citystringNo
delivery_address.human_address.statestringNo
delivery_address.human_address.zipstringNo
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"
    }
  }
}

Response

FieldTypeDescription
_idstringid of employee
full_namestring
innstring
phone_numberstring
jshirstring
passport_numberstring
passport_issued_datestring
passport_issued_bystring
acceptance_datestring
work_ratenumberDefault: 0
testing_end_timestring
contract_end_timestringDefault: false
holidaysnumberDefault: 0
commentstring
is_freebooleanDefault: false
addressstringaddress of employee
genderstringOne of: 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. Default: false
statusstringstatus of employee. One of: 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.latnumberDefault: 0
delivery_address.longnumberDefault: 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. Default: false
employment_typestring
salaryobject
salary.is_activeboolean
salary.employee_idstring
salary.organization_idstring
salary.typestringOne of: fixed, task_by
salary.amountnumberDefault: 0
salary.currency_idstringid of currency
salary.unitstringOne of: hour, day
salary_currency_idstringid of currency
boss_idstringid of boss
balanceobject
balance.organization_idstring
balance.payment_method_idstring
balance.currency_idstring
balance.amountnumberDefault: 0
balance_currency_idstringid of currency
balance_listobject[]
balance_list[]._idstring
balance_list[].amountnumberDefault: 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_deletedbooleanDefault: false
completely_deletedbooleanDefault: 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.

Request body

FieldTypeRequiredDescription
_idstringYes
full_namestringYes
innstringNo
phone_numberstringYes
jshirstringNo
addressstringNo
passport_numberstringNo
passport_issued_datestringNo
passport_issued_bystringNo
acceptance_datestringNo
work_ratenumberNoDefault: 0
testing_end_timestringNo
contract_end_timestringNoDefault: false
holidaysnumberNoDefault: 0
commentstringNo
is_freebooleanYesDefault: false
accessesobject[]No
accesses[].organization_idstringYes
accesses[].positionsobject[]No
accesses[].positions[].position_idstringYes
accesses[].positions[].section_idstringYes
accesses[].role_idstringYes
accesses[].salariesobject[]No
accesses[].salaries[].typestringYesOne of: fixed, task_by
accesses[].salaries[].amountnumberNo
accesses[].salaries[].is_activebooleanYes
accesses[].salaries[].currency_idstringYes
accesses[].salaries[].unitstringYesOne of: hour, day
person_idstringNoperson id of employee
genderstringNoOne of: male, female
imagestringNoimage path of employee that uploaded to the server
last_namestringNo
middle_namestringNo
birth_datestringNodate of birth of employee
legal_person_idstringNoid of legal person
telegram_linkstringNolink of telegram account
emailstringNoemail of employee
statusstringNostatus of employee. One of: active, inactive
short_namestringNoshort name of employee
web-sitestringNoweb-site of employee
codestringNocode of employee
postal_codestringNopostal code of employee
owner_idstringNoid of owner
manager_idstringNoid of manager
delivery_addressobjectNodelivery address of employee
delivery_address.latnumberNoDefault: 0
delivery_address.longnumberNoDefault: 0
delivery_address.human_addressobjectNo
delivery_address.human_address.addressstringNo
delivery_address.human_address.citystringNo
delivery_address.human_address.statestringNo
delivery_address.human_address.zipstringNo
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"
    }
  }
}

Response

Same response shape as POST /employee/create.

DELETE /employee/delete/{id} ​

Delete a employee

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

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

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /employee/create.

GET /employee/get-deleted ​

Get deleted employee ids

Query parameters

ParameterTypeRequiredDescription
deleted_atstringYes

Request body

No request body.

Response

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

POST /employee/get-paging ​

Get employees by paging

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
organization_idstringNo
position_idstringNo
section_idstringNo
searchstringNo
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "67b486d242ed76693cd2cc59",
  "position_id": "67b486d242ed76693cd2cc59",
  "section_id": "67b486d242ed76693cd2cc59",
  "search": "string"
}

Response

data.total is the total number of records and data.data[] holds the current page. The table below describes one record.

FieldTypeDescription
_idstringid of employee
full_namestringfull name of employee
numberstringnumber of employee
phone_numberstringphone number of employee
balance_listobject[]
balance_list[]._idstring
balance_list[].amountnumberDefault: 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.

Request body

FieldTypeRequiredDescription
phone_numberstringYesEmployee phone number in international format (required).
json
{
  "phone_number": "998901234567"
}

Response

Same response shape as POST /employee/create.


This page is generated from the OpenAPI spec.

Bito 2.0 Integration API