GET api/v1/admin/accounts/{id}/accounts?Name={Name}&MobilePhone={MobilePhone}&EmailAddress={EmailAddress}

This method retrieves all the accounts that the authenticated user is allowed to view. It will return the master account first, followed by all the sub-accounts that the user has been granted access. The sub-accounts are order by the name field. The method will return data only if the authenticated user is authorised to access the accounts, else it will return a HTTP 401 error.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The parent account.

globally unique identifier

Required

Name

Full name of the sub account

string

None.

MobilePhone

Mobile phone number of the sub account

string

None.

EmailAddress

Email address of the sub account

string

None.

Body Parameters

None.

Response Information

Resource Description

List of accounts that the authenticated user is allowed to view.

ResponseOfAccount[]
NameDescriptionTypeAdditional information
Error

Error

None.

ResponseData

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": [
      {
        "ID": "166895e9-dcfd-45dd-88ad-bfa151618f69",
        "AccountID": "5234d412-a594-465a-83de-3f2f8114026b",
        "Address": "sample string 2",
        "AnyTimeBalance": 1.1,
        "ContactNumber": "sample string 3",
        "PhoneNumber": "sample string 4",
        "DateCreated": "2024-12-22T21:21:37.8434644+00:00",
        "DateModified": "2024-12-22T21:21:37.8434644+00:00",
        "Disclaimer": "sample string 6",
        "EmailAddress": "sample string 8",
        "FirstName": "sample string 10",
        "Defaultheader": "sample string 11",
        "LanguageID": "f65a0805-175c-489c-aef7-4635ffec6d7c",
        "LanguageName": "sample string 13",
        "LastName": "sample string 14",
        "Location": "sample string 15",
        "Logo": "sample string 16",
        "LogoName": "sample string 18",
        "Name": "sample string 19",
        "OffPeakBalance": 1.1,
        "Preferences": [
          0,
          0
        ],
        "SCIMEnabled": true,
        "SMSPassword": "sample string 21",
        "SMSUsername": "sample string 22",
        "TimeZone": "sample string 23",
        "TwoFactorEnabled": true,
        "URL": "sample string 24",
        "Website": "sample string 26"
      },
      {
        "ID": "166895e9-dcfd-45dd-88ad-bfa151618f69",
        "AccountID": "5234d412-a594-465a-83de-3f2f8114026b",
        "Address": "sample string 2",
        "AnyTimeBalance": 1.1,
        "ContactNumber": "sample string 3",
        "PhoneNumber": "sample string 4",
        "DateCreated": "2024-12-22T21:21:37.8434644+00:00",
        "DateModified": "2024-12-22T21:21:37.8434644+00:00",
        "Disclaimer": "sample string 6",
        "EmailAddress": "sample string 8",
        "FirstName": "sample string 10",
        "Defaultheader": "sample string 11",
        "LanguageID": "f65a0805-175c-489c-aef7-4635ffec6d7c",
        "LanguageName": "sample string 13",
        "LastName": "sample string 14",
        "Location": "sample string 15",
        "Logo": "sample string 16",
        "LogoName": "sample string 18",
        "Name": "sample string 19",
        "OffPeakBalance": 1.1,
        "Preferences": [
          0,
          0
        ],
        "SCIMEnabled": true,
        "SMSPassword": "sample string 21",
        "SMSUsername": "sample string 22",
        "TimeZone": "sample string 23",
        "TwoFactorEnabled": true,
        "URL": "sample string 24",
        "Website": "sample string 26"
      }
    ]
  }
}

application/xml, text/xml

