POST api/Account
Creates a new account in SiteWit and returns all necessary data for linking in the Partner's internal systems.
Request Information
Authentication Method
Partner Authentication
-Or-
Sub Partner Authentication
URI Parameters
None.
Body Parameters
Account (Create)| Name | Description | Type | Additional information |
|---|---|---|---|
| url |
Site Url |
string |
Required A valid Url |
| businessType |
SMB unless otherwise indicated |
BusinessType |
Required |
| timeZone |
Time Zone of end user |
string |
Required A valid Time Zone |
| clientId |
Long or GUID for account identification in partner's system. Data type for this field is determined by clientIdType property. |
string |
|
| clientIdType |
Specifies the data type of the client id. GUID is the default. |
ClientIdType |
|
| partnerPackage |
String representation of the subscription level your customer has has your platform (e.g. Gold, Free, Premium, etc...) |
string |
String length: inclusive between 0 and 50 |
|
The contact email address |
string |
Required if username or userToken is not provided A valid email address |
|
| username |
Valid username, email 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 or would be unique. |
string |
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 |
| mobilePhone |
Used for SMS alerts about account |
string |
|
| userToken |
Use if client already has one account in SiteWit |
string |
|
| currency |
Currency for campaign spend reporting. Must be avilable option for the specified country. |
Currency |
Required |
| countryCode |
Country code of end user |
string |
Required A valid Country Code |
| settlementCurrency |
Currency for campaign spend settlement. Must be same as currency or USD. |
Currency |
|
Request Formats
application/json, text/json
{
"url": "http://www.domain.com",
"businessType": "SMB",
"timeZone": "Pacific Standard Time",
"clientId": "55555555-tttt-uuuu-vvvv-1234567890ab",
"clientIdType": "GUID",
"partnerPackage": "Free",
"email": "user@domain.com",
"username": "userId@partner.net",
"password": "xxxxxxxxxxxxxxx",
"name": "Norville Rogers",
"mobilePhone": null,
"userToken": "uuuuuuuuuuUuuuuuuuuu",
"currency": "USD",
"countryCode": "US",
"settlementCurrency": "Undefined"
}
application/xml, text/xml
<Account xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.CreateModels"> <businessType>SMB</businessType> <clientId>55555555-tttt-uuuu-vvvv-1234567890ab</clientId> <clientIdType>GUID</clientIdType> <countryCode>US</countryCode> <currency>USD</currency> <email>user@domain.com</email> <mobilePhone i:nil="true" /> <name>Norville Rogers</name> <partnerPackage>Free</partnerPackage> <password>xxxxxxxxxxxxxxx</password> <settlementCurrency>Undefined</settlementCurrency> <timeZone>Pacific Standard Time</timeZone> <url>http://www.domain.com</url> <userToken>uuuuuuuuuuUuuuuuuuuu</userToken> <username>userId@partner.net</username> </Account>
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>
