Skip to content

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

MaydonTurMajburiyTavsif
typestringYo‘qFilter 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

ParametrTurMajburiyTavsif
idstringHaSource ObjectId

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

MaydonTurTavsif
_idstringSource ObjectId
namestringDisplay name of the source (e.g. 'Instagram', 'Walk-in', 'Referral')
typestringOrigin category of the source. Mumkin qiymatlar: user, system, integration, lead_form
integration_idstringObjectId of the linked integration, if type is 'integration'
is_visiblebooleanWhether the source is shown in customer-facing selection lists
is_deletedbooleanSoft-delete flag
created_atstring (date-time)Creation timestamp
updated_atstring (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.

Bito 2.0 Integration API