MngUpdateLead¶
Updates the fields of one lead.
The command is available through the manager command API only; there is no REST
path for it. The kind is fixed by the command name, so customer_kind is not
accepted on input. See
Clients and Leads Commands. Changing the kind is the job of
MngConvertLeadToClient and
MngConvertClientToLead.
It replaces the deprecated MngUpdateCustomer. The password is not changed here; use MngSetLeadPassword.
Access Control¶
Allowed sessions:
SESSION_MANAGERSESSION_ADMINSESSION_DEALERSESSION_CRM_MANAGERSESSION_CRM_ADMIN
The caller must have CRM access and set_leads. Both the current record and the
target brand and desk must be inside the manager scope; admin scope bypasses
this check.
Changing email or phone additionally requires set_leads_contacts. If the manager
does not have see_leads_contacts, contact fields in the response are masked.
Request¶
{
"command": "MngUpdateLead",
"extID": "1",
"data": {
"customer_id": 1,
"lifecycle_flags": 5,
"crm_stage": "qualified",
"assigned_manager_id": 10,
"deposit_allowed": 1
}
}
Request Data¶
customer_id is required; everything else is optional and only the supplied
fields are written. customer_kind is not accepted.
| Field | Type | Required | Limits |
|---|---|---|---|
customer_id |
int | Yes | 1 or greater |
The optional fields are the same set as in MngAddLead:
| Field | Type | Limits |
|---|---|---|
customer_id |
int | 0 or greater. 0 or omitted lets the server assign one |
brand |
string | Up to 64 characters |
desk |
string | Up to 64 characters |
manager_id |
int | 0 or greater |
type |
int | 0..1: 0 individual, 1 business |
status |
int | 0..2: 0 active, 1 blocked, 2 archived |
lifecycle_flags |
int64 | 0 or greater. Only the lower bound is checked here |
source_type |
int | 0..4: 0 manual, 1 web, 2 import, 3 affiliate, 4 system |
landing_url, referrer_url |
string | Up to 2048 characters |
utm_source, utm_medium, utm_campaign, utm_content, utm_term |
string | Up to 255 characters |
import_batch_id, old_id |
string | Up to 255 characters |
first_contact_time, archive_time, created_time |
int64 | 0 or greater |
deposit_allowed, withdrawal_allowed |
int | 0..1 |
pep_status |
int | 0..2 |
sanctions_status |
int | 0..3 |
risk_level |
int | 0..2 |
aml_status |
int | 0..3 |
kyc_status, sales_status, risk_status, finance_status |
int | 0 or greater, dictionary ids |
password |
string | 6 to 128 characters |
Contact and personal fields are accepted as well: first_name, last_name,
middle_name, full_name, birth_date, citizenship, country_of_residence,
email, phone, preferred_language, timezone, and the CRM classification
fields crm_stage, segment, tags_json, lead_source, campaign,
affiliate_id, introducer_id, meta_json. Their meanings are listed in
Customer Fields.
Response Data¶
{
"customer": {
"customer_id": 1,
"lifecycle_flags": 5,
"customer_kind": 0,
"conversion_flags": 0,
"crm_stage": "qualified",
"assigned_manager_id": 10,
"deposit_allowed": 1
}
}
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
RET_INVALID_DATA |
The customer exists but is not a lead |
400 |
INVALID_DESK |
desk does not exist, is disabled, archived, or belongs to another brand |
403 |
RET_NOT_ENOUGH_RIGHTS |
Missing permission, missing scope, or the record is outside the caller's visibility |
404 |
RET_NOT_FOUND |
No customer with that identifier exists |
Every error carries a message field with free-form text. Its contents are not
part of the contract; branch on error.