Supplier
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.
GET /supplier/get-by-id/{id}
Get supplier using its _id
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
| Field | Type | Description |
|---|---|---|
name | string | |
number | number | |
type | string | |
parent_id | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"name": "string",
"number": 0,
"type": "string",
"parent_id": "string"
},
"time": "2025-05-01T12:00:00Z"
}POST /supplier/get-paging
Get suppliers by paging
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | |
category_id | string | No | |
updated_at | string (date-time) | No |
{
"page": 1,
"limit": 20,
"search": "string",
"category_id": "63f8b0c4e4b0d3a2f8e4b0c4",
"updated_at": "2024-07-20T10:30:00Z"
}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 |
|---|---|---|
completely_deleted | boolean | |
is_deleted | boolean | |
created_at | string (date-time) | |
director_name | string | |
name | string | |
phone_number | string | |
refund_count | number | |
sale_count | number | |
total_sale | number | |
first_sale_at | string (date-time) | |
last_sale_at | string (date-time) | |
type | string | |
updatedAt | string (date-time) | |
updated_at | string (date-time) | |
total_balance | number | |
balance | number | |
balance_currency_id | string | |
address | string | |
inn | string | |
comment | string | |
avg_product | number | |
avg_sale | number | |
total_spent | number | |
category | object | |
category._id | string | |
category.name | string | |
note | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"completely_deleted": false,
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"director_name": "string",
"name": "string",
"phone_number": "string",
"refund_count": 0,
"sale_count": 0,
"total_sale": 0,
"first_sale_at": "2025-05-01T12:00:00Z",
"last_sale_at": "2025-05-01T12:00:00Z",
"type": "string",
"updatedAt": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z",
"total_balance": 0,
"balance": 0,
"balance_currency_id": "string",
"address": "string",
"inn": "string",
"comment": "string",
"avg_product": 0,
"avg_sale": 0,
"total_spent": 0,
"category": {
"_id": "string",
"name": "string"
},
"note": "string"
}
]
},
"time": "2025-05-01T12:00:00Z"
}POST /supplier/update
Update a supplier.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
name | string | No | |
type | string | No | One of: legal, natural |
phone_number | string | No | |
phone_numbers | string[] | No | |
email | string | No | |
inn | string | No | |
address | string | No | |
note | string | No | |
category_id | string | No | |
responsible_id | string | No | |
organization_ids | string[] | No |
{
"_id": "64b7f4d9e2b3b6a0b7c5d80a",
"name": "string",
"type": "legal",
"phone_number": "string",
"phone_numbers": [
"string"
],
"email": "string",
"inn": "string",
"address": "string",
"note": "string",
"category_id": "string",
"responsible_id": "string",
"organization_ids": [
"string"
]
}Response
Same response shape as GET /supplier/get-by-id/{id}.
GET /supplier/get-by-phone/{phone_number}
Find a supplier by phone number.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone_number | string | Yes |
Request body
No request body.
Response
Same response shape as GET /supplier/get-by-id/{id}.
POST /supplier/create
Create a supplier. name and organization_ids (at least one) are required. Conditional fields depend on type: legal persons use short_name / web_site / code / postal_code / owner_id / manager_id, natural persons use last_name / middle_name / birth_date / gender / legal_person_id. Returns the created supplier.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Supplier name (required). For a legal person this is the company name; for a natural person the display name. |
type | string | No | Person type. Drives which of the conditional field groups below apply. Defaults to the backend default when omitted.. One of: legal, natural |
organization_ids | string[] | Yes | Organizations the supplier is available in (required, at least one). |
first_name | string | No | |
last_name | string | No | Natural persons only. |
middle_name | string | No | Natural persons only. |
birth_date | string (date-time) | No | Natural persons only. |
gender | string | No | Natural persons only.. One of: male, female |
short_name | string | No | Legal persons only. |
web_site | string | No | Legal persons only. |
code | string | No | Legal persons only. |
postal_code | string | No | Legal persons only. |
owner_id | string | No | Legal persons only — owning person ObjectId. |
manager_id | string | No | Legal persons only — manager person ObjectId. |
phone_number | string | No | Primary phone number in international format. |
phone_numbers | string[] | No | Additional phone numbers. Must be unique. |
fax | string | No | |
email | string | No | |
telegram_link | string | No | |
inn | string | No | Taxpayer INN. Validated for format. |
qqs_number | string | No | VAT registration number. |
oked | string | No | |
director_name | string | No | |
bank_name | string | No | |
mfo | string | No | |
card_number | string | No | Validated as a credit-card number. |
address | string | No | |
delivery_address | object | No | Location object (lat/lng + address). |
category_id | string | No | |
person_id | string | No | Link to an existing person record instead of creating a new one. |
responsible_id | string | No | |
legal_person_id | string | No | Natural persons only — the legal person they represent. |
status | string | No | One of: active, inactive |
is_customer | boolean | No | Also register this person as a customer. |
locale | string | No | One of: uz, ru, en, kk, ky, tg |
comment | string | No | |
note | string | No | |
image | string | No | |
tag_ids | string[] | No | |
attachments | object[] | No | Attached files: { name, path, size, note }. |
{
"name": "string",
"type": "legal",
"organization_ids": [
"64b7f4d9e2b3b6a0b7c5d80a"
],
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"birth_date": "2025-05-01T12:00:00Z",
"gender": "male",
"short_name": "string",
"web_site": "string",
"code": "string",
"postal_code": "string",
"owner_id": "string",
"manager_id": "string",
"phone_number": "string",
"phone_numbers": [
"string"
],
"fax": "string",
"email": "string",
"telegram_link": "string",
"inn": "string",
"qqs_number": "string",
"oked": "string",
"director_name": "string",
"bank_name": "string",
"mfo": "string",
"card_number": "string",
"address": "string",
"delivery_address": {},
"category_id": "string",
"person_id": "string",
"responsible_id": "string",
"legal_person_id": "string",
"status": "active",
"is_customer": false,
"locale": "uz",
"comment": "string",
"note": "string",
"image": "string",
"tag_ids": [
"string"
],
"attachments": [
{}
]
}Response
Same response shape as GET /supplier/get-by-id/{id}.
This page is generated from the OpenAPI spec.