Skip to main content

LeadDTO

CRM Lead information object. Returned by GET /v1/open-api/lead/{leadId}.

Same fields, names and shapes as LeadFilterResponseDTO's row, plus the heavier per-lead blocks: fields, contacts, attributions, contract, reasonsForRefusal.

idint64

Lead ID

Example: 1001
uuiduuid

Lead UUID value

Example: 550e8400-e29b-41d4-a716-446655440000
facebookLeadIdstringnullable

Identifier of the originating Facebook Lead Ads lead. Set only for leads created from a Facebook lead form; null for every other source.

Example: 1234567890123456
namestring

Lead name

Example: New apartment buyer
balancedouble

Balance (budget) amount — currency is currency.

Example: 5000
currency objectnullable

Lead's currency. null when the lead has no currency set.

idint32

Currency ID

Example: 1
valuedouble

Exchange rate (1 for the basic currency)

Example: 1
updateTimestampint64

Last update time (epoch seconds)

Example: 1672531200
basicboolean

Whether it's the company's basic currency

Example: true
ccystring

Currency code

Example: USD
pipeStatus object

Compact reference to a pipeline (funnel) status, embedded in LeadDTO and LeadFilterResponseDTO as pipeStatus.

idint64

Pipeline status ID

Example: 979
namestring

Pipeline status name

Example: New
pipeIdint64

The pipe (funnel) this status belongs to

Example: 12
pipeNamestring

Pipe (funnel) name

Example: Sales
responsibleBy object

Compact employee reference.

idint32

Employee ID

Example: 201
fullNamestring

Employee full name

Example: David Wilson
createdBy object

Compact employee reference.

idint32

Employee ID

Example: 201
fullNamestring

Employee full name

Example: David Wilson
updatedBy object

Compact employee reference.

idint32

Employee ID

Example: 201
fullNamestring

Employee full name

Example: David Wilson
deletedBy objectnullable

Employee who deleted the lead — pairs with deletedTimestamp. null when not deleted.

idint32

Employee ID

Example: 201
fullNamestring

Employee full name

Example: David Wilson
tagsstring[]

Tags attached to lead.

Example: ["VIP","New"]
fields object[]

