MngGetLeadAccounts¶
Returns the trading accounts linked to 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.
It replaces the deprecated MngGetCustomerAccounts.
Access Control¶
Allowed sessions:
SESSION_MANAGERSESSION_ADMINSESSION_DEALERSESSION_CRM_MANAGERSESSION_CRM_ADMIN
The caller must have CRM access and see_leads. The record brand and desk must
be inside the manager scope; see_all_leads widens the desk scope within the brand.
If the manager does not have see_leads_contacts, account email and phone are
returned masked.
Request¶
{
"command": "MngGetLeadAccounts",
"extID": "1",
"data": {
"customer_id": 1
}
}
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
customer_id |
int | Yes | Target customer id, 1 or greater |
Response Data¶
{
"rows": [
{
"login": 100001,
"customer_id": 1,
"group": "STD-USD",
"currency": "USD",
"leverage": 100,
"enable": 1,
"balance": 1500.0
}
],
"count": 1
}
| Field | Type | Description |
|---|---|---|
rows |
array | Linked trading accounts |
count |
int | Number of linked accounts |
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
RET_INVALID_DATA |
The customer exists but is not a lead |
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.