CreateClient
Posted by Mohammad Rahhal, Last modified by Diab Mansour on 15 July 2021 01:30 PM

Syntax 

 Function CreateClient(ParentID As Integer, FirstName As String, SecondName As String, ThirdName As String, LastName As String, Username As String, Password As String, Phone As String, Fax As String, Mobile As String, TelPW As String, POB As String, Country As String, Email As String, Address As String, ReadOnlyLogin As Boolean, ForceChangePassword as Boolean) As String

Description

The CreateClient operation is used to initialize new client under the specific given parent ID.

Request Parameters

Name Description  Required
ParentID
  • Parent Identifier  which the new client will be under it
  • Type : Integer
  • Default : None
  • Constraints : Must be valid parent ID and accessible by logged in dealer
Yes
FirstName
  • Client first name
  • Type: String
  • Default: None
Yes
SecondName
  • Client second name
  • Type: String
  • Default: None
Yes
ThirdName
  • Client third name
  • Type: String
  • Default: None
Yes
LastName
  • Client last name
  • Type: String
  • Default: None
Yes
Username
  • The username for new client
  • Type: String
  • Default: None
Yes
Password
  • Password for new client
  • Type: String
  • Default: None
Yes
Phone
  • Client phone number
  • Type: String
  • Default: None
Yes
Fax
  • Client Fax number
  • Type: String
  • Default: None
Yes
Mobile
  • Client mobile number
  • Type: String
  • Default: None
Yes
TelPW
  • Client telephone password
  • Type: String
  • Default: None
Yes
POB
  • Post office box
  • Type: String
  • Default: None
Yes
Country
  • Client Country
  • Type: String
  • Default: None
  • Constraints  : must be one of the following countries: 
    -Afghanistan
    -Albania
    -Algeria
    -American Samoa
    -Andorra
    -Angola
    -Anguilla
    -Antigua and Barbuda
    -Argentina
    -Armenia
    -Aruba
    -Ascension Island
    -Australia
    -Austria
    -Azerbaijan
    -Bahamas
    -Bahrain
    -Bangladesh
    -Barbados
    -Belarus
    -Belgium
    -Belize
    -Benin
    -Bermuda
    -Bhutan
    -Bolivia
    -Bosnia and Herzegovina
    -Botswana
    -Brazil
    -Brunei
    -Bulgaria
    -Burkina Faso
    -Burundi
    -Cambodia
    -Cameroon
    -Canada
    -Cape Verde
    -Cayman Islands
    -Central African Republic
    -Chad
    -Chile
    -China
    -Cocos (Keeling) Islands
    -Colombia
    -Comoros
    -Congo
    -Congo (DRC)
    -Cook Islands
    -Costa Rica
    -Côte d’Ivoire
    -Croatia
    -Cuba
    -Cyprus
    -Czech Republic
    -Denmark
    -Diego Garcia
    -Djibouti
    -Dominica
    -Dominican Republic
    -Ecuador
    -Egypt
    -el Salvador
    -Equatorial Guinea
    -Eritrea
    -Estonia
    -Ethiopia
    -Falkland Islands (Islas Malvinas)
    -Faroe Islands
    -Fiji Islands
    -Finland
    -France
    -French Antilles
    -French Guiana
    -French Polynesia
    -Gabon
    -Gambia
    -Georgia
    -Germany
    -Ghana
    -Gibraltar
    -Greece
    -Greenland
    -Grenada
    -Guadeloupe
    -Guam
    -Guantanamo Bay
    -Guatemala
    -Guinea
    - Guinea -Bissau
    -Guyana
    -Haiti
    -Honduras
    -Hong Kong SAR
    -Hungary
    -Iceland
    -India
    -Indonesia
    -Iran
    -Iraq
    -Ireland
    -Israel
    -Italy
    -Jamaica
    -Japan
    -Jordan
    -Kazakhstan
    -Kenya
    -Kiribati
    -Korea
    -Kuwait
    -Kyrgyzstan
    -Laos
    -Latvia
    -Lebanon
    -Lesotho
    -Liberia
    -Libya
    -Liechtenstein
    -Lithuania
    -Luxembourg
    -Macao SAR
    -Macedonia, Former Yugoslav Republic of
    -Madagascar
    -Malawi
    -Malaysia
    -Maldives
    -Mali
    -Malta
    -Marshall Islands
    -Martinique
    -Mauritania
    -Mauritius
    -Mayotte
    -Mexico
    -Micronesia
    -Moldova
    -Monaco
    -Mongolia
    -Montserrat
    -Morocco
    -Mozambique
    -Myanmar
    -Namibia
    -Nauru
    -Nepal
    -Netherlands Antilles
    -Netherlands , the
    -New Caledonia
    -New Zealand
    -Nicaragua
    -Niger
    -Nigeria
    -Niue
    -Norfolk Island
    -North Korea
    -Norway
    -Oman
    -Pakistan
    -Palau
    -Palestine
    -Panama
    -Papua New Guinea
    -Paraguay
    -Peru
    -Philippines
    -Poland
    -Portugal
    -Puerto Rico
    -Qatar
    -Reunion
    -Romania
    -Russia
    -Rwanda
    -São Tomé and Príncipe
    -Samoa
    -San Marino
    -Saudi Arabia
    -Senegal
    -Serbia and Montenegro
    -Seychelles
    -Sierra Leone
    -Singapore
    -Slovakia
    -Slovenia
    -Solomon Islands
    -Somalia
    -South Africa
    -Spain
    -Sri Lanka
    -St.Helena
    -St. Kitts and Nevis
    -St.Lucia
    -St. Pierre and Miquelon
    -St. Vincent and the Grenadines
    -Sudan
    -Suriname
    -Swaziland
    -Sweden
    -Switzerland
    -Syria
    -Taiwan
    -Tajikistan
    -Tanzania
    -Thailand
    -Timor -Leste
    -Togo
    -Tokelau
    -Tonga
    -Trinidad and Tobago
    -Tunisia
    -Turkey
    -Turkmenistan
    -Turks and Caicos Islands
    -Tuvalu
    -Uganda
    -Ukraine
    -United Arab Emirates
    -United Kingdom
    -United States
    -Uruguay
    -Uzbekistan
    -Vanuatu
    -Vatican City
    -Venezuela
    -Vietnam
    -Virgin Islands
    -Virgin Islands, British
    -Wallis and Futuna
    -Yemen
    -Zambia
    -Zimbabwe
