Difference between revisions of "AWBS API"
(→Available Commands) |
(→adduser) |
||
Line 1: | Line 1: | ||
== Available Commands == | == Available Commands == | ||
===adduser=== | ===adduser=== | ||
+ | {| border = 1 | ||
+ | ! PARAMETER !! DESCRIPTION | ||
+ | |- | ||
+ | |'''activate''' ||(1=Active 2=Canceled 3=Pending 4=Suspended 5=Fraud 9=Flagged) | ||
+ | |- | ||
+ | |'''address1''' || | ||
+ | |- | ||
+ | |'''address2''' || | ||
+ | |- | ||
+ | |'''city''' || | ||
+ | |- | ||
+ | |'''company''' || | ||
+ | |- | ||
+ | |'''country''' || (2 letter country code) | ||
+ | |- | ||
+ | |'''countrycode''' || (2 or 3 digit country dialing code) | ||
+ | |- | ||
+ | |'''custom1''' || | ||
+ | |- | ||
+ | |'''custom2''' || | ||
+ | |- | ||
+ | |'''custom3''' || | ||
+ | |- | ||
+ | |'''email''' || | ||
+ | |- | ||
+ | |'''fax''' || | ||
+ | |- | ||
+ | |'''first_name''' || | ||
+ | |- | ||
+ | |'''groupname''' || (group id number) | ||
+ | |- | ||
+ | |'''jobtitle''' || | ||
+ | |- | ||
+ | |'''language''' || (default=english) | ||
+ | |- | ||
+ | |'''last_login''' || (unix time) | ||
+ | |- | ||
+ | |'''last_name''' || | ||
+ | |- | ||
+ | |'''last_transaction''' || (unix time) | ||
+ | |- | ||
+ | |'''lpanswer''' || (secret answer) | ||
+ | |- | ||
+ | |'''lpquestion''' || (secret question) | ||
+ | |- | ||
+ | |'''mail_type''' || (1=text 2=html) | ||
+ | |- | ||
+ | |'''maillist''' || (add to maillist 1=yes 0=no) | ||
+ | |- | ||
+ | |'''password''' || (md5 encoded password) | ||
+ | |- | ||
+ | |'''phone''' || | ||
+ | |- | ||
+ | |'''ppassword''' || (password in plain text) | ||
+ | |- | ||
+ | |'''province''' || | ||
+ | |- | ||
+ | |'''refill_notify''' || (1=yes 0=no) | ||
+ | |- | ||
+ | |'''resellermaxaccts''' || | ||
+ | |- | ||
+ | |'''rspchoice''' || (1=state 2=province 3=no choice) | ||
+ | |- | ||
+ | |'''second_email''' || | ||
+ | |- | ||
+ | |'''sendmail''' || | ||
+ | |- | ||
+ | |'''state''' || | ||
+ | |- | ||
+ | |'''username''' || | ||
+ | |- | ||
+ | |'''zip''' || | ||
+ | |} | ||
+ | |||
===addhosting=== | ===addhosting=== | ||
===adddomain=== | ===adddomain=== |
Revision as of 09:28, April 1, 2010
Contents
- 1 Available Commands
- 1.1 adduser
- 1.2 addhosting
- 1.3 adddomain
- 1.4 suspendhosting
- 1.5 unsuspendhosting
- 1.6 cancelhosting
- 1.7 addhostingpackage
- 1.8 addhostingserver
- 1.9 resetpassword
- 1.10 checkserverstats
- 1.11 checkapi
- 1.12 addinvoice
- 1.13 getcart
- 1.14 checkdomain
- 1.15 getuser
- 1.16 payinvoice
- 1.17 updatecc
- 1.18 verifyuser
- 2 Usage Instructions
- 3 Return and Options
Available Commands
adduser
PARAMETER | DESCRIPTION |
---|---|
activate | (1=Active 2=Canceled 3=Pending 4=Suspended 5=Fraud 9=Flagged) |
address1 | |
address2 | |
city | |
company | |
country | (2 letter country code) |
countrycode | (2 or 3 digit country dialing code) |
custom1 | |
custom2 | |
custom3 | |
fax | |
first_name | |
groupname | (group id number) |
jobtitle | |
language | (default=english) |
last_login | (unix time) |
last_name | |
last_transaction | (unix time) |
lpanswer | (secret answer) |
lpquestion | (secret question) |
mail_type | (1=text 2=html) |
maillist | (add to maillist 1=yes 0=no) |
password | (md5 encoded password) |
phone | |
ppassword | (password in plain text) |
province | |
refill_notify | (1=yes 0=no) |
resellermaxaccts | |
rspchoice | (1=state 2=province 3=no choice) |
second_email | |
sendmail | |
state | |
username | |
zip |
addhosting
adddomain
suspendhosting
unsuspendhosting
cancelhosting
addhostingpackage
addhostingserver
resetpassword
checkserverstats
Note: checkserverstats will return a list of open/pending items separated by a pipe (|) character. helpdesk|others|reminders|contact_form|package_queue|users
checkapi
addinvoice
getcart
checkdomain
getuser
payinvoice
updatecc
verifyuser
Usage Instructions
- Edit your Extended System Config and allow API access from your IP in the remote_list field. Note: Each allowed IP is separated by a | (pipe)
- Set your Private Key in AWBS System Setup/System Options.
The API currently accepts HTTP POST only.
Sample cURL Post
$data="command=adduser&help=1&accesskey=mykey"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "$data"); curl_setopt($ch, CURLOPT_URL, "https://www.yoursite.com/interface.php"); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $ret = curl_exec($ch); curl_close($ch);
Note: You can alternatively send: &maccesskey=[md5 encoded key as shown on the System Config page] if you wish to not send the key in plain text
Return and Options
Posting help=1 will get you help on the function sent in the command.
When not sending help=1, you will receive either a "SUCCESS" response, or if the call failed, you will receive an "ERROR,error description" response.
You can also send the &altout=1 command. This will cause the api to return the insert_id for sql injections instead of the usual SUCCESS. Sending &checkapi=1 will return SUCCESS if you validate on the api (and pass ip check).