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.
Kerakli ruxsat: employee_create · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/employee/create' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/create', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/employee/create",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string",
},
],
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/create');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
full_name | string | Ha | |
inn | string | Yo‘q | |
phone_number | string | Ha | |
jshir | string | Yo‘q | |
address | string | Yo‘q | |
passport_number | string | Yo‘q | |
passport_issued_date | string | Yo‘q | |
passport_issued_by | string | Yo‘q | |
acceptance_date | string | Yo‘q | |
work_rate | number | Yo‘q | Standart: 0 |
testing_end_time | string | Yo‘q | |
contract_end_time | string | Yo‘q | Standart: false |
holidays | number | Yo‘q | Standart: 0 |
comment | string | Yo‘q | |
pincode | string | Yo‘q | Required unless is_free is true. |
password | string | Yo‘q | Required unless is_free is true. |
is_free | boolean | Yo‘q | Standart: false |
accesses | object[] | Ha | |
accesses[].organization_id | string | Ha | |
accesses[].positions | object[] | Yo‘q | |
accesses[].positions[].position_id | string | Ha | |
accesses[].positions[].section_id | string | Ha | |
accesses[].role_id | string | Yo‘q | |
person_id | string | Yo‘q | person id of employee |
gender | string | Yo‘q | Mumkin qiymatlar: male, female |
image | string | Yo‘q | image path of employee that uploaded to the server |
last_name | string | Yo‘q | |
middle_name | string | Yo‘q | |
birth_date | string | Yo‘q | date of birth of employee |
legal_person_id | string | Yo‘q | id of legal person |
telegram_link | string | Yo‘q | link of telegram account |
email | string | Yo‘q | email of employee |
is_supplier | boolean | Yo‘q | is supplier or not. Standart: false |
is_customer | boolean | Yo‘q | is customer or not. Standart: false |
status | string | Yo‘q | status of employee. Mumkin qiymatlar: active, inactive |
short_name | string | Yo‘q | short name of employee |
code | string | Yo‘q | code of employee |
postal_code | string | Yo‘q | postal code of employee |
owner_id | string | Yo‘q | id of owner |
manager_id | string | Yo‘q | id of manager |
delivery_address | object | Yo‘q | delivery address of employee |
delivery_address.lat | number | Yo‘q | Standart: 0 |
delivery_address.long | number | Yo‘q | Standart: 0 |
delivery_address.human_address | object | Yo‘q | |
delivery_address.human_address.address | string | Yo‘q | |
delivery_address.human_address.city | string | Yo‘q | |
delivery_address.human_address.state | string | Yo‘q | |
delivery_address.human_address.zip | string | Yo‘q | |
delivery_address.bearing | number | Yo‘q | |
web_site | string | Yo‘q |
{
"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"
}
],
"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",
"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"
},
"bearing": 0
},
"web_site": "string"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | id of employee |
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 | number | Standart: 0 |
testing_end_time | string | |
contract_end_time | string | Standart: false |
holidays | number | Standart: 0 |
comment | string | |
is_free | boolean | Standart: false |
address | string | address of employee |
gender | string | Mumkin qiymatlar: male, female |
image | string | image path of employee that uploaded to the server |
last_name | string | |
middle_name | string | |
birth_date | string | date of birth of employee |
legal_person_id | string | id of legal person |
telegram_link | string | link of telegram account |
email | string | email of employee |
is_supplier | boolean | is supplier or not. Standart: false |
status | string | status of employee. Mumkin qiymatlar: active, inactive |
short_name | string | short name of employee |
web-site | string | web-site of employee |
code | string | code of employee |
postal_code | string | postal code of employee |
delivery_address | object | delivery address of employee |
delivery_address.lat | number | Standart: 0 |
delivery_address.long | number | Standart: 0 |
delivery_address.human_address | object | |
delivery_address.human_address.address | string | |
delivery_address.human_address.city | string | |
delivery_address.human_address.state | string | |
delivery_address.human_address.zip | string | |
number | string | number of employee |
balance_action | string | action of balance |
is_boss | boolean | is boss or not. Standart: false |
employment_type | string | |
salary | object | |
salary.is_active | boolean | |
salary.employee_id | string | |
salary.organization_id | string | |
salary.type | string | Mumkin qiymatlar: fixed, task_by |
salary.amount | number | Standart: 0 |
salary.currency_id | string | id of currency |
salary.unit | string | Mumkin qiymatlar: hour, day |
salary_currency_id | string | id of currency |
boss_id | string | id of boss |
balance | object | |
balance.organization_id | string | |
balance.payment_method_id | string | |
balance.currency_id | string | |
balance.amount | number | Standart: 0 |
balance_currency_id | string | id of currency |
balance_list | object[] | |
balance_list[]._id | string | |
balance_list[].amount | number | Standart: 0 |
balance_list[].organization_id | string | |
balance_list[].payment_method_id | string | |
balance_list[].currency_id | string | |
positions | object[] | |
positions[].organization_id | string | |
positions[].section | object | |
positions[].section._id | string | |
positions[].section.is_deleted | boolean | |
positions[].section.completely_deleted | boolean | |
positions[].section.name | string | |
positions[].position | object | |
positions[].position._id | string | |
positions[].position.is_deleted | boolean | |
positions[].position.completely_deleted | boolean | |
positions[].position.name | string | |
positions[].role | object | |
positions[].role._id | string | |
positions[].role.is_deleted | boolean | |
positions[].role.completely_deleted | boolean | |
positions[].role.name | string | |
positions[].role.web | boolean | |
positions[].role.mobile | boolean | |
positions[].role_id | string | |
is_deleted | boolean | Standart: false |
completely_deleted | boolean | Standart: false |
created_at | string | date of creation |
updated_at | string | date of update |
person | object | |
person._id | string | id of person |
person.name | string | name of person |
person.full_name | string | last name of person |
{
"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.
Kerakli ruxsat: employee_update · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/employee/update' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"_id": "67b486d242ed76693cd2cc59",
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/update', {
method: 'PUT',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"_id": "67b486d242ed76693cd2cc59",
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"PUT",
"https://api.bito.uz/integration-api/integration/api/v2/employee/update",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"_id": "67b486d242ed76693cd2cc59",
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string",
},
],
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"_id": "67b486d242ed76693cd2cc59",
"full_name": "string",
"phone_number": "string",
"accesses": [
{
"organization_id": "67b486d242ed76693cd2cc59",
"positions": [],
"role_id": "string"
}
]
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/update');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
_id | string | Ha | |
full_name | string | Ha | |
inn | string | Yo‘q | |
phone_number | string | Ha | |
jshir | string | Yo‘q | |
address | string | Yo‘q | |
passport_number | string | Yo‘q | |
passport_issued_date | string | Yo‘q | |
passport_issued_by | string | Yo‘q | |
acceptance_date | string | Yo‘q | |
work_rate | number | Yo‘q | Standart: 0 |
testing_end_time | string | Yo‘q | |
contract_end_time | string | Yo‘q | Standart: false |
holidays | number | Yo‘q | Standart: 0 |
comment | string | Yo‘q | |
is_free | boolean | Yo‘q | Standart: false |
accesses | object[] | Ha | |
accesses[].organization_id | string | Ha | |
accesses[].positions | object[] | Yo‘q | |
accesses[].positions[].position_id | string | Ha | |
accesses[].positions[].section_id | string | Ha | |
accesses[].role_id | string | Yo‘q | |
person_id | string | Yo‘q | person id of employee |
gender | string | Yo‘q | Mumkin qiymatlar: male, female |
image | string | Yo‘q | image path of employee that uploaded to the server |
last_name | string | Yo‘q | |
middle_name | string | Yo‘q | |
birth_date | string | Yo‘q | date of birth of employee |
legal_person_id | string | Yo‘q | id of legal person |
telegram_link | string | Yo‘q | link of telegram account |
email | string | Yo‘q | email of employee |
status | string | Yo‘q | status of employee. Mumkin qiymatlar: active, inactive |
short_name | string | Yo‘q | short name of employee |
code | string | Yo‘q | code of employee |
postal_code | string | Yo‘q | postal code of employee |
owner_id | string | Yo‘q | id of owner |
manager_id | string | Yo‘q | id of manager |
delivery_address | object | Yo‘q | delivery address of employee |
delivery_address.lat | number | Yo‘q | Standart: 0 |
delivery_address.long | number | Yo‘q | Standart: 0 |
delivery_address.human_address | object | Yo‘q | |
delivery_address.human_address.address | string | Yo‘q | |
delivery_address.human_address.city | string | Yo‘q | |
delivery_address.human_address.state | string | Yo‘q | |
delivery_address.human_address.zip | string | Yo‘q | |
delivery_address.bearing | number | Yo‘q | |
web_site | string | Yo‘q |
{
"_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"
}
],
"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",
"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"
},
"bearing": 0
},
"web_site": "string"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /employee/create.
DELETE /employee/delete/{id}
Delete a employee
Kerakli ruxsat: employee_delete · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X DELETE 'https://api.bito.uz/integration-api/integration/api/v2/employee/delete/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/delete/6712f0a9c4d1e87b3a0f9911', {
method: 'DELETE',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"DELETE",
"https://api.bito.uz/integration-api/integration/api/v2/employee/delete/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/delete/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"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
Kerakli ruxsat: employee · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-id/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-id/6712f0a9c4d1e87b3a0f9911', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-id/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-id/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
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
Kerakli ruxsat: employee · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/employee/get-deleted?deleted_at=DELETED_AT' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/get-deleted?deleted_at=DELETED_AT', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/employee/get-deleted?deleted_at=DELETED_AT",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/get-deleted?deleted_at=DELETED_AT');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
deleted_at | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}POST /employee/get-paging
Get employees by paging
Kerakli ruxsat: employee · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/employee/get-paging' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 1,
"limit": 20
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/get-paging', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 1,
"limit": 20
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/employee/get-paging",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 1,
"limit": 20,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"page": 1,
"limit": 20
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/get-paging');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
organization_id | string | Yo‘q | |
position_id | string | Yo‘q | |
section_id | string | Yo‘q | |
search | string | Yo‘q | |
organization_ids | string[] | Yo‘q | Organization ObjectIds. |
access_field_name | string | Yo‘q | |
balance_type | string | Yo‘q | Mumkin qiymatlar: debt, credit, not_zero, zero |
status | string | Yo‘q | Mumkin qiymatlar: active, inactive, all |
{
"page": 1,
"limit": 20,
"organization_id": "67b486d242ed76693cd2cc59",
"position_id": "67b486d242ed76693cd2cc59",
"section_id": "67b486d242ed76693cd2cc59",
"search": "string",
"organization_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"access_field_name": "string",
"balance_type": "debt",
"status": "active"
}Javob
data.total — jami yozuvlar soni, data.data[] — joriy sahifadagi yozuvlar. Quyidagi jadval bitta yozuvni tavsiflaydi.
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | id of employee |
full_name | string | full name of employee |
number | string | number of employee |
phone_number | string | phone number of employee |
balance_list | object[] | |
balance_list[]._id | string | |
balance_list[].amount | number | Standart: 0 |
balance_list[].organization_id | string | |
balance_list[].payment_method_id | string | |
balance_list[].currency_id | string | |
person_id | string | id of person |
{
"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.
Kerakli ruxsat: employee · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-phone-number' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"phone_number": "998901234567"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-phone-number', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"phone_number": "998901234567"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-phone-number",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"phone_number": "998901234567",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"phone_number": "998901234567"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/employee/get-by-phone-number');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
phone_number | string | Ha | Employee phone number in international format (required). |
{
"phone_number": "998901234567"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /employee/create.
Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.