PUT api/Account
Updates an account's info. The update will fail if an attempt to adjust the currecny setting is made on an account that has already created a campaign subscription. Once a campaign subscription has been created the account's currency cannot be changed via the API. Any change to the account url will update the destination urls for the campaigns on the account.
Request Information
Authentication Method
Partner/Account AuthenticationURI Parameters
None.
Body Parameters
Account Info (Update)Name | Description | Type | Additional information |
---|---|---|---|
url |
Site Url |
string |
A valid Url |
countryCode |
Country code of end user. Cannot be changed after a campaign subscription has been created. |
string |
A valid Country Code |
timeZone |
Time Zone of end user |
string |
A valid Time Zone |
partnerPackage |
String representation of the subscription level your customer has has your platform (e.g. Gold, Free, Premium, etc...) |
string |
|
currency |
Currency for campaign spend settlement. Must be avilable option for the specified country. Cannot be changed after a campaign subscription has been created. |
Currency |
|
Request Formats
application/json, text/json
{ "url": "http://www.domain.com", "countryCode": "US", "timeZone": "Pacific Standard Time", "partnerPackage": null, "currency": "USD" }
application/xml, text/xml
<AccountInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.UpdateModels"> <countryCode>US</countryCode> <currency>USD</currency> <partnerPackage i:nil="true" /> <timeZone>Pacific Standard Time</timeZone> <url>http://www.domain.com</url> </AccountInfo>
Response Information
Successful Response:Resource Description
Account InfoName | Description | Type | Additional information |
---|---|---|---|
accountNumber | integer |
|
|
url | string |
|
|
countryCode | string |
|
|
timeZone | string |
|
|
currency | string |
|
|
clientId | string |
|
|
clientIdType | string |
|
|
partnerPackage | string |
|
|
jsCode | string |
|
|
token | string |
|
|
status | string |
|
|
partnerRemoteId | string |
|
|
settlementCurrency | string |
|
Response Formats
application/json, text/json
{ "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" }
application/xml, text/xml
<AccountInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SiteWit.PartnerAPI.Models.ReturnModels"> <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>