Articles: Passive12 ResellerAPI
The ResellerAPI for passive12.net is getting more full-featured every hour, and many of the features are used on the www.DomainWake.com website, as it has become the primary testbed for it.
Added: 2006-09-17 15:22:03 - Modified: 2006-10-12 18:23:03 - Level: Beginner
![]()
Recommend this article to a friend.
Toggle more
About
The ResellerAPI is written in PHP 5 and is available to resellers of KF Webs / passive12 . For more information about being a reseller visit www.reseller.passive12.net . The API is one of the many advantages KF Webs has to offer.
By default it uses the SOAP-extension of PHP, but it is independent of it by providing a fallback to opening a socket manually.
Initialization
require("ResellerAPI.class.php");
$reseller = new ResellerAPI;
$reseller->set_credentials("user@domain.com","password",68815);
Methods
Generic
public function checkAvailability($dom,$tld,$suggest="false")
the checkAvailability method returns an array with domain names and its statuses. It has two required arguments and a third optional argument if you want to use a feature for suggesting other domain names.
public function loadFile($filename)
Allows you to load a list of domain names from a text-file
public function set_no_soap_extension()
If you don't have the SOAP extension installed
User Management
public function getCustomerDetails($customerid)
This method returns information about the customer
public function authenticateUser($username,$password)
This method allows you to authenticate a user, upon success it returns the customer id of the user.
public function listContacts($customerid)
This method lists the different contact
public function deleteContact($contactid)
This method allows you to delete contact details for a user
public function getContactDetails($contid)
Returns the information stored about a specific contact user of a customer.
public function addContactDetails($custid,$company,$name,$email,$addr,$city,$state,$country,$zip,$telnocc,$telno,$faxno="", $addr2="",$addr3="")
Allows you to add contact details for a customer
Funds information
public function getCustomerBalance($customerid)
THis method gets information about the debit balance of a customer.
public function getCustomerCostPrice($customerid)
Returns the customer's cost prices for different domain names
public function getResellerCostPrice()
Returns the reseller (your) cost prices for different domain names
public function addCustomerFunds($customerid,$amount,$desc,$transkey,$update_total="true",$type="receipt")
Adds funds to a customer's debit account. Returns the transaction id
Domain management
public function add($domarr,$ns,$customerid,$regid,$invoiceOption,$numyr=1)
This method is used to register domain names.
The invoiceOptions are as follows:
NoInvoice:
If this value is passed, then no customer invoice will be
generated for the domains.
PayInvoice:
If this value is passed, then a customer invoice will be
generated for the domains in the first step. If there is
sufficient balance in the Customer's Debit Account,
then the invoices will be paid and the domains will be
registered. If a customer has less balance than required,
then as many domains as possible will be registered with
the existing funds. All other orders will remain pending
in the system.
KeepInvoice:
If this value is passed, then a customer invoice will be
generated for the domains. However, these invoices will
not be paid. They will be kept pending, while the orders
will be executed.
OnlyAdd:
Order is added, but not attempted to be paid for.
the $ns argument is an array of nameservers to use
$regid can be either a string or an array with two values. If a string, the registrant id, technical/billing/administration is the same. If an array is provided, the first value is the registrant data, the 2nd is technical,billing and administration
Troubleshooting functions
public function getLastResponse()
Returns the raw XML output from the previously executed request
Related articles:
[Sitemap]

