Skip to content

Source ​

Lead/trade acquisition sources

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 /source/get-all ​

Return all lead/customer acquisition sources for the tenant. Optionally filter by source type.

Request body

FieldTypeRequiredDescription
typestringNoFilter sources by origin category (forward-compatible — not yet applied server-side). One of: user, system, integration, lead_form
json
{
  "type": "user"
}

Response

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.

Path parameters

ParameterTypeRequiredDescription
idstringYesSource ObjectId

Request body

No request body.

Response

FieldTypeDescription
_idstringSource ObjectId
namestringDisplay name of the source (e.g. 'Instagram', 'Walk-in', 'Referral')
typestringOrigin category of the source. One of: 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"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API