Additional (custom) field values. Contact field values are not included here.

  • Array [
  • idint64

    Field ID this value belongs to

    Example: 1
    valuestring

    Simple value (as text)

    Example: VIP
    valueListstring[]

    Multiple values (for multi-select fields).

    Example: ["VIP","New"]
    valueTypeValueType

    Field value type enum.

    Possible values: [STREET, DISTRICT, DEFAULT]

    Default value: DEFAULT
    Example: DEFAULT
    typestring

    Field type (lowercased, e.g. text, select)

    Example: select
    infoTypeInfoType

    Which entity a field/value belongs to.

    • LED — the lead
    • CONTACT — the contact

    Possible values: [LED, CONTACT]

    Example: LED
    longitudedouble

    Geo coordinate: longitude (for location fields)

    Example: 69.2401
    latitudedouble

    Geo coordinate: latitude (for location fields)

    Example: 41.2995
    numbernumber

    Value for NUMBER fields. Populated instead of value.

    Example: 1500.5
    currencyIdint64

    Currency ID, present when the NUMBER field's format is CURRENCY.

    Example: 24
  • ]
  • contacts object[]

    Contacts attached to lead.

  • Array [
  • idint64

    Contact ID (null when creating)

    Example: 1001
    namestringrequired

    Contact name (required)

    Example: John Doe
    fields object[]

    Contact custom field values.

  • Array [
  • idint64

    Field ID this value belongs to

    Example: 1
    valuestring

    Simple value (as text)

    Example: VIP
    valueListstring[]

    Multiple values (for multi-select fields).

    Example: ["VIP","New"]
    valueTypeValueType

    Field value type enum.

    Possible values: [STREET, DISTRICT, DEFAULT]

    Default value: DEFAULT
    Example: DEFAULT
    typestring

    Field type (lowercased, e.g. text, select)

    Example: select
    infoTypeInfoType

    Which entity a field/value belongs to.

    • LED — the lead
    • CONTACT — the contact

    Possible values: [LED, CONTACT]

    Example: LED
    longitudedouble

    Geo coordinate: longitude (for location fields)

    Example: 69.2401
    latitudedouble

    Geo coordinate: latitude (for location fields)

    Example: 41.2995
    numbernumber

    Value for NUMBER fields. Populated instead of value.

    Example: 1500.5
    currencyIdint64

    Currency ID, present when the NUMBER field's format is CURRENCY.

    Example: 24
  • ]
  • typeContactType

    Contact type enum.

    Possible values: [SIMPLE, TELEGRAM, INSTAGRAM, WEBSITE, FACEBOOK, OTHER, CALL_PBX, MARKETPLACE, GOOGLE_SHEETS, WEB_FORM, WAZZUP, AMO_CRM, TELEGRAM_BUSINESS]

    Default value: SIMPLE
    Example: TELEGRAM
    accountIdstring

    Account ID (if available)

    Example: acc123
    usernamestring

    Username

    Example: johndoe
    phonesstring[]required

    Phone numbers (required, non-empty).

    Possible values: >= 1

    Example: ["+998901234567"]
    receiverIdstring

    Receiver ID (if available)

    Example: rec123
  • ]
  • attributions object[]

    Channel / UTM attributions, in attachment order (earliest first).

  • Array [
  • idint64

    Attribution ID

    Example: 5001
    channel object

    Channel a lead originated from.

    idint64

    Channel ID

    Example: 12
    sourceLeadChannelSource

    Channel a lead originated from. Serialized by name.

    Possible values: [INSTAGRAM, FACEBOOK, FACEBOOK_FORM, TELEGRAM, TELEGRAM_BUSINESS, TELEGRAM_BOT, WHATSAPP, WABA, VK, VIBER, AVITO, WEBSITE, AMO_CRM, ONLINE_PBX, UTEL, SIPUNI, ASTERISK, MOI_ZVONKI, WEB_FORM, EMPLOYEE, UNKNOWN]

    Example: INSTAGRAM
    channelValuestring

    Free-text channel identifier

    Example: ig-promo-2026
    utmData object

    UTM / tracking attribution data attached to a lead.

    utmSourcestring

    UTM source

    Example: instagram
    utmMediumstring

    UTM medium

    Example: cpc
    utmCampaignstring

    UTM campaign

    Example: spring_sale
    utmTermstring

    UTM term

    Example: apartment
    utmContentstring

    UTM content

    Example: banner_a
    fbcLidstring

    Facebook click ID (fbclid)

    Example: IwAR0...
    fbClientIpAddressstring

    Client IP address (Facebook CAPI)

    Example: 203.0.113.5
    fbClientUserAgentstring

    Client user agent (Facebook CAPI)

    Example: Mozilla/5.0 ...
    fbpstring

    Facebook browser ID (_fbp cookie)

    Example: fb.1.1672531200.1234567890
    attachedTimestampint64

    Time the attribution was attached (epoch seconds)

    Example: 1672531200
  • ]
  • contract object

    Compact contract reference embedded in LeadDTO as the contract field. Carries only contract identity and amounts — use GET /v1/open-api/contract/{id} with the id for the full contract.

    idint32

    Contract ID

    Example: 5001
    contractNumberstring

    Contract number

    Example: CNT-2023-001
    statusContractStatus

    Contract status enum.

    Possible values: [STARTED, ACTIVE, CANCELLED, FINISHED, TRANSFERRED]

    Example: ACTIVE
    amountdouble

    Original contract price (without discount)

    Example: 50000
    discountdouble

    Discount amount

    Example: 5000
    ccystring

    ISO code of the contract currency

    Default value: UZS
    Example: UZS
    reasonsForRefusal objectnullable

    Refusal (lost) reason attached when the lead was moved to a FAILED pipeline stage. null for leads that were never refused.

    idint64

    Refusal reason ID. 0 is the synthetic "no reason given" entry.

    Example: 14
    valuestring

    Reason text

    Example: Narx qimmat
    ordersint32

    Display order

    Example: 1
    createdTimestampint64

    Creation time (epoch seconds)

    Example: 1672531200
    updatedTimestampint64

    Last update time (epoch seconds)

    Example: 1672704000
    deletedTimestampint64nullable

    Deletion time (epoch seconds); null when the lead is not deleted.

    Example: null
    deletedboolean

    true when the lead is soft-deleted.

    Example: false
    currencyIdint32nullabledeprecated

    Deprecated — use currency.id.

    Example: 1
    pipeStatusIdint64deprecated

    Deprecated — use pipeStatus.id.

    Example: 1
    responsibleByIdint32nullabledeprecated

    Deprecated — use responsibleBy.id.

    Example: 101
    responsibleByNamestringnullabledeprecated

    Deprecated — use responsibleBy.fullName. The old plain-text responsibleBy value.

    Example: Alice Johnson
    LeadDTO
    {
    "id": 1001,
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "facebookLeadId": "1234567890123456",
    "name": "New apartment buyer",
    "balance": 5000,
    "currency": {
    "id": 1,
    "value": 1,
    "updateTimestamp": 1672531200,
    "basic": true,
    "ccy": "USD"
    },
    "pipeStatus": {
    "id": 979,
    "name": "New",
    "pipeId": 12,
    "pipeName": "Sales"
    },
    "responsibleBy": {
    "id": 201,
    "fullName": "David Wilson"
    },
    "createdBy": {
    "id": 201,
    "fullName": "David Wilson"
    },
    "updatedBy": {
    "id": 201,
    "fullName": "David Wilson"
    },
    "deletedBy": {
    "id": 201,
    "fullName": "David Wilson"
    },
    "tags": [
    "VIP",
    "New"
    ],
    "fields": [
    {
    "id": 1,
    "value": "VIP",
    "valueList": [
    "VIP",
    "New"
    ],
    "valueType": "DEFAULT",
    "type": "select",
    "infoType": "LED",
    "longitude": 69.2401,
    "latitude": 41.2995,
    "number": 1500.5,
    "currencyId": 24
    }
    ],
    "contacts": [
    {
    "id": 1001,
    "name": "John Doe",
    "fields": [
    {
    "id": 1,
    "value": "VIP",
    "valueList": [
    "VIP",
    "New"
    ],
    "valueType": "DEFAULT",
    "type": "select",
    "infoType": "LED",
    "longitude": 69.2401,
    "latitude": 41.2995,
    "number": 1500.5,
    "currencyId": 24
    }
    ],
    "type": "TELEGRAM",
    "accountId": "acc123",
    "username": "johndoe",
    "phones": [
    "+998901234567"
    ],
    "receiverId": "rec123"
    }
    ],
    "attributions": [
    {
    "id": 5001,
    "channel": {
    "id": 12,
    "source": "INSTAGRAM",
    "channelValue": "ig-promo-2026"
    },
    "utmData": {
    "utmSource": "instagram",
    "utmMedium": "cpc",
    "utmCampaign": "spring_sale",
    "utmTerm": "apartment",
    "utmContent": "banner_a",
    "fbcLid": "IwAR0...",
    "fbClientIpAddress": "203.0.113.5",
    "fbClientUserAgent": "Mozilla/5.0 ...",
    "fbp": "fb.1.1672531200.1234567890"
    },
    "attachedTimestamp": 1672531200
    }
    ],
    "contract": {
    "id": 5001,
    "contractNumber": "CNT-2023-001",
    "status": "ACTIVE",
    "amount": 50000,
    "discount": 5000,
    "ccy": "UZS"
    },
    "reasonsForRefusal": {
    "id": 14,
    "value": "Narx qimmat",
    "orders": 1
    },
    "createdTimestamp": 1672531200,
    "updatedTimestamp": 1672704000,
    "deletedTimestamp": null,
    "deleted": false
    }