Sample:
<ResponseOfArrayOfAccount xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <Account>
        <ID>166895e9-dcfd-45dd-88ad-bfa151618f69</ID>
        <AccountID>5234d412-a594-465a-83de-3f2f8114026b</AccountID>
        <Address>sample string 2</Address>
        <AnyTimeBalance>1.1</AnyTimeBalance>
        <ContactNumber>sample string 3</ContactNumber>
        <PhoneNumber>sample string 4</PhoneNumber>
        <DateCreated>2024-12-22T21:21:37.8434644+00:00</DateCreated>
        <DateModified>2024-12-22T21:21:37.8434644+00:00</DateModified>
        <Disclaimer>sample string 6</Disclaimer>
        <DisclaimerRemove>true</DisclaimerRemove>
        <EmailAddress>sample string 8</EmailAddress>
        <Enabled>true</Enabled>
        <FirstName>sample string 10</FirstName>
        <Defaultheader>sample string 11</Defaultheader>
        <LanguageID>f65a0805-175c-489c-aef7-4635ffec6d7c</LanguageID>
        <LanguageName>sample string 13</LanguageName>
        <LastName>sample string 14</LastName>
        <Location>sample string 15</Location>
        <Logo>sample string 16</Logo>
        <LogoRemoved>true</LogoRemoved>
        <LogoName>sample string 18</LogoName>
        <Name>sample string 19</Name>
        <OffPeakBalance>1.1</OffPeakBalance>
        <Preferences>
          <AccountPreferences>ALL</AccountPreferences>
          <AccountPreferences>ALL</AccountPreferences>
        </Preferences>
        <SCIMEnabled>true</SCIMEnabled>
        <SMSPassword>sample string 21</SMSPassword>
        <SMSUsername>sample string 22</SMSUsername>
        <TimeZone>sample string 23</TimeZone>
        <TwoFactorEnabled>true</TwoFactorEnabled>
        <URL>sample string 24</URL>
        <Users>
          <AccountUserInfo>
            <UserID>45432057-7602-4801-93ba-4d317e61fb2a</UserID>
            <Name>sample string 2</Name>
            <PermissionLevel>STANDARD_USER</PermissionLevel>
          </AccountUserInfo>
          <AccountUserInfo>
            <UserID>45432057-7602-4801-93ba-4d317e61fb2a</UserID>
            <Name>sample string 2</Name>
            <PermissionLevel>STANDARD_USER</PermissionLevel>
          </AccountUserInfo>
        </Users>
        <Validated>true</Validated>
        <Website>sample string 26</Website>
      </Account>
      <Account>
        <ID>166895e9-dcfd-45dd-88ad-bfa151618f69</ID>
        <AccountID>5234d412-a594-465a-83de-3f2f8114026b</AccountID>
        <Address>sample string 2</Address>
        <AnyTimeBalance>1.1</AnyTimeBalance>
        <ContactNumber>sample string 3</ContactNumber>
        <PhoneNumber>sample string 4</PhoneNumber>
        <DateCreated>2024-12-22T21:21:37.8434644+00:00</DateCreated>
        <DateModified>2024-12-22T21:21:37.8434644+00:00</DateModified>
        <Disclaimer>sample string 6</Disclaimer>
        <DisclaimerRemove>true</DisclaimerRemove>
        <EmailAddress>sample string 8</EmailAddress>
        <Enabled>true</Enabled>
        <FirstName>sample string 10</FirstName>
        <Defaultheader>sample string 11</Defaultheader>
        <LanguageID>f65a0805-175c-489c-aef7-4635ffec6d7c</LanguageID>
        <LanguageName>sample string 13</LanguageName>
        <LastName>sample string 14</LastName>
        <Location>sample string 15</Location>
        <Logo>sample string 16</Logo>
        <LogoRemoved>true</LogoRemoved>
        <LogoName>sample string 18</LogoName>
        <Name>sample string 19</Name>
        <OffPeakBalance>1.1</OffPeakBalance>
        <Preferences>
          <AccountPreferences>ALL</AccountPreferences>
          <AccountPreferences>ALL</AccountPreferences>
        </Preferences>
        <SCIMEnabled>true</SCIMEnabled>
        <SMSPassword>sample string 21</SMSPassword>
        <SMSUsername>sample string 22</SMSUsername>
        <TimeZone>sample string 23</TimeZone>
        <TwoFactorEnabled>true</TwoFactorEnabled>
        <URL>sample string 24</URL>
        <Users>
          <AccountUserInfo>
            <UserID>45432057-7602-4801-93ba-4d317e61fb2a</UserID>
            <Name>sample string 2</Name>
            <PermissionLevel>STANDARD_USER</PermissionLevel>
          </AccountUserInfo>
          <AccountUserInfo>
            <UserID>45432057-7602-4801-93ba-4d317e61fb2a</UserID>
            <Name>sample string 2</Name>
            <PermissionLevel>STANDARD_USER</PermissionLevel>
          </AccountUserInfo>
        </Users>
        <Validated>true</Validated>
        <Website>sample string 26</Website>
      </Account>
    </Detail>
  </ResponseData>
</ResponseOfArrayOfAccount>