GET api/v2/admin/accounts/{id}

This method retrieves the account details for the given account id. The method will return data only if the authenticated user is authorised to access the account, else it will return a HTTP 401 error.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The Id of the account

globally unique identifier

Required

Body Parameters

None.

Response Information

Resource Description

Account details for the given account id.

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.Admin.Accounts.AccountV2
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.Admin.Accounts.AccountV2

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": {
      "CountryCode": "sample string 1",
      "NDD": "sample string 2",
      "IDD": "sample string 3",
      "Timeout": 4,
      "ID": "1782618e-2bc5-4dac-84c8-7c511bd663c0",
      "AccountID": "26d90288-0954-4cb0-bfab-33f9b894cec6",
      "Address": "sample string 6",
      "AnyTimeBalance": 1.1,
      "ContactNumber": "sample string 7",
      "PhoneNumber": "sample string 8",
      "DateCreated": "2018-10-23T02:44:31.065276+01:00",
      "DateModified": "2018-10-23T02:44:31.065276+01:00",
      "Disclaimer": "sample string 10",
      "EmailAddress": "sample string 11",
      "FirstName": "sample string 13",
      "LanguageID": "4a52bf3a-6f37-4eb7-ba07-c855915b7c2f",
      "LanguageName": "sample string 15",
      "LastName": "sample string 16",
      "Location": "sample string 17",
      "Logo": "sample string 18",
      "LogoName": "sample string 19",
      "Name": "sample string 20",
      "OffPeakBalance": 1.1,
      "Preferences": [
        0,
        0
      ],
      "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:
<ResponseOfAccountV2 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>
      <ID>1782618e-2bc5-4dac-84c8-7c511bd663c0</ID>
      <AccountID>26d90288-0954-4cb0-bfab-33f9b894cec6</AccountID>
      <Address>sample string 6</Address>
      <AnyTimeBalance>1.1</AnyTimeBalance>
      <ContactNumber>sample string 7</ContactNumber>
      <PhoneNumber>sample string 8</PhoneNumber>
      <DateCreated>2018-10-23T02:44:31.065276+01:00</DateCreated>
      <DateModified>2018-10-23T02:44:31.065276+01:00</DateModified>
      <Disclaimer>sample string 10</Disclaimer>
      <EmailAddress>sample string 11</EmailAddress>
      <Enabled>true</Enabled>
      <FirstName>sample string 13</FirstName>
      <LanguageID>4a52bf3a-6f37-4eb7-ba07-c855915b7c2f</LanguageID>
      <LanguageName>sample string 15</LanguageName>
      <LastName>sample string 16</LastName>
      <Location>sample string 17</Location>
      <Logo>sample string 18</Logo>
      <LogoName>sample string 19</LogoName>
      <Name>sample string 20</Name>
      <OffPeakBalance>1.1</OffPeakBalance>
      <Preferences>
        <AccountPreferences>ALL</AccountPreferences>
        <AccountPreferences>ALL</AccountPreferences>
      </Preferences>
      <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>4095f1f6-7c0b-459e-a02d-cdbf7dea3727</UserID>
          <Name>sample string 2</Name>
          <PermissionLevel>STANDARD_USER</PermissionLevel>
        </AccountUserInfo>
        <AccountUserInfo>
          <UserID>4095f1f6-7c0b-459e-a02d-cdbf7dea3727</UserID>
          <Name>sample string 2</Name>
          <PermissionLevel>STANDARD_USER</PermissionLevel>
        </AccountUserInfo>
      </Users>
      <Validated>true</Validated>
      <Website>sample string 26</Website>
      <CountryCode>sample string 1</CountryCode>
      <NDD>sample string 2</NDD>
      <IDD>sample string 3</IDD>
      <Timeout>4</Timeout>
    </Detail>
  </ResponseData>
</ResponseOfAccountV2>