Person
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 /person/get-by-id/{id}
Fetch a single person by ObjectId. Legal and natural persons are both stored as persons; the response is the aggregated legal- or natural-person record depending on the stored type.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
| Field | Type | Description |
|---|---|---|
number | number | |
type | string | |
name | string | |
short_name | string | |
status | string | One of: active, inactive |
phone_number | string | |
telegram_link | string | |
email | string | |
web_site | string | |
address | string | |
code | string | |
postal_code | string | |
inn | string | |
image | string | |
location | object | |
is_customer | boolean | |
is_supplier | boolean | |
is_default | boolean | |
updated_by_user | object | |
updated_by_user._id | string | |
updated_by_user.full_name | string | |
created_by_user | object | |
created_by_user._id | string | |
created_by_user.full_name | string | |
owner | object | |
owner._id | string | |
owner.name | string | |
owner.short_name | string | |
manager | object | |
manager._id | string | |
manager.first_name | string | |
manager.last_name | string | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
balance | number | |
balance_list | object[] | |
total_balance | number | |
customer | object | |
customer._id | string | |
customer.name | string | |
employee | object | |
employee._id | string | |
employee.name | string | |
supplier | object | |
supplier._id | string | |
supplier.name | string | |
delivery_address | string | |
responsible_id | string | |
responsible | object | |
responsible._id | string | |
responsible.full_name | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"number": 0,
"type": "string",
"name": "string",
"short_name": "string",
"status": "active",
"phone_number": "string",
"telegram_link": "string",
"email": "string",
"web_site": "string",
"address": "string",
"code": "string",
"postal_code": "string",
"inn": "string",
"image": "string",
"location": {},
"is_customer": false,
"is_supplier": false,
"is_default": false,
"updated_by_user": {
"_id": "string",
"full_name": "string"
},
"created_by_user": {
"_id": "string",
"full_name": "string"
},
"owner": {
"_id": "string",
"name": "string",
"short_name": "string"
},
"manager": {
"_id": "string",
"first_name": "string",
"last_name": "string"
},
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z",
"balance": 0,
"balance_list": [
{}
],
"total_balance": 0,
"customer": {
"_id": "string",
"name": "string"
},
"employee": {
"_id": "string",
"name": "string"
},
"supplier": {
"_id": "string",
"name": "string"
},
"delivery_address": "string",
"responsible_id": "string",
"responsible": {
"_id": "string",
"full_name": "string"
}
},
"time": "2025-05-01T12:00:00Z"
}POST /person/balance/get-paging
Paginated list of persons WITH their balances per organization and currency. Filter by type, status, organization_id and balance_type. Use /person/get-paging for a plain list without balance aggregation — it is considerably cheaper.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
type | string | No | One of: legal, natural |
status | string | No | One of: active, inactive |
organization_id | string | No | |
balance_type | string | No | Filter by balance state.. One of: debt, credit, zero, not_zero |
{
"page": 1,
"limit": 20,
"type": "legal",
"status": "active",
"organization_id": "63f8b0c4e4b0d3a2f8e4b0c4",
"balance_type": "not_zero"
}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 | |
name | string | |
last_name | string | |
first_name | string | |
type | boolean | |
person_id | string | |
phone_number | string | |
status | string | One of: active, inactive |
code | string | |
balance_list | object[] |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"_id": "string",
"name": "string",
"last_name": "string",
"first_name": "string",
"type": false,
"person_id": "string",
"phone_number": "string",
"status": "active",
"code": "string",
"balance_list": [
{}
]
}
]
},
"time": "2025-05-01T12:00:00Z"
}POST /person/get-paging
Paginated list of persons — the shared identity record behind customers, suppliers and employees. Returns a light projection (_id, name, first_name, last_name, type, phone_number, status, code). Filter by type, status, organization_id/organization_ids, is_customer, is_supplier, or free-text search. Use /person/balance/get-paging when balances are needed.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | Free-text search over name / phone number / code. |
type | string | No | Filter by person type.. One of: legal, natural |
status | string | No | Filter by person status.. One of: active, inactive |
organization_id | string | No | Restrict to persons attached to this organization. |
organization_ids | string[] | No | Restrict to persons attached to any of these organizations. |
is_customer | boolean | No | Keep only persons that are also customers. |
is_supplier | boolean | No | Keep only persons that are also suppliers. |
{
"page": 1,
"limit": 20,
"search": "string",
"type": "natural",
"status": "active",
"organization_id": "63f8b0c4e4b0d3a2f8e4b0c4",
"organization_ids": [
"63f8b0c4e4b0d3a2f8e4b0c4"
],
"is_customer": false,
"is_supplier": false
}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 | |
name | string | Display name. For legal persons this is the company name; for natural persons the assembled full name. |
first_name | string | |
last_name | string | |
type | string | One of: legal, natural |
phone_number | string | |
status | string | One of: active, inactive |
code | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"_id": "string",
"name": "string",
"first_name": "string",
"last_name": "string",
"type": "legal",
"phone_number": "string",
"status": "active",
"code": "string"
}
]
},
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.