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
Name | Description | Type | Additional 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[]Name | Description | Type | Additional information |
---|---|---|---|
Error | Error |
None. |
|
ResponseData | ResponseDataOfAccount[] |
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": "b0301af2-da5c-4ded-bb67-f4e79256ee75", "AccountID": "7affce7a-e11c-4638-847b-e386ae765ce2", "Address": "sample string 2", "AnyTimeBalance": 1.1, "ContactNumber": "sample string 3", "PhoneNumber": "sample string 4", "DateCreated": "2024-11-21T06:59:15.3913681+00:00", "DateModified": "2024-11-21T06:59:15.3913681+00:00", "Disclaimer": "sample string 6", "EmailAddress": "sample string 8", "FirstName": "sample string 10", "Defaultheader": "sample string 11", "LanguageID": "64755c22-b53e-46ba-bf43-95ecbd7d834e", "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": "b0301af2-da5c-4ded-bb67-f4e79256ee75", "AccountID": "7affce7a-e11c-4638-847b-e386ae765ce2", "Address": "sample string 2", "AnyTimeBalance": 1.1, "ContactNumber": "sample string 3", "PhoneNumber": "sample string 4", "DateCreated": "2024-11-21T06:59:15.3913681+00:00", "DateModified": "2024-11-21T06:59:15.3913681+00:00", "Disclaimer": "sample string 6", "EmailAddress": "sample string 8", "FirstName": "sample string 10", "Defaultheader": "sample string 11", "LanguageID": "64755c22-b53e-46ba-bf43-95ecbd7d834e", "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>b0301af2-da5c-4ded-bb67-f4e79256ee75</ID> <AccountID>7affce7a-e11c-4638-847b-e386ae765ce2</AccountID> <Address>sample string 2</Address> <AnyTimeBalance>1.1</AnyTimeBalance> <ContactNumber>sample string 3</ContactNumber> <PhoneNumber>sample string 4</PhoneNumber> <DateCreated>2024-11-21T06:59:15.3913681+00:00</DateCreated> <DateModified>2024-11-21T06:59:15.3913681+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>64755c22-b53e-46ba-bf43-95ecbd7d834e</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>f497c752-d4d8-499d-8c4e-90105bdb826b</UserID> <Name>sample string 2</Name> <PermissionLevel>STANDARD_USER</PermissionLevel> </AccountUserInfo> <AccountUserInfo> <UserID>f497c752-d4d8-499d-8c4e-90105bdb826b</UserID> <Name>sample string 2</Name> <PermissionLevel>STANDARD_USER</PermissionLevel> </AccountUserInfo> </Users> <Validated>true</Validated> <Website>sample string 26</Website> </Account> <Account> <ID>b0301af2-da5c-4ded-bb67-f4e79256ee75</ID> <AccountID>7affce7a-e11c-4638-847b-e386ae765ce2</AccountID> <Address>sample string 2</Address> <AnyTimeBalance>1.1</AnyTimeBalance> <ContactNumber>sample string 3</ContactNumber> <PhoneNumber>sample string 4</PhoneNumber> <DateCreated>2024-11-21T06:59:15.3913681+00:00</DateCreated> <DateModified>2024-11-21T06:59:15.3913681+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>64755c22-b53e-46ba-bf43-95ecbd7d834e</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>f497c752-d4d8-499d-8c4e-90105bdb826b</UserID> <Name>sample string 2</Name> <PermissionLevel>STANDARD_USER</PermissionLevel> </AccountUserInfo> <AccountUserInfo> <UserID>f497c752-d4d8-499d-8c4e-90105bdb826b</UserID> <Name>sample string 2</Name> <PermissionLevel>STANDARD_USER</PermissionLevel> </AccountUserInfo> </Users> <Validated>true</Validated> <Website>sample string 26</Website> </Account> </Detail> </ResponseData> </ResponseOfArrayOfAccount>