Yes
Email
  • Client Email address
  • Type: String
  • Default: None
Yes
Address
  • Client Address
  • Type: String
  • Default: None
Yes
ReadOnlyLogin
  • To indicate if the client will only monitor the trades or not
  • Type: Boolean
  • Default: None
Yes
ForceChangePassword
  • To indicate if the client will have to change the password after first login or not 
  • Type : Boolean 
  • Default : none
Yes


Response Elements

Name Description 
Result

This operation returns a new client identifier in case success, otherwise an explicit error code is returned.

 
Sample

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CreateClient</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script >
var hisTable;
$(document).ready(function () {
var urlStr = "http://173.249.35.43/webtrader/webservice.svc";
jQuery.support.cors = true;
$("#progress").ajaxStart(function () { $(this).css("display", "block"); });
$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
function onSuccessResult(response) {
response = eval('(' + response + ')')
if (response.UserId == -1 || response.UserId == -207) {
$("#resultData").html("Invalid username or password");
}
else if (response.UserId == -231) {
$("#resultData").html("You must have at least one account");
}
else if (response == null || response == "" || response.UserId < 0) {
$("#resultData").html("Error while login.Please try later");
}
else {
$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);
}
}
$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });
function onErrorResult(result) {
alert('Service call faild : ' + result.status + ' ' + result.statusText);
}
$("#btnLogin").click(function () {
$.getJSON(urlStr + "/BackofficeLogin?username=" + $("#txtusername").val() + "&password=" + $("#txtpassword").val() + "&callback=?" , onSuccessResult);
});
function onSuccessResultAction(dataResult) {
dataResult = eval('(' + dataResult + ')');
$("#resultAction").html(dataResult);
if (dataResult > 0) {
$("#resultAction").html("SuccessResult ... ClientID is :" + dataResult);
}
else {
var errDetail = "https://support.hybridsolutions.com//index.php?/Knowledgebase/Article/View/1964"
$("#resultAction").html("Error Code : " + dataResult + "<br/>" + " for more details see the follwing link: " + errDetail.link(errDetail));
}

}
$("#btnAction").click(function () {
$.getJSON(urlStr + "/CreateClient?ParentID=" + $("#ParentID").val() + "&FirstName=" + $("#FirstName").val() + "&SecondName=" + $("#SecondName").val() + "&ThirdName=" + $("#ThirdName").val() + "&LastName=" + $("#LastName").val() + "&Username=" + $("#Username").val() + "&Password=" + $("#Password").val() + "&Phone=" + $("#Phone").val() + "&Fax=" + $("#Fax").val()+ "&Mobile=" + $("#Mobile").val() + "&TelPW=" + $("#TelPW").val() + "&POB=" + $("#POB").val() + "&Country=" + $("#Country").val() + "&Email=" + $("#Email").val() + "&Address=" + $("#Address").val() + "&ReadOnlyLogin=" + $("#ReadOnlyLogin").val()+ "&ForceChangePassword=" + $("#TxtForceChangePass").val() + "&callback=?" , onSuccessResultAction);
});
});
</script>

<body>
<table border="1px">
<tbody>
<tr>
<td>
Username: <input type="text" id="txtusername" value=""/>
Password: <input type="text" id="txtpassword" value=""/>
<button id="btnLogin"> Login </button>
</td>
</tr>
<tr>
<td>
Parent ID: <input type="text" id="ParentID" value=""/>
First Name: <input type="text" id="FirstName" value=""/>
Second Name: <input type="text" id="SecondName" value=""/>
</tr>
</td>
<tr>
<td>
Third Name: <input type="text" id="ThirdName" value=""/>
Last Name: <input type="text" id="LastName" value=""/>
User name: <input type="text" id="Username" value=""/>
Password: <input type="text" id="Password" value=""/>
</tr>
</td>
<tr>
<td>
Phone: <input type="text" id="Phone" value=""/>
Fax: <input type="text" id="Fax" value=""/>
Mobile: <input type="text" id="Mobile" value=""/>
TelPW: <input type="text" id="TelPW" value=""/>
</tr>
</td>
<tr>
<td>
POB: <input type="text" id="POB" value=""/>
Country: <input type="text" id="Country" value=""/>
Email: <input type="text" id="Email" value=""/>
</tr>
</td>
<tr>
<td>
Address: <input type="text" id="Address" value=""/>
ReadOnlyLogin: <input type="text" id="ReadOnlyLogin" value=""/>
ForceChangePassword: <input type="text" id="TxtForceChangePass" value=""/>
<button id="btnAction"> CreateClient </button>
</td>
</tr>
</tbody>
</table>
<div id="resultData"> </div>
<div id="resultAction"> </div>
<div style="display:none" id="progress">Loading ... </div>
</body>
</html>

 


See Also


VertexFX Backoffice WCF Service Index

(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions