Source
Lead/trade acquisition sources
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /source/get-all
Return all lead/customer acquisition sources for the tenant. Optionally filter by source type.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
type | string | Нет | Filter sources by origin category (forward-compatible — not yet applied server-side). Допустимые значения: user, system, integration, lead_form |
json
{
"type": "user"
}Ответ
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [],
"time": "2025-05-01T12:00:00Z"
}GET /source/get-by-id/{id}
Fetch a single acquisition source by its ObjectId.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Source ObjectId |
Тело запроса
Тело запроса не требуется.
Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | Source ObjectId |
name | string | Display name of the source (e.g. 'Instagram', 'Walk-in', 'Referral') |
type | string | Origin category of the source. Допустимые значения: user, system, integration, lead_form |
integration_id | string | ObjectId of the linked integration, if type is 'integration' |
is_visible | boolean | Whether the source is shown in customer-facing selection lists |
is_deleted | boolean | Soft-delete flag |
created_at | string (date-time) | Creation timestamp |
updated_at | string (date-time) | Last update timestamp |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"type": "user",
"integration_id": "string",
"is_visible": false,
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.