GetUserClientSites
- Method
SlimCD.Login.GetUserClientSitePurpose
Gets specific sitename, businesstype, industrycode info for a username/password or clientid/siteid.
Description
Retrieves a list of clients and sites for the specified username/password, or a list of sites for the specified clientid, or the details on a specified clientid/siteid. The information returned shows details on the site’s setup.Business Rules
Argument List
Name Required Usage GetUserClientSitesRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
GetUserClientSites Request Fields
Field Name Type Length Required Description Username string 20 require Username or API Access Credential that accesses web service. Password string 20 require Plaintext password for the client account. ClientID string 10 conditional Assigned by the Slim CD administrator. SiteID integer 10 optional Assigned by the Slim CD administrator. 1. Passwords are required except when the username is set to an API Access Credential, in which case it should be passed in as an empty string.
Reply Fields
reply outer tag for the reply data block response Success, FAIL, Error response code 0, 1, 2 (respective) matching the above description If successful, this will contain the single word, OK. Otherwise it will contain a description of failure or error which occurred reponseurl The Slimcd.com url which was called for this operation datablock The confirmation text returned from the server. Reply Hierarchy
- reply
- response
- responsecode
- description
- responseurl
- datablock
- SiteList
- Site
- ClientID
- SiteID
- PriceID
- MerchantID
- BusinessType
- CreditRoute
- CheckRoute
- GiftRoute
- CardTypes
- CheckMask
- ClientName
- SiteName
- DBA
- Address
- Address2
- City
- State
- Zip
- Country
- Phone
- Site
- SiteList
Remarks
- General
- Names in name/value pairs are NOT case-sensitive
- Names inside XML tags ARE case-sensitive
- Function-Specific
- None
- reply
- Include
012<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script>
Method
12345function GetUserClientSite(request,callback)function GetUserClientSite(request,timeout,callback)
Request
12345678request= {"username": "1032","password": "289075","clientid": "0","siteid": "0"}
Reply
12345678910111213141516171819202122232425262728293031323334353637383940callback ( {"reply":{"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/login.asmx/GetUserClientSite","datablock": {"SiteList": {"Site": [{"ClientID": "1032","SiteID": "228226448","PriceID": "74","MerchantID": "888000000961","BusinessType": "2","CreditRoute": "VTL","CheckRoute": "CER","GiftRoute": "FTG","CardTypes": "VMADJCB","CheckMask": "11110001","ClientName": "RETAIL TEST ACCOUNT","SiteName": "retail test 111","DBA": "RETAIL TEST ACCOUNT","Address": "610 N University Drive","Address2": null,"City": "Coral Springs","State": "FL","Zip": "33071","Country": "840","Phone": "(954) 752-9309","Email": "support.slimcd.com"}]}}}} );
Sample Code
12345678910111213141516171819<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script>// <![CDATA[SlimCD.Login.GetUserClientSite({"username": "1032","password": "289075","clientid": "0","siteid": "0"},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});// ]]></script>
Downloads
- Include
012include 'slimcd.php';
Method
123function Login_GetUserClientSite(Login_GetUserClientSiteRequest $request,$timeout=false)Request
1234567891011class Login_GetUserClientSiteRequest{// property declarationpublic $username = '';public $password = '';public $clientid=0;public $siteid=0;}JSON Reply
12345678910111213141516171819202122232425262728293031323334353637{"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/login.asmx/GetUserClientSite","datablock": {"SiteList": {"Site": [{"ClientID": "1032","SiteID": "228226448","PriceID": "74","MerchantID": "888000000961","BusinessType": "2","CreditRoute": "VTL","CheckRoute": "CER","GiftRoute": "FTG","CardTypes": "VMADJCB","CheckMask": "11110001","ClientName": "RETAIL TEST ACCOUNT","SiteName": "retail test 111","DBA": "RETAIL TEST ACCOUNT","Address": "610 N University Drive","Address2": null,"City": "Coral Springs","State": "FL","Zip": "33071","Country": "840","Phone": "(954) 752-9309","Email": "support.slimcd.com"}]}}}Sample Code
123456789101112131415161718192021include 'slimcd.php';// Create the Slim CD object$SlimCD = new SlimCD() ;// Create a GetUserClientSite Request class$request = new Login_GetUserClientSiteRequest() ;$request->username = 1032;$request->password = 289075;$request->clientid=0;$request->siteid=0;$result = $SlimCD->Login_GetUserClientSite($request);if ($result->response == 'Success') {echo 'Success!' ;}else {echo $result->response . ':' . $result->description ;}Downloads
Download full sample source. - Include
123using SlimCD;
Method
123Public GetUserClientSiteReply GetUserClientSite(GetUserClientSiteRequest request,int timeout);
Request
123456789public class GetUserClientSiteRequest{public string username { get; set; }public string password { get; set; }public int clientid { get; set; }public int siteid { get; set; }}
Reply
123456789101112public class GetUserClientSiteReply{public string response;public string responsecode;public string description;public string responseurl;public string sitelist;public string senddata;public string recvdata;}
Sample Code
1234567891011121314151617181920SlimCD.Login login = new SlimCD.Login();login.debug = true;login.transURL = TransURL;GetUserClientSiteRequest request = new GetUserClientSiteRequest();GetUserClientSiteReply reply = new GetUserClientSiteReply();request.username = 1032;request.password = 289075;request.clientid = 0;request.siteid = 0;reply = login.GetUserClientSite(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}
Downloads
Download full sample source. - Include
123using SlimCD;
Method
0123Public async Task GetUserClientSite(GetUserClientSiteRequest request,int timeout);
Request
123456789public class GetUserClientSiteRequest{public string username { get; set; }public string password { get; set; }public int clientid { get; set; }public int siteid { get; set; }}
Reply
12345678910111213public class GetSessionFieldsReplypublic class GetUserClientSiteReply{public string response;public string responsecode;public string description;public string responseurl;public string sitelist;public string senddata;public string recvdata;}
Sample Code
1234567891011121314151617181920SlimCD.Login login = new SlimCD.Login();login.debug = true;login.transURL = TransURL;GetUserClientSiteRequest request = new GetUserClientSiteRequest();GetUserClientSiteReply reply = new GetUserClientSiteReply();request.username = 1032;request.password = 289075;request.clientid = 0;request.siteid = 0;reply = await login.GetUserClientSite(request, 60);if (reply.response.ToUpper() == "SUCCESS"){MessageBox.Show("Success");}else{MessageBox.Show("There was a problem:\n(" + reply.response & ") " + reply.description);}
Downloads - Include
012#import "SlimCD.h"
Method
1234567typedef void (^LoginGetUserClientSitesReplyBlock)(LoginGetUserClientSitesReply *reply);- (void) loginGetUserClientSitesWithRequest:(LoginGetUserClientSitesRequest*)request replyBlock:(LoginGetUserClientSitesReplyBlock)replyBlock;- (void) loginGetUserClientSitesWithRequest:(LoginGetUserClientSitesRequest*)request timeout:(NSTimeInterval)timeout replyBlock:(LoginGetUserClientSitesReplyBlock)replyBlock;
Request
12345678910@interface LoginGetUserClientSitesRequest@property (strong) NSString *userName;@property (strong) NSString *password;@property (strong) NSNumber *clientID;@property (strong) NSNumber *siteID;@end
Reply
12345678@interface LoginGetUserClientSitesReply : SlimCDReply// Array of LoginGetUserClientSite objects.@property (strong) NSArray *sites;@endSample Code
12345678910111213141516SlimCD *api = [[SlimCD alloc] init];LoginGetUserClientSitesRequest *request = [[LoginGetUserClientSitesRequest alloc] init];request.userName = @"1032";request.password = @"289075";request.siteID = @0;request.clientID = @0;[api loginGetUserClientSitesWithRequest:request replyBlock:^(LoginGetUserClientSitesReply *reply) {if ( reply.responseCode == RC_SUCCESS ){}}]; - Method
1234567public void getUserClientSites(GetUserClientSitesRequest loginUserClientSiteRequest,int timeout ,GetUserClientSitesCallback callback)public void getUserClientSites(GetUserClientSitesRequest loginUserClientSiteRequest,GetUserClientSitesCallback callback)
Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344- public class GetUserClientSitesRequest {private String username;private String password;private int siteid;private int clientid;public GetUserClientSitesRequest(){// To set the default value.username="";password="";siteid=0;clientid=0;}// setters and getters.public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public int getSiteid() {return siteid;}public void setSiteid(int siteid) {this.siteid = siteid;}public int getClientid() {return clientid;}public void setClientid(int clientid) {this.clientid = clientid;}}
Reply
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657public class GetUserClientSitesReply {private String response="";private String responsecode="";private String description="";private String responseurl="";private Datablock datablock = null;private String sentdata="";private String recvdata="";// setters and getters.public String getSentdata() {return sentdata;}public void setSentdata(String sentdata) {this.sentdata = sentdata;}public String getRecvdata() {return recvdata;}public void setRecvdata(String recvdata) {this.recvdata = recvdata;}public String getResponse() {return response;}public void setResponse(String response) {this.response = response;}public String getResponsecode() {return responsecode;}public void setResponsecode(String responsecode) {this.responsecode = responsecode;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public String getResponseurl() {return responseurl;}public void setResponseurl(String responseurl) {this.responseurl = responseurl;}public Datablock getDatablock() {return datablock;}public void setDatablock(Datablock datablock) {this.datablock = datablock;}}
Sample Code
1234567891011121314151617181920212223242526// set the request parameter.GetUserClientSitesRequest request=new GetUserClientSitesRequest();request.setUsername("1032");request.setPassword("289075");request.setClientid(1032);request.setSiteid(228226448);//To make web service request.new LoginGetUserClientSites().getUserClientSites(request,new GetUserClientSitesCallback() {@Overridepublic void getUserClientSitesReply(GetUserClientSitesReply reply) {if (reply.getResponse().equals("Success"))textBox.setText("Success");elsetextBox.setText("There was a problem:\n" + reply.getResponse() +"\n Descriptin "+ reply.getDescription());}});
Downloads
Download full sample source. - URL
Protocols
- SOAP/XML
- HTTP POST
- HTTP GET
Request
Status Codes
Status Code Status Description Explanation 200 200 OK Approved or declined attempts will return a response with an XML reply block 500 500 Internal Server Error The response will not contain XML, as a server error has occurred. Reply Output is in XML format if a status code of 200 is returned.
1234<!--?xml version="1.0" encoding="utf-8" ?-->Success0OKhttps://stats.slimcd.com/wswebservices/login.asmx/GetUserClientSite1032228226448748880000009612VTLCERFTGVMADJCB11110001RETAIL TEST ACCOUNTretail test 111RETAIL TEST ACCOUNT123Coral SpringsFL33071840(954) 752-9309support.slimcd.com103259588071032718880000009612VTLZZZZZZVMADJCBTRETAIL TEST ACCOUNTmovesiteRETAIL TEST ACCOUNT12345678Coral SpringsFL33071840(954) 752-9309support.slimcd.comIf the block’s tag does not indicate “Success”, the tag will contain an error description which can be displayed to the end-user
Sample Code
DOWNLOAD
EXERCISER TOOL
Remarks
- Remarks Go here
- URL
123https://stats.slimcd.com/soft/json/jsonscript.asp?service=GetUserClientSite
Protocols- HTTP POST
- HTTP GET
This function accepts either name/value pairs or JSON
Request
Reply
123456789101112131415161718192021222324252627282930313233343536373839{"reply": {"response": "Success","responsecode": "0","description": "OK","responseurl": "http://stats.slimcd.com/wswebservices/login.asmx/GetUserClientSite","datablock": {"SiteList": {"Site": [{"ClientID": "1032","SiteID": "228226448","PriceID": "74","MerchantID": "888000000961","BusinessType": "2","CreditRoute": "VTL","CheckRoute": "CER","GiftRoute": "FTG","CardTypes": "VMADJCB","CheckMask": "11110001","ClientName": "RETAIL TEST ACCOUNT","SiteName": "retail test 111","DBA": "RETAIL TEST ACCOUNT","Address": "610 N University Drive","Address2": null,"City": "Coral Springs","State": "FL","Zip": "33071","Country": "840","Phone": "(954) 752-9309","Email": "support.slimcd.com"}]}}}}Sample Code
Remarks
- None