Skip to content

Employee ​

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

POST /employee/create ​

This method allows adding employee into the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
full_namestringHa
innstringYo‘q
phone_numberstringHa
jshirstringYo‘q
addressstringYo‘q
passport_numberstringYo‘q
passport_issued_datestringYo‘q
passport_issued_bystringYo‘q
acceptance_datestringYo‘q
work_ratenumberYo‘qStandart: 0
testing_end_timestringYo‘q
contract_end_timestringYo‘qStandart: false
holidaysnumberYo‘qStandart: 0
commentstringYo‘q
pincodestringHa
passwordstringHa
is_freebooleanHaStandart: false
accessesobject[]Yo‘q
accesses[].organization_idstringHa
accesses[].positionsobject[]Yo‘q
accesses[].positions[].position_idstringYo‘q
accesses[].positions[].section_idstringYo‘q
accesses[].role_idstringHa
accesses[].salariesobject[]Yo‘q
accesses[].salaries[].typestringYo‘qMumkin qiymatlar: fixed, task_by
accesses[].salaries[].amountnumberHa
accesses[].salaries[].is_activebooleanYo‘q
accesses[].salaries[].currency_idstringYo‘q
accesses[].salaries[].unitstringYo‘qMumkin qiymatlar: hour, day
person_idstringYo‘qperson id of employee
genderstringYo‘qMumkin qiymatlar: male, female
imagestringYo‘qimage path of employee that uploaded to the server
last_namestringYo‘q
middle_namestringYo‘q
birth_datestringYo‘qdate of birth of employee
legal_person_idstringYo‘qid of legal person
telegram_linkstringYo‘qlink of telegram account
emailstringYo‘qemail of employee
is_supplierbooleanYo‘qis supplier or not. Standart: false
is_customerbooleanYo‘qis customer or not. Standart: false
statusstringYo‘qstatus of employee. Mumkin qiymatlar: active, inactive
short_namestringYo‘qshort name of employee
web-sitestringYo‘qweb-site of employee
codestringYo‘qcode of employee
postal_codestringYo‘qpostal code of employee
owner_idstringYo‘qid of owner
manager_idstringYo‘qid of manager
delivery_addressobjectYo‘qdelivery address of employee
delivery_address.latnumberHaStandart: 0
delivery_address.longnumberHaStandart: 0
delivery_address.human_addressobjectYo‘q
delivery_address.human_address.addressstringYo‘q
delivery_address.human_address.citystringYo‘q
delivery_address.human_address.statestringYo‘q
delivery_address.human_address.zipstringYo‘q
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"
    }
  }
}

Javob

MaydonTurTavsif
_idstringid of employee
full_namestring
innstring
phone_numberstring
jshirstring
passport_numberstring
passport_issued_datestring
passport_issued_bystring
acceptance_datestring
work_ratenumberStandart: 0
testing_end_timestring
contract_end_timestringStandart: false
holidaysnumberStandart: 0
commentstring
is_freebooleanStandart: false
addressstringaddress of employee
genderstringMumkin qiymatlar: 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. Standart: false
statusstringstatus of employee. Mumkin qiymatlar: 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.latnumberStandart: 0
delivery_address.longnumberStandart: 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. Standart: false
employment_typestring
salaryobject
salary.is_activeboolean
salary.employee_idstring
salary.organization_idstring
salary.typestringMumkin qiymatlar: fixed, task_by
salary.amountnumberStandart: 0
salary.currency_idstringid of currency
salary.unitstringMumkin qiymatlar: hour, day
salary_currency_idstringid of currency
boss_idstringid of boss
balanceobject
balance.organization_idstring
balance.payment_method_idstring
balance.currency_idstring
balance.amountnumberStandart: 0
balance_currency_idstringid of currency
balance_listobject[]
balance_list[]._idstring
balance_list[].amountnumberStandart: 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_deletedbooleanStandart: false
completely_deletedbooleanStandart: 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.

So‘rov tanasi

MaydonTurMajburiyTavsif
_idstringHa
full_namestringHa
innstringYo‘q
phone_numberstringHa
jshirstringYo‘q
addressstringYo‘q
passport_numberstringYo‘q
passport_issued_datestringYo‘q
passport_issued_bystringYo‘q
acceptance_datestringYo‘q
work_ratenumberYo‘qStandart: 0
testing_end_timestringYo‘q
contract_end_timestringYo‘qStandart: false
holidaysnumberYo‘qStandart: 0
commentstringYo‘q
is_freebooleanHaStandart: false
accessesobject[]Yo‘q
accesses[].organization_idstringHa
accesses[].positionsobject[]Yo‘q
accesses[].positions[].position_idstringHa
accesses[].positions[].section_idstringHa
accesses[].role_idstringHa
accesses[].salariesobject[]Yo‘q
accesses[].salaries[].typestringHaMumkin qiymatlar: fixed, task_by
accesses[].salaries[].amountnumberYo‘q
accesses[].salaries[].is_activebooleanHa
accesses[].salaries[].currency_idstringHa
accesses[].salaries[].unitstringHaMumkin qiymatlar: hour, day
person_idstringYo‘qperson id of employee
genderstringYo‘qMumkin qiymatlar: male, female
imagestringYo‘qimage path of employee that uploaded to the server
last_namestringYo‘q
middle_namestringYo‘q
birth_datestringYo‘qdate of birth of employee
legal_person_idstringYo‘qid of legal person
telegram_linkstringYo‘qlink of telegram account
emailstringYo‘qemail of employee
statusstringYo‘qstatus of employee. Mumkin qiymatlar: active, inactive
short_namestringYo‘qshort name of employee
web-sitestringYo‘qweb-site of employee
codestringYo‘qcode of employee
postal_codestringYo‘qpostal code of employee
owner_idstringYo‘qid of owner
manager_idstringYo‘qid of manager
delivery_addressobjectYo‘qdelivery address of employee
delivery_address.latnumberYo‘qStandart: 0
delivery_address.longnumberYo‘qStandart: 0
delivery_address.human_addressobjectYo‘q
delivery_address.human_address.addressstringYo‘q
delivery_address.human_address.citystringYo‘q
delivery_address.human_address.statestringYo‘q
delivery_address.human_address.zipstringYo‘q
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"
    }
  }
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /employee/create.

DELETE /employee/delete/{id} ​

Delete a employee

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

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

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /employee/create.

GET /employee/get-deleted ​

Get deleted employee ids

So‘rov parametrlari

ParametrTurMajburiyTavsif
deleted_atstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

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

POST /employee/get-paging ​

Get employees by paging

So‘rov tanasi

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
organization_idstringYo‘q
position_idstringYo‘q
section_idstringYo‘q
searchstringYo‘q
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "67b486d242ed76693cd2cc59",
  "position_id": "67b486d242ed76693cd2cc59",
  "section_id": "67b486d242ed76693cd2cc59",
  "search": "string"
}

Javob

data.total — jami yozuvlar soni, data.data[] — joriy sahifadagi yozuvlar. Quyidagi jadval bitta yozuvni tavsiflaydi.

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

So‘rov tanasi

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

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /employee/create.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API