API | Previous

To add a user to the iScripts EasyCreate 3.2 from your program you can use either one of the following methods
1) Simple User Addition
To add a user in the iScripts EasyCreate 3.2 from your site please cut and paste the following 2 line of code.
//====================== iScripts EasyCreate 3.2 User Addition ==================
include("api/useradd.php");
userAdd('login-name','password','first-name','email-address');
//====================== End iScripts EasyCreate 3.2 User Addition ==============
Note :
1) include the path of useradd.php in the api folder on the first line.
2) Please provide the values for name, password, company-name, email, on the second line. These values are mandatory.
2) Advanced User Addition
In order to use the API, please send the user information- username, password, company name, and email to the URL.
<?xml version="1.0"?>
<users>
<function>add</function>
<values>
<username>username</username>
<password>password</password>
<email>email</email>
<firstname>firstname</firstname>
</values>
</users>
You will receive a response from the API in the following format:
<?xml version="1.0"?>
<results>
<response></response>
<error>104</error>
</results>
this is then copied into your database.
The following variations of request are possible
1) To add a user the function should be add
2) To update a user the function should be update
3) To delete a user the function should be delete
The output parameters
1) On successful execution the tag will contain values like user added, user updated ,user deleted and the tag will contain 0
2) On unsuccessful execution the tag will be empty and the tag will display an error number whose meaning could be varified by looking at the return code meanings shown below.
Conditions
1) Please send in data in the exact format as shown above.
2) We do not guarantee that the api works correctly for all servers proper working of the api will depend on the server security settings etc.
Return Codes
0 -> No Error
100 -> API Error
101 -> Missing or Malformed Starting Tags
102 -> Missing or Malformed Ending Tags
103 -> Funcion Not Recognized
104 - > Missing values
105 - > Invalid Request
106 - > Invalid Company
107 - > Duplicate User
108 - > Invalid User