Login   Register  
PHP Classes
elePHPant
Icontem

File: apihelm.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Igor Herson Aquino de França  >  Helm 3.x XML API  >  apihelm.txt  >  Download  
File: apihelm.txt
Role: Documentation
Content type: text/plain
Description: Api to more actions
Class: Helm 3.x XML API
Manage hosting account with Helm control panel API
Author: By
Last change:
Date: 2008-09-16 07:50
Size: 11,637 bytes
 

Contents

Class file image Download
Helm Web Based Billing API
Version 1.1.3

This API has been designed to be used in the provisioning systems of 3rd party
billing systems.
________________________________________________________________________________

================================================================================
Usage
================================================================================

Use "/billing_api.asp?action=[MethodName]&Username=[HelmAccountName]&Password=[HelmAccountPassword]&{AdditionalData}"

e.g."/billing_api.asp?action=GetUsers&Username=ADMIN&Password=Password12345"

Both GET and POST methods are supported.


================================================================================
Methods
================================================================================

GetUser            - Gets information about a user in the Helm system.
GetUsers           - Gets details about all Helm users under an account.
AddUser            - Adds a new user to the system.
AddUserAndDomain   - Adds a new user with package and domain to the system.
                     NOTE: THIS APPLIES TO CUSTOMERS ONLY NOT RESELLERS
AuthenticateUser   - Authenitcate User login details
UpdateUserPassword - Updates a user's account password.
DeleteUser         - Removes a user from the system.
SuspendUser        - Suspends a user's account.
UnsuspendUser      - Reactivates a user's account.
GetPlans           - Retrieves the details of plans configured in Helm.
AddPackage         - Adds a hosting package to a customer level account.
GetPackages        - Get packages in customer account
DeletePackage      - Removed a hosting package from a customer account.
                     NOTE: THIS WILL REMOVE ALL DOMAINS IN THAT PACKAGE TOO!
AddTransaction     - Add a Transaction to an account
AddDomain          - Adds a hosted domain to a customer's package.
AddSubDomain       - Adds a sub domain to a Domain.
DeleteSubDomain    - Delete a sub domain to a Domain.
GetDomains         - Get List of your Domains
DeleteDomain       - Deletes a hosted domain from the system
GetExtraFeatures   - Gets a list of available extra features for a plan
AddExtraFeature    - Adds a purchased extra feature to a user's account
DeleteExtraFeature - Removes a purchased extra features from a user's account


GetUser
-------
Input
   *UserAccountNumber : Account number of the user to be returned
Output
    [XML] Collection of user's details including name, address details and
    suspension status



GetUsers
--------
Input
    None
Output
    [XML] List of user accounts and corresponding information about the user


AddUser
-------
Input
   *FirstName         : First name of new user
   *LastName          : Last name of new user
   *PrimaryEmail      : Primary email address of new user
   *Address1          : Address line 1 of new user
   *PostCode          : Postcode/Zipcode of new user
   *CountryCode       : 2 character country code
    Title             : Account holders title
    CompanyName       : Company name
    Address2          : Address line 2
    Address3          : Address line 3
    Town              : Town/City of new user
    County            : County/State of new user
    HomePhone         : Home Telephone Number
    WorkPhone         : Work Telephone Number
    MobilePhone       : Mobile Telephone Number
    FaxNumber         : Fax number
    SecondaryEmail    : Secondary email address
    NewAccountNumber  : User specified account name for new account. 
                        Automatically assigns one if not provided.
    NewAccountPassword: User specified account password for the new account.
                        Automatically generates one if not provided.
   *ResellerPlanId    : Required if Admin is adding a reseller account only
                        Reseller plan that reseller's new account will be based
                        upon.
    ResellerAccount   : If Admin you can specify the account number of the 
                        reseller that the user will be added to instead of adding
                        as a reseller account.
    SendWelcomeMessage: Whether to send user welcome message from Helm. If not
                        specified then will be "False". Set "True" to send.
                        
Output
    [TEXT] The new account's account number (user name)


AddUserAndDomain
----------------
Input
   *FirstName         : First name of new user
   *LastName          : Last name of new user
   *PrimaryEmail      : Primary email address of new user
   *Address1          : Address line 1 of new user
   *PostCode          : Postcode/Zipcode of new user
   *CountryCode       : 2 character country code
    Title             : Account holders title
    CompanyName       : Company name
    Address2          : Address line 2
    Address3          : Address line 3
    Town              : Town/City of new user
    County            : County/State of new user
    HomePhone         : Home Telephone Number
    WorkPhone         : Work Telephone Number
    MobilePhone       : Mobile Telephone Number
    FaxNumber         : Fax number
    SecondaryEmail    : Secondary email address
    NewAccountNumber  : User specified account name for new account. 
                        Automatically assigns one if not provided.
    NewAccountPassword: User specified account password for the new account.
                        Automatically generates one if not provided.
   *CustomerPlanId    : Hosting plan that customer's new account will be based
                        upon.
   *PackageName       : A friendly name for the customer's new hosting package.
   *DomainName        : The name of the FQDN to add to the users account.
    ResellerAccount   : If Admin you can specify the account number of the 
                        reseller that the user will be added to.
    SendWelcomeMessage: Whether to send user welcome message from Helm. If not
                        specified then will be false. Set "True" to send.
                        
