PUT api/Account/Owner
Changes an account's owner. This will disassociate the previous owner from the account.
Request Information
Authentication Method
Partner/Account AuthenticationURI Parameters
None.
Body Parameters
The user who should become the owner of the account
UserInfo| Name | Description | Type | Additional information |
|---|---|---|---|
| username |
Valid username or user token is required. This username must be unique so it is required to be in email format though it need not be a working email address. It is recommended that you use a unique identifier at some domain you own o would be unique. |
string |
Required if userToken or email is not provided A valid email address |
|
Valid email address or user token is required |
string |
Required if username or userToken is not provided A valid email address |
|
| password |
Password for site access w/o SSO. If not supplied, one will be auto generated. |
string |
|
| name |
Name of end user |
string |
Required if userToken is not provided String length: inclusive between 2 and 255 |
| userToken |
Use if client already has one account in SiteWit |
string |
Required if username or email is not provided |
| mobilePhone |
Used for SMS alerts about account |
string |
|
Request Formats
application/json, text/json
{
"username": "sample string 1",
"email": "sample string 2",
"password": "sample string 3",
"name": "sample string 4",
"userToken": "sample string 5",
"mobilePhone": "sample string 6"
}
application/xml, text/xml
<UserInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.UpdateModels"> <email>sample string 2</email> <mobilePhone>sample string 6</mobilePhone> <name>sample string 4</name> <password>sample string 3</password> <userToken>sample string 5</userToken> <username>sample string 1</username> </UserInfo>
Response Information
Successful Response:Resource Description
Account| Name | Description | Type | Additional information |
|---|---|---|---|
| accountInfo | Account Info |
|
|
| userInfo | User Info |
|
Response Formats
application/json, text/json
{
"accountInfo": {
"accountNumber": 99999,
"url": "http://www.domain.com",
"countryCode": "US",
"timeZone": "Pacific Standard Time",
"currency": "USD",
"clientId": "55555555-tttt-uuuu-vvvv-1234567890ab",
"clientIdType": "GUID",
"partnerPackage": "Free",
"jsCode": "<script type=\"text/javascript\">\r\nvar _swaMa =[\"99999\",\"55555555-tttt-uuuu-vvvv-1234567890ab\"];\"undefined\"==typeof sw&&!function(e, s, a){function t(){for(;o[0]&&\"loaded\"==o[0][d];)i=o.shift(),i[w]=!c.parentNode.insertBefore(i,c)}for(var r,n,i,o=[],c=e.scripts[0],w=\"onreadystatechange\",d=\"readyState\";r=a.shift();)n=e.createElement(s),\"async\"in c?(n.async=!1,e.head.appendChild(n)):c[d]?(o.push(n), n[w]=t): e.write(\"<\" + s +' src=\"'+r+'\" defer></'+s+\">\"),n.src=r}(document,\"script\",[\"//analytics.sitewit.com/v3/\"+_swaMa[0]+\"/sw.js\"]);\r\n</script>\r\n",
"token": "uuuuuuuuuUuuuuuuuuuu",
"status": "Active",
"partnerRemoteId": "p-14523224",
"settlementCurrency": "USD"
},
"userInfo": {
"username": "userId@partner.net",
"email": "user@domain.com",
"name": "Norville Rogers",
"token": "uuuuuuuuuuUuuuuuuuuu",
"roles": [
"Owner",
"Administrator"
],
"mobilePhone": null
}
}
application/xml, text/xml
<Account xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.ReturnModels">
<accountInfo>
<accountNumber>99999</accountNumber>
<clientId>55555555-tttt-uuuu-vvvv-1234567890ab</clientId>
<clientIdType>GUID</clientIdType>
<countryCode>US</countryCode>
<currency>USD</currency>
<jsCode><script type="text/javascript">
var _swaMa =["99999","55555555-tttt-uuuu-vvvv-1234567890ab"];"undefined"==typeof sw&&!function(e, s, a){function t(){for(;o[0]&&"loaded"==o[0][d];)i=o.shift(),i[w]=!c.parentNode.insertBefore(i,c)}for(var r,n,i,o=[],c=e.scripts[0],w="onreadystatechange",d="readyState";r=a.shift();)n=e.createElement(s),"async"in c?(n.async=!1,e.head.appendChild(n)):c[d]?(o.push(n), n[w]=t): e.write("<" + s +' src="'+r+'" defer></'+s+">"),n.src=r}(document,"script",["//analytics.sitewit.com/v3/"+_swaMa[0]+"/sw.js"]);
</script>
</jsCode>
<partnerPackage>Free</partnerPackage>
<partnerRemoteId>p-14523224</partnerRemoteId>
<settlementCurrency>USD</settlementCurrency>
<status>Active</status>
<timeZone>Pacific Standard Time</timeZone>
<token>uuuuuuuuuUuuuuuuuuuu</token>
<url>http://www.domain.com</url>
</accountInfo>
<userInfo>
<email>user@domain.com</email>
<mobilePhone i:nil="true" />
<name>Norville Rogers</name>
<roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>Owner</d3p1:string>
<d3p1:string>Administrator</d3p1:string>
</roles>
<token>uuuuuuuuuuUuuuuuuuuu</token>
<username>userId@partner.net</username>
</userInfo>
</Account>
