Difference between revisions of "AWBS API"
(→updatecc) |
(→verifyuser) |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Available Commands == | == Available Commands == | ||
===adduser=== | ===adduser=== | ||
− | |||
− | |||
− | |||
− | |||
'''Available Parameters:''' | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
Line 81: | Line 77: | ||
===addhosting=== | ===addhosting=== | ||
− | + | '''Available Parameters:''' | |
− | ''' | + | |
− | + | ||
− | + | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 130: | Line 123: | ||
===adddomain=== | ===adddomain=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
+ | |- | ||
+ | |'''addtoqueue''' || '1' = Yes '0' = No | ||
|- | |- | ||
|'''afid''' || (affiliate id) | |'''afid''' || (affiliate id) | ||
Line 150: | Line 146: | ||
|- | |- | ||
|'''feature5''' || '0' | |'''feature5''' || '0' | ||
+ | |- | ||
+ | |'''invoiceid''' || | ||
+ | |- | ||
+ | |'''invoiceorderid''' || | ||
|- | |- | ||
|'''owner''' || (owners username) | |'''owner''' || (owners username) | ||
+ | |- | ||
+ | |'''price_override''' || Amount of the override | ||
+ | |- | ||
+ | |'''price_override_expires''' || Date override expires in unixtime | ||
+ | |- | ||
+ | |'''profileid''' || If not using default and if adding to queue | ||
+ | |- | ||
+ | |'''queuestatus''' || If adding to queue '1' = Live(default) '5' = Pending | ||
|- | |- | ||
|'''regdate''' || 'Today' | |'''regdate''' || 'Today' | ||
Line 164: | Line 172: | ||
|- | |- | ||
|'''tld''' || | |'''tld''' || | ||
+ | |- | ||
+ | |'''years''' || Number of years if adding to queue | ||
|} | |} | ||
===suspendhosting=== | ===suspendhosting=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 180: | Line 191: | ||
===unsuspendhosting=== | ===unsuspendhosting=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 193: | Line 205: | ||
===cancelhosting=== | ===cancelhosting=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 206: | Line 219: | ||
===addhostingpackage=== | ===addhostingpackage=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 227: | Line 241: | ||
===addhostingserver=== | ===addhostingserver=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 236: | Line 251: | ||
===resetpassword=== | ===resetpassword=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 254: | Line 270: | ||
===addinvoice=== | ===addinvoice=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
|- | |- | ||
− | |'''affiliate_id''' || | + | |'''affiliate_id''' ||Affiliate ID to link with invoice |
|- | |- | ||
− | |''' | + | |'''ccpay''' ||Process payment if user has credits or a credit card on file (0 = No, 1 = Yes) |
|- | |- | ||
− | |''' | + | |'''due_date''' ||Due Date of Invoice (unix time) |
|- | |- | ||
− | |''' | + | |'''invoice_description''' ||Invoice Description |
|- | |- | ||
− | |''' | + | |'''item_description''' ||Item Description |
|- | |- | ||
− | |''' | + | |'''itype''' ||Domains=1,Hosting=2,Domain with Hosting=3,Others=6,Servers=8,Addons=9 |
|- | |- | ||
− | |''' | + | |'''owner''' ||Username of user being invoiced |
|- | |- | ||
− | |''' | + | |'''packageid''' ||PackageID |
|- | |- | ||
− | |''' | + | |'''send_email''' ||Send mail to User? y/n |
|- | |- | ||
− | |''' | + | |'''tax_code''' ||Domain package=1,Hosting package=2,Setup fee=3,Server package=4,Other package=5,Reactivation fee=6,Declined CC= 7,Addon package=8 |
+ | |- | ||
+ | |'''total''' ||Total of Invoice | ||
|} | |} | ||
Line 283: | Line 302: | ||
===checkdomain=== | ===checkdomain=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 293: | Line 313: | ||
===getuser=== | ===getuser=== | ||
− | + | '''Available Parameters:''' | |
− | ''' | + | |
− | + | ||
− | + | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 304: | Line 321: | ||
===payinvoice=== | ===payinvoice=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 319: | Line 337: | ||
===updatecc=== | ===updatecc=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 358: | Line 377: | ||
===verifyuser=== | ===verifyuser=== | ||
+ | '''Available Parameters:''' | ||
{| border = 1 | {| border = 1 | ||
! PARAMETER !! DESCRIPTION | ! PARAMETER !! DESCRIPTION | ||
Line 364: | Line 384: | ||
|- | |- | ||
|'''username''' || | |'''username''' || | ||
+ | |} | ||
+ | |||
+ | ===renewdomain=== | ||
+ | '''Available Parameters:''' | ||
+ | {| border = 1 | ||
+ | ! PARAMETER !! DESCRIPTION | ||
+ | |- | ||
+ | |'''sld''' || SLD of Domain to be renewed | ||
+ | |- | ||
+ | |'''tld''' || TLD of Domain to be renewed | ||
+ | |- | ||
+ | |'''owner''' || Owner (Username) of Domain | ||
+ | |- | ||
+ | |'''years''' || Number of years to be renewed | ||
+ | |- | ||
+ | |'''invoiceid''' || InvoiceID for renewal | ||
|} | |} | ||
Latest revision as of 11:34, February 23, 2012
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
- 1.19 renewdomain
- 2 Usage Instructions
- 3 Return and Options
Available Commands
adduser
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
activate | 1=Active 2=Canceled 3=Pending 4=Suspended 5=Fraud 9=Flagged |
address1 | User's Postal Address Line 1 |
address2 | User's Postal Address Line 2 |
city | User's City |
company | Company Name |
country | 2 letter country code |
countrycode | 2 or 3 digit country dialing code |
custom1 | Custom Field 1 Information |
custom2 | Custom Field 2 Information |
custom3 | Custom Field 3 Information |
User's E-Mail Address | |
fax | User's Fax Number |
first_name | User's First Name |
groupname | User group ID number |
jobtitle | User's Job Title |
language | Language for User (default=english) |
last_login | Last login time for user, must be in unix time |
last_name | User's Last Name |
last_transaction | Last Transaction time by user, must be in unix time |
lpanswer | Secret Answer |
lpquestion | Secret Question |
mail_type | 1=Text 2=HTML |
maillist | Add to mailing list 1=Yes 0=No |
password | MD5 Encoded Password for User |
phone | User's Phone Number (no spaces, or hyphens) |
ppassword | User's Password in plain text |
province | User's Province of Residence |
refill_notify | 1=Yes 0=No |
resellermaxaccts | Maximum number of eNom Reseller accounts allowed |
rspchoice | Region Selection Type 1=State 2=Province 3=No choice |
second_email | Secondary E-Mail for User |
sendmail | Send New Account E-Mail to User |
state | User's State of Residence |
username | Username to be used by user |
zip | Zip Code or Postal Code |
addhosting
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
addtoqueue | Add hosting setup to the Queue |
afid | Affiliate ID (If account is to be associated with an affiliate) |
bw | Bandwidth in MB |
diskspace | Disk space in MB (Not available until 2.9.1) |
domain | Domain to be used on Hosting Account |
hplan | Hosting Plan Name (Case Sensitive, Must match AWBS Hosting Plan) |
ip | IP address associated with Hosting Plan |
next_invoice | Next invoice generation date (unixtime) |
ns1 | Nameserver 1 |
ns2 | Nameserver 2 |
owner | Owner Username |
price_override | Price Override Amount |
renew_date | Next renew date (unixtime) |
renewed_on | Last renew (unixtime) |
server | Server to setup on (case sensitive) |
start_date | Start Date (default=today) |
status | Account Status (1=Active 2=Canceled 3=Pending 4=Suspended) |
term | Term of Hosting (Monthly, Quarterly, BiAnnually, Annually) |
uname | Control Panel Username |
upass | Control Panel Password |
adddomain
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
addtoqueue | '1' = Yes '0' = No |
afid | (affiliate id) |
auto_renew | '1' |
domainid | |
expiredate | |
feature1 | '1' |
feature2 | '1' |
feature3 | '1' |
feature4 | '1' |
feature5 | '0' |
invoiceid | |
invoiceorderid | |
owner | (owners username) |
price_override | Amount of the override |
price_override_expires | Date override expires in unixtime |
profileid | If not using default and if adding to queue |
queuestatus | If adding to queue '1' = Live(default) '5' = Pending |
regdate | 'Today' |
registrar | (Enom, Directi, Irrp, Generic, Nominet, Custom1) |
regstatus | ((Case Sensitive) Closed, Completed, Pending, Error, Canceled, Locked, Lost,Failed) |
regtype | ((Case sensitive) New, Renew, Transfer, DNS) |
sld | |
tld | |
years | Number of years if adding to queue |
suspendhosting
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
domain | Domain name of hosting package to suspend |
owner | Username on hosting package to suspend |
reseller | Is this a Reseller account? 1-Yes 0-No |
send_email | Send E-Mail to User? 1-Yes 0-No |
unsuspendhosting
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
domain | Domain name of hosting package to unsuspend |
owner | Username on hosting package to unsuspend |
reseller | Is this a Reseller account? 1-Yes 0-No |
send_email | Send E-Mail to User? 1-Yes 0-No |
cancelhosting
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
domain | Domain name of hosting package to Cancel |
owner | Username on hosting package to Cancel |
reseller | Is this a Reseller account? 1-Yes 0-No |
send_email | Send E-Mail to User? 1-Yes 0-No |
addhostingpackage
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
annually | Annual Price |
biannually | Bi-Annual Price |
description | Description of Hosting Package |
monthly | Monthly Price |
planname | Plan Name (No Spaces) |
quarterly | Quarterly Price |
serverplan | Server Plan name exactly as it appears on Server |
setupfee | Setup Fee to be Charged |
addhostingserver
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
serverip | IP Address of Server |
servername | Server Name to be used |
resetpassword
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
newpassword | (plain text) |
user | |
userid |
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
Sending &checkapi=1 will return SUCCESS if you validate on the api (and pass ip check).
addinvoice
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
affiliate_id | Affiliate ID to link with invoice |
ccpay | Process payment if user has credits or a credit card on file (0 = No, 1 = Yes) |
due_date | Due Date of Invoice (unix time) |
invoice_description | Invoice Description |
item_description | Item Description |
itype | Domains=1,Hosting=2,Domain with Hosting=3,Others=6,Servers=8,Addons=9 |
owner | Username of user being invoiced |
packageid | PackageID |
send_email | Send mail to User? y/n |
tax_code | Domain package=1,Hosting package=2,Setup fee=3,Server package=4,Other package=5,Reactivation fee=6,Declined CC= 7,Addon package=8 |
total | Total of Invoice |
getcart
cartid (found in COOKIE[cartId])
checkdomain
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
sld | SLD of Domain to be Checked |
tld | TLD of Domain to be Checked |
Returns: AVAIL, NOTAVAIL or ERROR
getuser
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
username | To view the return on the array you must: unserialize(base64_decode(urldecode(return_variable))) Values contained in the array include: address1, address2, city, country, countrycode, custom1, custom2, custom3, email, fax, firstname, fraudbypass, groupnumber, id, jobtitle, language, lastlogin, lastname, phone, province, rspchoice, secondemail, state, taxexempt, trusteduser, userid, zip |
payinvoice
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
amount | Total amount being applied |
authcode | Auth code or Check number of payment |
cardtype | Credit Card or Payment type |
invoiceid | InvoiceID to be paid |
owner | Username invoice is assigned to |
updatecc
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
ccaddress | Street Address (Must match billing address for Credit Card) |
cccard | Card Type - mc, visa, amex, etc |
cccity | City (Must match billing address for Credit Card) |
cccountry | Country (Must match billing address for Credit Card) |
ccissuenumber | Credit Card Issue Number |
ccmonth | Expiry Month of Card |
ccname1 | First Name on Card |
ccname2 | Last Name on Card |
ccnumber | Credit Card Number |
ccphone | Phone number of Credit Card user |
ccstartmonth | Start Month of Credit Card |
ccstartyear | Start Year of Credit Card |
ccstate | State (Must match billing address for Credit Card) |
ccyear | Expiry Year of Credit Card |
cczip | Zip or Postal Code (Must match billing address for Credit Card) |
clearcc | Clear saved credit card info 1-Yes |
owner | Username to save under |
verifyuser
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
password | (md5 encoded user password) |
username |
renewdomain
Available Parameters:
PARAMETER | DESCRIPTION |
---|---|
sld | SLD of Domain to be renewed |
tld | TLD of Domain to be renewed |
owner | Owner (Username) of Domain |
years | Number of years to be renewed |
invoiceid | InvoiceID for renewal |
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).