Output
    [TEXT] The new account's account number (user name)


UpdateUserPassword 
------------------
Input
   *UserAccountNumber : Account number of the user to be suspended
   *NewAccountPassword: New password for the account
Output
    None


AuthenticateUser
------------------
Input
   *UserAccountNumber : user Account number
   *NewAccountPassword: user Account password
Output
    None


DeleteUser
----------
Input
   *UserAccountNumber : Account number of the user to be deleted
Output
    None


SuspendUser 
-----------
Input
   *UserAccountNumber : Account number of the user to be suspended
Output
    None


UnsuspendUser
-------------
Input
   *UserAccountNumber : Account number of the user to be unsuspended
Output
    None


GetPlans
--------
Input
    None
Output
    [XML] List of all plans that the user has set up in Helm


AddPackage
----------
Input
   *UserAccountNumber : Account number of the user to be unsuspended
   *PackageTypeId     : The Id number of the plan that the package is to be
                        created against.
   *FriendlyName      : A friendly name for the package
Output
    [TEXT] The packageId of the newly created hosting package




GETPACKAGES
------------
Input
    PackageID           : Package Id number of the customer's package to remove
    CustomerAccountID   : Customer ID of whom you require list of packages
    ResellerAccountID   : Reseller ID of who owns the plan the customer is held in
    PackageTypeID       : Package Type ID of the reseller plan the package is held in
    
Output
    [XML] List of all Packages that has set up in Helm matching params



DeletePackage
-------------
Input
   *PackageId         : Package Id number of the customer's package to remove
Output
	None


AddDomain
----------
Input
   *PackageId         : The package Id number of the customer's package that
                        the domain will be created within.
   *DomainName        : The fully qualified domain name
Output
    [TEXT] The DomainId of the newly created hosted domain



AddSubDomain
----------
Input
   *DomainId         : The Domain Id number of the customer's Domain
   *SubDomainName    : The fully qualified sub domain name
Output
    [TEXT] The SubDomainId of the newly created hosted domain




GetDomains
----------
Input
   CustomerAccountNumber : The Customer Account Name
   ResellerAccountNumber : The Resellers Account Name
   PackageId         : The package Id number of the customer's package that
                        the domain will be created within.
Output
    [XML] List of all Domains that have been set up in within the User or Plan




DeleteDomain
------------
Input
   *DomainId          : The domain Id number of the domain name that will be
                        removed from the system.
Output
    None



AddTransaction
-------------
Input
   *UserAccountNumber : Account number of the user to add the transaction
   *TransactionType   : 0=Purchase, 1=Renewal, 2=Payment, 3=Credit, 4=Invoice
   *TransactionDate   : Dateof the transaction supplied yyyy-mm-dd
   *TransactionAmount : Decimal currency value
   *TransactionQTY    : Quantity in tranaction
   *TransactionDesc   : Transaction Description Displayed in helm
   
Output
    None




DeleteSubDomain
------------
Input
   *SubDomainId          : The domain Id number of the sub domain name that will be
                        removed from the system.
Output
    None





GetExtraFeatures
----------------
Input
    *PackageTypeId    : The Id number of the plan to list all of the extra
                        features within.
Output
    [XML] List of all extra features that have been set up in within the plan


AddExtraFeature
---------------
Input
   *PackageId         : The package Id number where the extra feature will be 
                        added to
   *ExtraFeatureId    : The Id number of the extra feature to be added.
    Quantity          : The quantity of the extra feature to be added. If none
                        specified it will assume a quantity of one.
Output
    [TEXT] The PurchasedFeatureId of the purchased extra feature


DeleteExtraFeature
------------------
Input
   *PurchasedFeatureId: The Id number of the purchased extra feature
Output
    None

* - Required field


================================================================================
Returns
================================================================================
Simplified XML in the form of:

<?xml version="1.0" ?> 
<Results>
	<ResultCode>0</ResultCode> 
	<ResultDescription>OK</ResultDescription> 
	<ResultData>Result Text or XML</ResultData> 
</Results>


Result Data
------------
Result data is in key pair form XML or just plain text depending on the method 
that has been called.

Result in XML
-------------
The following is an example of data being returned 

<ResultData recordcount="2">
	<Record>
		<field name="FirstField">
			<value>first field value</value> 
		</field>
		<field name="SecondField">
			<value>second field value</value> 
		</field>
	</Record>
	<Record>
		<field name="FirstField">
			<value>more data</value> 
		</field>
		<field name="SecondField">
			<value>more data</value> 
		</field>
	</Record>
</ResultData>