1

Hierarchy of all parent account Details

Тема: Hierarchy of all parent account Details

As per the Gurtam account creation hierarchy, we have created one Top account and under that Top account we have created one manager account and under that manager account, we have created 3 client account.
    Then we have created one user under one client and when we used "account/get_account_data" remote API we are able to get its client account name and it's id but as per our company i.e. Yusata we want the hierarchy of all parent account details like it's manager account and top account details.

I have used this API: https://hst-api.wialon.com/wialon/ajax.html?svc=account/get_account_data&params={"itemId":xxxx,"type":2}&sid=xxxxxxxxxxxx

And in the response, I am getting this below response:
          {
    "parentAccountName":<text>, /* parent account name */
    "parentAccountId":<long>,   /* parent account id */
    "parentEnabled":<bool>,      
    "plan":<text>,       
    "enabled":<int>,   
    "flags":<uint>,       
    "created":<unit>,   
    "balance":<text>,   
    "daysCounter":<uint>,   
    "settings":{
        "balance":<double>,   
        "plan":{       
            "flags":<uint>,       
           ...................................................
          }

In this upper response, I am getting only client Name or it's ParentAccountName but As per our platform, we want the hierarchy of all parent accounts like it's Top account, Manager account and client Account details.
So, please provide us a solution to this requirement.