Source
Lead/trade acquisition sources
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 /source/get-all
Return all lead/customer acquisition sources for the tenant. Optionally filter by source type.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
type | string | Yo‘q | Filter sources by origin category (forward-compatible — not yet applied server-side). Mumkin qiymatlar: user, system, integration, lead_form |
json
{
"type": "user"
}Javob
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.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Source ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | Source ObjectId |
name | string | Display name of the source (e.g. 'Instagram', 'Walk-in', 'Referral') |
type | string | Origin category of the source. Mumkin qiymatlar: 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"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.