Skip to content

MngGetClientByLogin

Returns the client linked to a trading account login.

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 MngGetCustomerByLogin.

Access Control

Allowed sessions:

  • SESSION_MANAGER
  • SESSION_ADMIN
  • SESSION_DEALER
  • SESSION_CRM_MANAGER
  • SESSION_CRM_ADMIN

The caller must have CRM access and see_clients. The linked record brand and desk must be inside the manager scope; see_all_clients widens the desk scope within the brand.

If the manager does not have see_clients_contacts, email and phone are returned masked.

Request

{
  "command": "MngGetClientByLogin",
  "extID": "1",
  "data": {
    "login": 100001
  }
}

Request Data

Field Type Required Description
login int Yes Trading account login, 1 or greater

Response Data

{
  "customer": {
    "customer_id": 1,
    "full_name": "John Smith",
    "lifecycle_flags": 5,
    "customer_kind": 1,
    "conversion_flags": 1
  }
}

Two Different Failures for a Login

The status codes separate the two cases, and a client has to tell them apart:

HTTP Error Meaning
404 RET_NOT_FOUND No customer is linked to that login at all, or the account has customer_id = 0
400 RET_INVALID_DATA A customer is linked, but it is a lead. Call MngGetLeadByLogin instead

Errors

HTTP Error Description
400 INVALID_DATA Request validation failed
400 RET_INVALID_DATA The customer exists but is not a client
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.