PUT api/v1/admin/accounts/{id}

This method updates an existing account specified by the account Id in the URL. The system will check that the user has permission to update the account and that the account Id is valid. This method does not use all of the parameters of the Account model below. This method uses the following: Address, ContactNumber, Disclaimer, EmailAddress, FirstName, LanguageID, LastName, Logo, LogoName, Name, SMSPassword, SMSUsername, TimeZone, TwoFactorEnabled, Website

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The Id of the account to update its details.

globally unique identifier

Required

Body Parameters

Either xml or json request.

TwoSms.CustomerPortalRole.API.Admin.Accounts.Account
NameDescriptionTypeAdditional information
ID

The unique identifier for the account.

globally unique identifier

None.

AccountID

The unique identifier for the parent account.

globally unique identifier

None.

Address

The address of the account.

string

None.

AnyTimeBalance

The anytime balance of the account.

decimal number

None.

ContactNumber

The contact number for the account.

string

Matching regular expression pattern: ^(?=.*?\d.*?\d.*?\d.*?\d.*?\d)([+]?)([\d\s\(\)-]{5,20})$

PhoneNumber

The contact number for the account.

string

Matching regular expression pattern: ^(?=.*?\d.*?\d.*?\d.*?\d.*?\d)([+]?)([\d\s\(\)-]{5,20})$

DateCreated

The date the account was created

date

None.

DateModified

The date the account was last modified

date

None.

Disclaimer

The text that is displayed at the bottom of the advanced messages.

string

None.

EmailAddress

The main email address for the account.

string

Required

LanguageID

The default language Id for the account.

globally unique identifier

None.

LanguageName

The name of the language

string

None.

Location

The country of the account.

string

None.

Logo

Base64 encoded string containing the logo that is displayed on advanced messages

string

None.

LogoName

The name of the logo file that is displayed on the web interface

string

None.

Name

The company name of the account.

string

Required

OffPeakBalance

The off peak balance of the account.

decimal number

None.

Preferences

Determines how the UI of SMS+ plus is displayed for this account. Provide a list of all preferences you wish to set on the account. Any preferences set previously will be overwritten with the preferences set on the request.

Collection of TwoSms.CustomerPortalRole.API.Admin.Accounts.AccountPreferences

None.

SMSPassword

The password the account's 2sms account.

string

Required

SMSUsername

The username for the account's 2sms account.

string

Required

TimeZone

The default time zone for the account.

string

Required

TwoFactorEnabled

Determines if two factor authentication has been enabled on the account.

boolean

None.

URL

string

None.

Website

The URL of the website for the account.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ID": "f437ae78-611f-4689-95ef-8806fb89543b",
  "AccountID": "42eecb46-265e-4df9-a2fe-cb44e6e5e162",
  "Address": "sample string 2",
  "AnyTimeBalance": 1.1,
  "ContactNumber": "sample string 3",
  "PhoneNumber": "sample string 4",
  "DateCreated": "2018-12-17T03:42:47.8240639+00:00",
  "DateModified": "2018-12-17T03:42:47.8240639+00:00",
  "Disclaimer": "sample string 6",
  "EmailAddress": "sample string 8",
  "FirstName": "sample string 10",
  "LanguageID": "03fe3a3d-e512-457f-871e-ad47fcc9ffd4",
  "LanguageName": "sample string 12",
  "LastName": "sample string 13",
  "Location": "sample string 14",
  "Logo": "sample string 15",
  "LogoName": "sample string 17",
  "Name": "sample string 18",
  "OffPeakBalance": 1.1,
  "Preferences": [
    0,
    0
  ],
  "SMSPassword": "sample string 19",
  "SMSUsername": "sample string 20",
  "TimeZone": "sample string 21",
  "TwoFactorEnabled": true,
  "URL": "sample string 22",
  "Website": "sample string 24"
}

application/xml, text/xml

Sample:
<Account xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ID>f437ae78-611f-4689-95ef-8806fb89543b</ID>
  <AccountID>42eecb46-265e-4df9-a2fe-cb44e6e5e162</AccountID>
  <Address>sample string 2</Address>
  <AnyTimeBalance>1.1</AnyTimeBalance>
  <ContactNumber>sample string 3</ContactNumber>
  <PhoneNumber>sample string 4</PhoneNumber>
  <DateCreated>2018-12-17T03:42:47.8240639+00:00</DateCreated>
  <DateModified>2018-12-17T03:42:47.8240639+00:00</DateModified>
  <Disclaimer>sample string 6</Disclaimer>
  <DisclaimerRemove>true</DisclaimerRemove>
  <EmailAddress>sample string 8</EmailAddress>
  <Enabled>true</Enabled>
  <FirstName>sample string 10</FirstName>
  <LanguageID>03fe3a3d-e512-457f-871e-ad47fcc9ffd4</LanguageID>
  <LanguageName>sample string 12</LanguageName>
  <LastName>sample string 13</LastName>
  <Location>sample string 14</Location>
  <Logo>sample string 15</Logo>
  <LogoRemoved>true</LogoRemoved>
  <LogoName>sample string 17</LogoName>
  <Name>sample string 18</Name>
  <OffPeakBalance>1.1</OffPeakBalance>
  <Preferences>
    <AccountPreferences>ALL</AccountPreferences>
    <AccountPreferences>ALL</AccountPreferences>
  </Preferences>
  <SMSPassword>sample string 19</SMSPassword>
  <SMSUsername>sample string 20</SMSUsername>
  <TimeZone>sample string 21</TimeZone>
  <TwoFactorEnabled>true</TwoFactorEnabled>
  <URL>sample string 22</URL>
  <Users>
    <AccountUserInfo>
      <UserID>4436267e-b8d8-47c9-afe6-3359f3e8bf6c</UserID>
      <Name>sample string 2</Name>
      <PermissionLevel>STANDARD_USER</PermissionLevel>
    </AccountUserInfo>
    <AccountUserInfo>
      <UserID>4436267e-b8d8-47c9-afe6-3359f3e8bf6c</UserID>
      <Name>sample string 2</Name>
      <PermissionLevel>STANDARD_USER</PermissionLevel>
    </AccountUserInfo>
  </Users>
  <Validated>true</Validated>
  <Website>sample string 24</Website>
</Account>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Status message of the request

TwoSms.CustomerPortalRole.API.Misc.ResponseOfSystem.Object
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfSystem.Object

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": {}
  }
}

application/xml, text/xml

Sample:
<ResponseOfObject 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 />
  </ResponseData>
</ResponseOfObject>