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
| Field | Type | Required | Description |
|---|---|---|---|
full_name | string | Yes | |
inn | string | No | |
phone_number | string | Yes | |
jshir | string | No | |
address | string | No | |
passport_number | string | No | |
passport_issued_date | string | No | |
passport_issued_by | string | No | |
acceptance_date | string | No | |
work_rate | number | No | Default: 0 |
testing_end_time | string | No | |
contract_end_time | string | No | Default: false |
holidays | number | No | Default: 0 |
comment | string | No | |
pincode | string | Yes | |
password | string | Yes | |
is_free | boolean | Yes | Default: false |
accesses | object[] | No | |
accesses[].organization_id | string | Yes | |
accesses[].positions | object[] | No | |
accesses[].positions[].position_id | string | No | |
accesses[].positions[].section_id | string | No | |
accesses[].role_id | string | Yes | |
accesses[].salaries | object[] | No | |
accesses[].salaries[].type | string | No | One of: fixed, task_by |
accesses[].salaries[].amount | number | Yes | |
accesses[].salaries[].is_active | boolean | No | |
accesses[].salaries[].currency_id | string | No | |
accesses[].salaries[].unit | string | No | One of: hour, day |
person_id | string | No | person id of employee |
gender | string | No | One of: male, female |
image | string | No | image path of employee that uploaded to the server |
last_name | string | No | |
middle_name | string | No | |
birth_date | string | No | date of birth of employee |
legal_person_id | string | No | id of legal person |
telegram_link | string | No | link of telegram account |
email | string | No | email of employee |
is_supplier | boolean | No | is supplier or not. Default: false |
is_customer | boolean | No | is customer or not. Default: false |
status | string | No | status of employee. One of: active, inactive |
short_name | string | No | short name of employee |
web-site | string | No | web-site of employee |
code | string | No | code of employee |
postal_code | string | No | postal code of employee |
owner_id | string | No | id of owner |
manager_id | string | No | id of manager |
delivery_address | object | No | delivery address of employee |
delivery_address.lat | number | Yes | Default: 0 |
delivery_address.long | number | Yes | Default: 0 |
delivery_address.human_address | object | No | |
delivery_address.human_address.address | string | No | |
delivery_address.human_address.city | string | No | |
delivery_address.human_address.state | string | No | |
delivery_address.human_address.zip | string | No |
{
"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
| Field | Type | Description |
|---|---|---|
_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 | Default: 0 |
testing_end_time | string | |
contract_end_time | string | Default: false |
holidays | number | Default: 0 |
comment | string | |
is_free | boolean | Default: false |
address | string | address of employee |
gender | string | One of: 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. Default: false |
status | string | status of employee. One of: 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 | Default: 0 |
delivery_address.long | number | Default: 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. Default: false |
employment_type | string | |
salary | object | |
salary.is_active | boolean | |
salary.employee_id | string | |
salary.organization_id | string | |
salary.type | string | One of: fixed, task_by |
salary.amount | number | Default: 0 |
salary.currency_id | string | id of currency |
salary.unit | string | One of: 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 | Default: 0 |
balance_currency_id | string | id of currency |
balance_list | object[] | |
balance_list[]._id | string | |
balance_list[].amount | number | Default: 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 | Default: false |
completely_deleted | boolean | Default: 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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
full_name | string | Yes | |
inn | string | No | |
phone_number | string | Yes | |
jshir | string | No | |
address | string | No | |
passport_number | string | No | |
passport_issued_date | string | No | |
passport_issued_by | string | No | |
acceptance_date | string | No | |
work_rate | number | No | Default: 0 |
testing_end_time | string | No | |
contract_end_time | string | No | Default: false |
holidays | number | No | Default: 0 |
comment | string | No | |
is_free | boolean | Yes | Default: false |
accesses | object[] | No | |
accesses[].organization_id | string | Yes | |
accesses[].positions | object[] | No | |
accesses[].positions[].position_id | string | Yes | |
accesses[].positions[].section_id | string | Yes | |
accesses[].role_id | string | Yes | |
accesses[].salaries | object[] | No | |
accesses[].salaries[].type | string | Yes | One of: fixed, task_by |
accesses[].salaries[].amount | number | No | |
accesses[].salaries[].is_active | boolean | Yes | |
accesses[].salaries[].currency_id | string | Yes | |
accesses[].salaries[].unit | string | Yes | One of: hour, day |
person_id | string | No | person id of employee |
gender | string | No | One of: male, female |
image | string | No | image path of employee that uploaded to the server |
last_name | string | No | |
middle_name | string | No | |
birth_date | string | No | date of birth of employee |
legal_person_id | string | No | id of legal person |
telegram_link | string | No | link of telegram account |
email | string | No | email of employee |
status | string | No | status of employee. One of: active, inactive |
short_name | string | No | short name of employee |
web-site | string | No | web-site of employee |
code | string | No | code of employee |
postal_code | string | No | postal code of employee |
owner_id | string | No | id of owner |
manager_id | string | No | id of manager |
delivery_address | object | No | delivery address of employee |
delivery_address.lat | number | No | Default: 0 |
delivery_address.long | number | No | Default: 0 |
delivery_address.human_address | object | No | |
delivery_address.human_address.address | string | No | |
delivery_address.human_address.city | string | No | |
delivery_address.human_address.state | string | No | |
delivery_address.human_address.zip | string | No |
{
"_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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /employee/create.
GET /employee/get-deleted
Get deleted employee ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
{
"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
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
organization_id | string | No | |
position_id | string | No | |
section_id | string | No | |
search | string | No |
{
"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.
| Field | Type | Description |
|---|---|---|
_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 | Default: 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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
phone_number | string | Yes | Employee phone number in international format (required). |
{
"phone_number": "998901234567"
}Response
Same response shape as POST /employee/create.
This page is generated from the OpenAPI spec.