Parallels Business Automation Standard - 4.2 User Manual

Parallels
Parallels Business Automation Standard
Software Development Kit
Release 4.2. Revision 1.0
(c) 1999-2012
Copyright Notice
Parallels IP Holdings, GmbH. c/o Parallels International GMbH. Parallels International GmbH Vordergasse 49 CH - 8200 Schaffhausen Switzerland Tel: + 49 (6151) 42996 - 0 Fax: + 49 (6151) 42996 - 255
Copyright © 1999-2012 Parallels IP Holdings GmbH. and its affiliates. All rights reserved. This product is protected by United States and international copyright laws. The product's underlying technology, patents, and trademarks are listed at http://www.parallels.com/trademarks Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. Mac is a registered trademark of Apple, Inc. All other marks and names mentioned herein may be trademarks of their respective owners.

Changes History

Date Revision Changes Description
June 19, 1012 1.0 CP Customization methods updated according to PBAS v.4.2.
Contents
Changes History 3
Preface 9
Typographi cal Convent i ons .......................................................................................................................... 9
Feedback ..................................................................................................................................................... 10
Shell Prompts in Command Examples........................................................................................................ 10
General Conventions................................................................................................................................... 11
XML API 12
Introduction to Parallels Busin e ss Automation - Standard XML API ........................................................ 13
HSPC/API ................................................................................................................................................... 18
session_open .................................................................................................................................... 18
session_close ................................................................................................................................... 19
HSPC/API/HP............................................................................................................................................. 20
check_app_compat .......................................................................................................................... 20
check_license_compat ..................................................................................................................... 21
get_categorized_plan_list ................................................................................................................ 22
get_extended_plan_info ................................................................................................................... 23
Example of EXTENDED_HP_INFO Hash .......................................................................... 24
get_full_extended_plan_info ........................................................................................................... 31
get_plan_promotion_list .................................................................................................................. 32
get_promotion.................................................................................................................................. 32
get_sellable_plan_list ...................................................................................................................... 33
validate_plesk_login ........................................................................................................................ 34
HSPC/API/Billing ....................................................................................................................................... 35
calculate_order ................................................................................................................................ 35
Examples of ORD ER Hash .................................................................................................. 39
get_hosting_target_list..................................................................................................................... 49
place_order ...................................................................................................................................... 50
create_offline_payment ................................................................................................................... 56
Example of Test Code for create_offline_payment Function ............................................... 57
get_order_details ............................................................................................................................. 58
get_extended_attr_list ...................................................................................................................... 58
get_account_subscr .......................................................................................................................... 59
subscr_auth ...................................................................................................................................... 59
get_subscr_info ................................................................................................................................ 60
Example of get_subscr_info Returned Values ..................................................................... 64
create_custom_invoice .................................................................................................................... 97
get_account_campaigns ................................................................................................................... 98
HSPC/API/Account .................................................................................................................................... 99
create_customer ............................................................................................................................... 99
create_domain_contact .................................................................................................................. 101
create_reseller ................................................................................................................................ 102
get_account_info ........................................................................................................................... 103
Example of ACCOUNT_INFO Hash ................................................................................. 104
get_domain_contact_list ................................................................................................................ 106
get_reseller_terms .......................................................................................................................... 106
validate_password ......................................................................................................................... 106
get_extended_attr_list .................................................................................................................... 107
get_person_list ............................................................................................................................... 108
HSPC/API/Person ..................................................................................................................................... 110
auth_person.................................................................................................................................... 110
get_person_info ............................................................................................................................. 113
HSPC/API/Domain ................................................................................................................................... 114
check_domain_list ......................................................................................................................... 114
check_domain_name_syntax ......................................................................................................... 115
get_domain_list ............................................................................................................................. 115
validate_ns_list .............................................................................................................................. 116
save_contact .................................................................................................................................. 117
validate_domain_data .................................................................................................................... 118
HSPC/API/Mailer ..................................................................................................................................... 119
send ................................................................................................................................................ 119
HSPC/API/PP ........................................................................................................................................... 120
get_saved_paymethod_list ............................................................................................................. 120
get_plugin_list ............................................................................................................................... 121
get_layout_hash ............................................................................................................................. 121
get_redirect_hash ........................................................................................................................... 122
pay ................................................................................................................................................. 123
get_status ....................................................................................................................................... 124
HSPC/API/Fraud ...................................................................................................................................... 124
get_warning_newpaymethod ......................................................................................................... 124
get_resume_newpaymethod .......................................................................................................... 125
get_safe_description ...................................................................................................................... 125
HSPC/API/Config ..................................................................................................................................... 126
get_provider_config....................................................................................................................... 126
HSPC/API/Campaign ............................................................................................................................... 130
get_campaign ................................................................................................................................. 130
get_account_campaigns ................................................................................................................. 131
HSPC/API/SSL ......................................................................................................................................... 131
get_cert_form ................................................................................................................................ 131
validate_cert_form ......................................................................................................................... 132
get_parsed_csr_data....................................................................................................................... 133
Online Store Customization and Integration 134
Integrating Store With Existing W e bsite .................................................................................................. 137
Customizing Default Store Installa tion ..................................................................................................... 138
Simple Customization of Default Stor e Installation ...................................................................... 139
Advanced Customization of De fau lt Store Installation ................................................................. 140
Selecting Store Files Customizable via Web Interface .................................................................. 141
Manual Store Installation on Re mote Server ............................................................................................ 143
Customizing Store Localization ................................................................................................................ 145
User Interface Customization 148
Screens Customization Overview ............................................................................................................. 148
Template Based Customization ................................................................................................................ 153
Customizing Vendor Control Ce nt er (PCC/RCC) .................................................................................... 153
Components Repository ................................................................................................................ 153
Components Repository Structure and Files ...................................................................... 154
The filter Function Sample ................................................................................................. 155
New Component Sample .................................................................................................... 156
Screen Aliases Based Customi z a tion in Control Centers .............................................................. 160
Control Center Screen Customization Module Sample ...................................................... 162
Customizing Customer Control Panel....................................................................................................... 162
Control Panel Screen Structure ...................................................................................................... 162
Control Panel Top Frame and Tabs Customization ....................................................................... 166
Customizing Main Frame .............................................................................................................. 167
Customizing Control Panel Dashboa rd.......................................................................................... 169
Control Panel Dashboard Customization Module Location ............................................... 169
Control Panel Screens Customization Using Screen IDs .............................................................. 180
Customization API Methods .............................................................................................. 181
Discovering Screen ID and the Name of Screen Element to Customize ............................ 183
Customizing a Single Screen Form .................................................................................... 185
Customizing a Group of Screens ........................................................................................ 187
Examples of Screen ID Based Customization .................................................................... 187
Customizing Help Bar in Control Panel ........................................................................................ 190
Adding New Fields to Accounts Registration Form ................................................................................. 190
Extended Attributes Objects .......................................................................................................... 191
Custom Extended Attribute Code Samples ................................................................................... 191
Extending E-Mail Notification Te mplates ................................................................................................ 194
Placeholder Creation Tools ........................................................................................................... 195
Custom Placeholders Samples ....................................................................................................... 202
Creating Placeholders for Custom Extended Attributes ................................................................ 205
Customizing Language Packs ................................................................................................................... 206
Language Pack Customization Tools ............................................................................................ 206
Language Pack Customization Sample.......................................................................................... 210
Integration with External Helpdesk 213
External Helpdesk API ............................................................................................................................. 213
Adding New Language Pack 216
Parallels Business Automation - Standard Translation Capabilities ......................................................... 217
Preparing Directories and Files for New Language Pack ......................................................................... 218
Translating Interface ................................................................................................................................. 219
Translating General Labels and Messages..................................................................................... 220
Adding a new Translation .................................................................................................. 221
Translating ToolTips for M e nu Items ............................................................................................ 224
Translating the On-Screen Hints ................................................................................................... 224
Translating Help Files ................................................................................................................... 225
Translating the Context Help Pages for Control Panel ....................................................... 225
Translating the Online Help Pages for Control Centers ..................................................... 226
Translating Printable Documentatio n ................................................................................. 226
Plug-Ins Development 227
Plug-Ins Toolkit Methods ......................................................................................................................... 228
Anti-Fraud Plug-ins .................................................................................................................................. 229
Graphical Representation .............................................................................................................. 231
Middle Tier Module....................................................................................................................... 235
Header ................................................................................................................................ 235
Profile Hash ........................................................................................................................ 236
Class Info ........................................................................................................................... 238
Check Hand ler .................................................................................................................... 239
Post-Install Method ............................................................................................................ 240
Post-Installation Configuration Script ........................................................................................... 241
Anti-Fraud Manager Val ue Structure ............................................................................................ 242
Component repository configuration files ..................................................................................... 243
Anti-Fraud Plug-In Package Structure ........................................................................................... 243
Payment Method Plug-Ins Development Tools ........................................................................................ 244
Payment Method Plug-Ins Objects ................................................................................................ 244
Middle Tier Module....................................................................................................................... 245
Web Interface Module ................................................................................................................... 246
Payment Pl ug-Ins Development Tools ..................................................................................................... 247
Payment Pl ug-Ins Namespaces ...................................................................................................... 247
Methods and Parameters Common for all Payment Plug-Ins ........................................................ 248
Online Payment Plug-In Methods ................................................................................................. 249
Bank Transfer Plug-In Methods .................................................................................................... 257
Payment Plug-Ins Graphical Presentation ..................................................................................... 258
Creating a New Promotion Plug-In ........................................................................................................... 258
Introductory Notes About Promotion Plug-Ins .............................................................................. 259
Promotion Plug-Ins Objects and Their Naming Conventions ....................................................... 261
Web Interface Module ................................................................................................................... 262
Middle Tier Module....................................................................................................................... 263
Constants ............................................................................................................................ 266
Registeri ng a Promotion Plug-In ................................................................................................... 268
Domain Registration Plug-I n Development Tools .................................................................................... 270
Domain Plug-In Namespaces ........................................................................................................ 270
HSPC::MT::Plugin::DM Meth ods ................................................................................................. 270
Domain Lookup ................................................................................................................. 270
Operations With Domains .................................................................................................. 273
Operations With Name Servers .......................................................................................... 277
Operations With Contacts and D omain Extended Information .......................................... 279
Supporting 'W HO IS Pri vacy' Feature ................................................................................. 282
Supporting 'Lock Do main' Feature ..................................................................................... 283
Supporting Offline Operations ........................................................................................... 285
HSPC::Plugin::DM Methods ......................................................................................................... 286
Operations With Contact and Domain Extended Information............................................ 286
DM Plug-In Installat ion and Configuration ....................................................................... 290
Required Toolkit Methods ............................................................................................................. 292
Common Functions ............................................................................................................ 293
parse_template .................................................................................................................... 293
purify_fromxml_data ......................................................................................................... 293
DM Related Checking, Converting, F ormatting Functions ................................................ 294
get_domain_info................................................................................................................. 295
Creating a New DNS Plug-In ................................................................................................................... 295
Introductory Notes About DNS Plug-In ........................................................................................ 295
DNS Plug-In Objec ts and Their Naming Conventions....................................................... 296
Registeri ng a DNS Plug -In ............................................................................................................ 297
Web Interface Module ................................................................................................................... 298
form_ns() ............................................................................................................................ 299
view_ns() ............................................................................................................................ 302
save_ns() ............................................................................................................................ 304
is_reinstall_ns() .................................................................................................................. 306
Middle Tier Module....................................................................................................................... 306
install() ............................................................................................................................... 307
sync_zones() ....................................................................................................................... 308
check_is_reachable() .......................................................................................................... 309
SSL Certificate Plug-In Developmet Tools .............................................................................................. 309
SSL Certificate Plug-In Namespaces ............................................................................................. 309
Middle Tier Module....................................................................................................................... 310
Configuration Information ................................................................................................. 310
SSL Certificate Issuing ....................................................................................................... 313
Graphical Presentation Module ..................................................................................................... 318
Plug-In Configuration ........................................................................................................ 318
SSL Certificate Configuration ............................................................................................ 320
Building New Plug-In ............................................................................................................................... 324
Tools 327
Bulk Domain Registration / Transfer ........................................................................................................ 327
Credit Card Import .................................................................................................................................... 327
Bank Accounts Import .............................................................................................................................. 328
Migration from Parallels Plesk Billing ..................................................................................................... 328
Bulk Parallels Plesk Domains / Clients Resolving ................................................................................... 328
Script Checking Domain Renewal Date Using W HOIS Information ....................................................... 328
Cleaning Tool ........................................................................................................................................... 329
DNS Synchronization Tool ....................................................................................................................... 330
Parallels Virtuozzo Containers Integration ............................................................................................... 330
Virtuozzo Templates Installing Tool ............................................................................................. 331
Tools for Act ions Execut ion over/in Container ............................................................................. 333
Using Data Import and Export Command Line Tools .............................................................................. 334
Exporting Data into XML Files ..................................................................................................... 335
Importing Billing Data in the Form of XML File .......................................................................... 341
Importing Subscriptions Using XML API ..................................................................................... 343
Examples of XML Files Used for Billing Data Import ................................................................. 344
Account Data in XML File ................................................................................................. 345
Document Data in XML File .............................................................................................. 348
Example of XML File for Traffic Classes Import ......................................................................... 351
Example of XML File for Traffic Statistics Import ....................................................................... 353
Import-Data Script ......................................................................................................................... 356
Index 359
9
Items you must select, such as menu options, command
Titles of chapters, sections,
Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be
The names of commands,
The license file is located in
C
HAPTER
1

Preface

In This Chapter
Typographical Conventions .................................................................................................. 9
Feedback ............................................................................................................................... 10
Shell Prompts in Command Examples .................................................................................. 10
General Conventions ............................................................................................................. 11

Typographical Conventions

Before you start using this guide, it is important to understand the documentation conventions used in it.
The following kinds of formatting in the text identify special information.
Formatting convention Type of Information Example
Special Bold
buttons, or items in a list.
and subsect ions.
Italics
replaced with a real name or value.
Monospace
files, directories, and do main names.
Go to the System tab.
Read the Basic Administration chapter.
The system supports the so called wildcard character search.
the
http://docs/common/ licenses directory.
Preface 10
Preformatted
On-screen computer output in
other programming
# ls –al /files
Preformatted Bold
What you type, contrasted
screen computer
# cd /root/rpms/php
Names of keys on the
Key combinations for which the user must press and hold
your command-line sessions; source code in XML, C++, or
languages.
with on­output.
total 14470
CAPITALS
keyboard.
KEY+KEY
down one ke y and the n press another.
SHIFT, CTRL, ALT
CTRL+P, ALT+F4

Feedback

If you have found a mistake in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback using the online form at http://www.parallels.com/en/support/usersdoc/. Please include in your report the guide's title, chapter and section titles, and the fragment of text in which you have found an error.

Shell Prompts in Command Examples

Command line examples throughout this guide presume that you are using the Bourne-again shell (bash). Whenever a command can be run as a regular user, we will display it with a dollar sign prompt. When a command is meant to be run as root, we will display it with a hash mark prompt:
Bourne-again shell prompt
Bourne-again shell root prompt
$
#
Preface 11

General Conventions

Be aware of the following conventions used in this book. Chapters in this guide are divided into sections, which, in turn, are subdivided into
subsections. For example, Documentation Conventions is a section, and General Conventions is a subsection.
When following steps or using examples, be sure to type double-quotes ("), left single-
quotes (`), and right single-quotes (') exactly as shown.
The key referred to as RETURN is labeled ENTER on some keyboards. The root path usually includes the /bin, /sbin, /usr/bin and /usr/sbin directories, so
the steps in this book show the commands in these directories without absolute path names. Steps that use commands in other, less common, directories show the absolute paths in the examples.
12
HSPC/API/SSL ..................................................................................................................... 131
C
HAPTER
2

XML API

XML API has been developed to become primary point of integration with external shopping carts, billing, and accounting systems and other third-party components.
In This Chapter
Introduction to Parallels Business Automation - Standard XML API .................................. 13
HSPC/API ............................................................................................................................. 18
HSPC/API/HP ....................................................................................................................... 20
HSPC/API/Billing ................................................................................................................. 35
HSPC/API/Account .............................................................................................................. 99
HSPC/API/Person ................................................................................................................. 110
HSPC/API/Domain ............................................................................................................... 114
HSPC/API/Mailer ................................................................................................................. 119
HSPC/API/PP........................................................................................................................ 120
HSPC/API/Fraud ................................................................................................................... 124
HSPC/API/Config ................................................................................................................. 126
HSPC/API/Campaign ............................................................................................................ 130
XML API 13

Introduction to Parallels Business Automation - Standard XML API

Parallels Business Automation - Standard XML API Gate is based on SOAP protocol, currently maintained by World Wide Web Consortium at http://www.w3c.org and supported by most of modern programming languages as framework for messages exchange and remote method calls.
Parallels Business Automation - Standard XML API Gate is implemented as mod_perl handler and inherits from SOAP::Transport::HTTP::Apache, i.e. is based on the functionality provided by SOAP::Lite module available from CPAN. Please, refer to SOAP::Lite documentation for general information and this section provides implementation details and examples.
Module namespaces are package names with '::' included are replaced with '/' - see examples below.
Security There are two different strategies used by Parallels Business Automation - St andard XML API
Gate in defining security requirements: For requests coming from a local machine (directly to backend server without involving
frontend, i.e. originating from the same address space and using http://localhost:8080 or https://localhost:8443 as Parallels Business Automation - Standard XML API Gate proxy URL).
For requests coming from remote machines (using frontend for proxying requests to
backend).
Safe packages and methods:
local requests: all packages are considered safe and all their methods are public remote requests: only packages with namespace starting with HSPC/API are considered as
safe
Authentication and sessions handling: local requests: authentication by password is possible, but not required, authentication is
possible by account number only,
remote requests: authentication by password is required. Authentication is done with call to session_open() interface in HSPC/API (on page 18)
namespace and relies on functionality provided by Security Manager.
Interfaces in HSPC/API namespace: session_open()
Parameters: account_no, e-mail, password Performs authentication with given parameters (required for remote requests and optional
for local, except for account_no or server_name) and initializes session.
XML API 14
If account_no is set to 0, first account which user has roles in is chosen automatically, but in this case e-mail and password must be set as well.
If server_name is passed and account_no is empty or missing, account_no is located by vendor's server name located in server_name parameter.
Returns either unique value to be used as HSPC-SID in next requests (see examples of clients) or SOAP fault envelope with error message.
session_close()
Performs cleanup of session identified by HSPC-SID header. Returns undef or SOAP fault envelope with error message.
Configuration Parallels Business Automation - Standard XML API Gate intended for requests from both
local and remote machines is pre-configured at /hspc/xml-api location. backend
/etc/hspcd/conf/hspc_xml-api.conf
<Location /hspc/xml-api> SetHandler perl-script PerlHandler HSPC::XMLAPI Order Allow,Deny Allow from all </Location>
frontend
/etc/httpd/conf/hspc_frontend.conf:
XML API 15
<VirtualHost _default_:443> ... SSLEngine on ... <Location /hspc/xml-api> Order Deny,Allow Allow from all </VirtualHost>
<Location /hspc/xml-api> Order Deny,Allow Deny from all </Location>
Security limitation is set by explicitly allowing /hspc/xml-api location for HTTPS connections and denying for HTTP connections, so that plain text SOAP envelopes couldn't be read by intruders.
Parallels Business Automation - Standard XML API Gate could be opened at another locations as well by configuring backend and frontend server in the same way as described above, i.e. by adding more Location blocks to backend and frontend servers' configurations.
Servers Exported methods of packages providing API through Parallels Business Automation - Standard
XML API Gate should rely on the following rules: in order to be available for remote requests, a package name should start from
HSPC::API:: prefix and have its version set:
our $VERSION = 1.0;
first parameter of each call to exported method is always package name, not reference or
whatever;
$ENV{session} is valid only for requests including session ID returned by
session_open() call, i.e. could be valid for local and always valid for remote requests;
$ENV{security_obj} is valid only for requests including session ID and contains valid
account and user IDs identified by call to session_open() (on page 18);
die with error message to immediately return it in SOAP fault envelope with message as
description, using the call like this:
## return fault with: ## - error code 'ErrorCode' ## - error message die HSPC::API->fault('ErrorCode', 'Error description.');
Notes for HSPstore: If error code starts with the User prefix, its description is shown to PHP Store visitor, so it
must be localized:
die HSPC::API->fault('UserPassword', string('passwords_do_not_match'));
If error code does not start with the User prefix, its description is not shown to PHP Store visitor and is only logged to vendor's local log file, so it must not be localized:
XML API 16
die HSPC::API->fault('AuthenRequired', 'Authentication required.');
feel free to return any data structures that you can theo retically ser ialize to XML - and do not expect an object to arrive at remote side by just returning its blessed reference (guess why it's just ridiculous).
Examples
HSPC/Test.pm (local requests):
package HSPC::Test; use strict; use Data::Dumper; ## returns dump of parameters list, including class name sub method { return Dumper(\@_); } 1;
HSPC/API/Test.pm (remote requests):
package HSPC::API::Test; use strict; our $VERSION = 1.0; ## gets/sets parameter with key passed as a parameter sub param { my (undef, $key, $value) = @_; return defined $value ? $ENV{session}->{$key} = $value : $ENV{session}->{$key}; } 1;
Clients In order to initialize stable communi cation with Parallels Business Automation - Standard XML
API Gate, first call session_open() in HSPC/API (on page 18) namespace to receive HSPC-SID value and then add HSPC-SID to either HTTP or SOAP headers to each request before sending SOAP envelope.
Examples
local.pl:
use SOAP::Lite; use strict; my $result = SOAP::Lite
->proxy('http://127.0.0.1:8080/hspc/xml-api') ## Gate URL
->ns('HSPC/Test') ## package namespace
->method ## method name ('param1', {param2 => 'test', param3 => [1, 2, 3]}, 0); ## parameters print $result->fault ? 'Fault: ' . $result->faultstring : 'Result: ' . $result->result;
local.php:
<? require_once('nusoap.php'); $client = new soap_client('http://127.0.0.1:8080/hspc/xml-api'); // Gate URL $result = $client->call( 'method', // method name array ("param1", array ("param2" => "test", "param3" => array (1, 2, 3)),
0), // parameters 'HSPC/Test' // package namespace
XML API 17
); if ($client->fault) die("Fault: {$client->faultstring}"); echo $result; ?>
remote.pl:
use strict; use SOAP::Lite; my $client = SOAP::Lite
->proxy('https://192.168.0.100/hspc/xml-api')
->on_fault(sub {die 'Fault: ' . $_[1]->faultstring}); ## pass authentication and receive session ID my $sid = $client->ns('HSPC/API/1.0')->session_open({ email => 'email@provider.com', password => 'password' })->result->{session_id}; ## put session ID to outgoing requests' HTTP headers $client->transport->http_request->header('HSPC-SID' => $sid); ## make session-dependent calls $client->ns('HSPC/API/Test/1.0'); $client->param('key' => 'value'); print $client->param('key')->result; $client->ns('HSPC/API/1.0')->session_close;
remote.php
<? require_once('nusoap.php'); $client = new soap_client('https://192.168.0.100/hspc/xml-api'); // Gate URL ## pass authentication and receive session ID $sid_result = $client->call('session_open', array ( array ('email' => 'root@provider.com', 'password' => '1q2w3e') ), 'HSPC/API/1.0'); $sid = $sid_result['session_id']; if ($client->fault) die("Fault: {$client->faultstring}"); ## put session ID to outgoing requests' SOAP headers $client­>setHeaders("<HSPC-SID>$sid</HSPC-SID>"); ## make session-dependent calls $client->call('param', array ('key', 'value'), 'HSPC/API/Test/1.0'); if ($client->fault) die("Fault: {$client->faultstring}"); echo $client->call('param', array ('key'), 'HSPC/API/Test/1.0') . "\n"; if ($client->fault) die("Fault: {$client->faultstring}"); $client->call('session_close', undef, 'HSPC/API/1.0'); if ($client->fault) die("Fault: {$client->faultstring}"); ?>
XML API 18

HSPC/API

ID of a vendor account a session is to be
parameter is to be passed in
case of a local Store installation. Optional
Vendor server name used for authentication. This parameter is to be passed in case of a local
rameter in case
mail. Parameter is to be
specified in case of the Store remote
Registered person password. Parameter is to be
e of the Store remote
The numerical identifier of an account a session has been opened for. Account ID is
account ID is

session_open

The function opens session with Parallels Business Automation - Standard XML API server. The input parameters composition depends on the store installation: (local, i.e. Store is installed on the same server as Parallels Business Automation - Standard or remote, i.e., the Store installed on a remote server).
In the function call the namespace must be followed by API version number, e.g. HSPC/API/1.0
Note: Sess ion ID return ed by session_open must be included in HTTP Headers or SOAP Headers for all the other methods called in the frame of each session.
Parameters:
account_id
opened for. This
parameter in case server_name is specified.
server_name
Store installation. Optional pa account_id is specified.
email Registered person e-
installation together with the password parameter.
password
specified in cas installation together with the email parameter.
Returns: {
account_id =>
session_id => }
Parameter Means
account_id
returned in any case, a vendor then used by the other Store API functions.
session_id The identifier of the opened session.
XML API 19
Common SOAP Faults codes:
Mandatory parameter missing from SOAP
Mandatory parameter missing from SOAP
UserError
method call
WrongParams Invalid method parameters
No specific SOAP Faults codes.

session_close

The function closes session.
In the method call the namespace must be followed by API version number, e.g. HSPC/API/1.0
The function usage is not necessary but recommended.
No parameters.
No return value.
Common SOAP Faults codes:
UserError
method call
WrongParams Invalid method parameters
No specific codes.
XML API 20

HSPC/API/HP

Optional parameter: ID of OS template selected for a hosing plan. If not passed, then
return the result as if OS template with the lowest ID (from OSes included in hosting plan) was passed as
Hosting plan passed as an argument does not
Application(s) passed are incompatible with

check_app_compat

The function checks applications compatibility in Plesk and Virtuozzo Container hosting plans.
Parameters:
hp_sid
app_list
os_tmpl
Returns: result => 1 on success or Fault
SOAP Faults codes:
HPNoApplicationSupport
UserAppIncompat
Hosting plan series key
The list of application templates IDs.
the method will
os_tmpl.
support an application.
each other.
XML API 21

check_license_compat

Hosting plan does not support at least one
The function checks licenses compatibility in hosting plans.
Parameters:
hp_sid
lic_list
Hosting plan series key
The list of licenses IDs
Returns: result => 1 on success or Fault
SOAP Faults codes:
HPNoLicClassSupport
license
HPBaseLicConflict
HPNoBaseForAddon
Base licenses specified are incompatible.
No base license has been specified for an add­on license.
XML API 22

get_categorized_plan_list

Optional parameter: The ID of hosting plan Optional parameter: ID of promotion to be
Optional parameter: ID of account the prices
Optional parameter: Trial site ID. The
efined on redirect from
Optional parameter:Sitebuilder node numeric
Provider account ID is used to get hosting
The method returns the list of hosting plans grouped by categories. Only the basic information is returned.
The method is similar to get_sellable_plan_list (on page 33). Input parameters are the same, but output parameters differ: the list of returned hosting plans is grouped by categories.
Parameters:
type_id
type. Only hosting plans of the type specified will be returned .
promo_id
applied to hosting plans prices.
account_id
are to be calculated for.
sb_sid
parameter is pred Sitebuilder.
sb_node
Returns: plan _l is t => HP li st
SOAP Faults codes:
HPProviderNotAllowed
ID assigned in PBAS.
plan details. Only customer or reseller account ID is allowed as parameter.
XML API 23

get_extended_plan_info

Optional parameter: Hosting plan series key. If not specified, the information about default
Optional parameter: The ID of promotion to be
account the prices
Optional parameter: Subscription period the
Optional parameter: If this parameter is
ons (custom
Optional parameter: ID of OS template selected for a hosing plan. If not passed, then the method will return the result as if OS template with the lowest ID (from OSes included in hosting plan) was passed as
The for_trial parameter has been specified, but
Hosting plan series key is not specified and
Provider account ID is used to get hosting plan details. Only customer or reseller account ID is
The function returns extended information about a hosting plan. Extended information is all the data not shown in hosting plans listing.
Parameters:
hp_sid
domain hosting plan will be returned.
promo_id
applied to hosting plan prices.
account_id
Optional parameter: ID of are to be calculated for.
period
discounts are to be calculated for.
for_trial
specified then zero prices for add­attributes, applications, etc.) will be returned.
os_tmpl
os_tmpl.
Returns: EXTENDED_HP_INFO (on page 24)
SOAP Faults codes:
HPNoTrial
a hosting plan does not support trial periods.
HPNotFound The hosting plan specified is not found.
HPNoDefaultDMPlan
default domain hosting plan does exist.
HPProviderNotAllowed
allowed as parameter.
XML API 24
Example of EXTENDED_HP_INFO Hash
$VAR1 = { 'dns_hosting' => { 'is_unlim' => '0', 'included_value' => '5', 'max_value' => '10', 'overuse_rate' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '1.00',
'is_complimentary' => '0' }, 'price' => '439182056', 'full_discount_period' => undef, 'promo_name' => undef } }, 'assigned_dm_plan' => '2', 'is_trial' => '0', 'vendor_id' => '1', 'name' => 'Domain Registration Support', 'provider_id' => '1', 'description' => '', 'question_list' => [ { 'question' => 'How do you like services included in your subscription?', 'answer' => undef, 'id' => '1' } ], 'custom_attribute_list' => [ { 'is_exclusive' => '1', 'cat_name' => 'Support' 'cat_id' => '1' 'cat_sort_order' => '1' 'option_list' => [ { 'is_default' => '0', 'sort_order' => '17', 'name' => 'Support by phone', 'is_included' => '0', 'upgrade_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
XML API 25
'discount_amount' => undef,
'promo_amount' => undef,
'price_original' => {
'price' => '50.0000',
'is_complimentary' => '0'
},
'price' => '437640876',
'full_discount_period' => undef,
'promo_name' => undef }, 'setup_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
'discount_amount' => undef,
'promo_amount' => undef,
'price_original' => {
'price' => '20.0000',
'is_complimentary' => '0'
},
'price' => '382151368',
'full_discount_period' => undef,
'promo_name' => undef }, 'subscr_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
'discount_amount' => undef,
'promo_amount' => undef,
'price_original' => {
XML API 26
'price' => '50.0000',
'is_complimentary' => '0'
},
'price' => '440264964',
'full_discount_period' => undef,
'promo_name' => undef }, 'id' => '17' }, { 'is_default' => '0', 'sort_order' => '18', 'name' => 'ICQ Consultant', 'is_included' => '0', 'upgrade_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
'discount_amount' => undef,
'promo_amount' => undef,
'price_original' => {
'price' => '30.0000',
'is_complimentary' => '0'
},
'price' => '438862184',
'full_discount_period' => undef,
'promo_name' => undef }, 'setup_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
'discount_amount' => undef,
XML API 27
'promo_amount' => undef,
'price_original' => {
'price' => '20.0000',
'is_complimentary' => '0'
},
'price' => '440650072',
'full_discount_period' => undef,
'promo_name' => undef }, 'subscr_fee' => {
'is_discount' => '0',
'promo_period' => undef,
'promo_percent' => undef,
'is_promo' => '0',
'discount_percent' => undef,
'discount_amount' => undef,
'promo_amount' => undef,
'price_original' => {
'price' => '30.0000',
'is_complimentary' => '0'
},
'price' => '439183520',
'full_discount_period' => undef,
'promo_name' => undef }, 'id' => '18' } ], 'sort_order' => '0', 'is_required' => '0', 'name' => 'Miscellaneous', 'id' => '6' } ], 'summary' => '', 'fee_list' => [ { 'setup_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef,
XML API 28
'price_original' => { 'price' => '10.0000',
'is_complimentary' => '0' }, 'price' => '440550508', 'full_discount_period' => undef, 'promo_name' => undef }, 'subscr_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '5.0000',
'is_complimentary' => '0' }, 'price' => '440553148', 'full_discount_period' => undef, 'promo_name' => undef }, 'period' => '2592000' }, { 'setup_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '20.0000',
'is_complimentary' => '0' }, 'price' => '439338076', 'full_discount_period' => undef, 'promo_name' => undef }, 'subscr_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '10.0000',
'is_complimentary' => '0' }, 'price' => '440307792', 'full_discount_period' => undef, 'promo_name' => undef },
XML API 29
'period' => '7776000' }, { 'setup_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '30.0000',
'is_complimentary' => '0' }, 'price' => '439238836', 'full_discount_period' => undef, 'promo_name' => undef }, 'subscr_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '15.0000',
'is_complimentary' => '0' }, 'price' => '440439372', 'full_discount_period' => undef, 'promo_name' => undef }, 'period' => '15552000' }, { 'setup_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '40.0000',
'is_complimentary' => '0' }, 'price' => '438988552', 'full_discount_period' => undef, 'promo_name' => undef }, 'subscr_fee' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef,
XML API 30
'promo_amount' => undef, 'price_original' => { 'price' => '20.0000',
'is_complimentary' => '0' }, 'price' => '440380584', 'full_discount_period' => undef, 'promo_name' => undef }, 'period' => '31104000' } ], 'id' => '21', 'category' => undef, 'type' => { 'summary' => 'Miscellaneous hosting plans designed for selling any arbitrary services. It gives highest flexibility together with Custom Attributes and Questionnaire.', 'name' => 'Miscellaneous', 'id' => '7', 'description' => '' }, 'qos_list' => [ { 'is_unlim' => '0', 'incl_amount' => '5', 'max_amount' => '10', 'overuse_rate' => { 'is_discount' => '0', 'promo_period' => undef, 'promo_percent' => undef, 'is_promo' => '0', 'discount_percent' => undef, 'discount_amount' => undef, 'promo_amount' => undef, 'price_original' => { 'price' => '1.00',
'is_complimentary' => '0' }, 'price' => '439020192', 'full_discount_period' => undef, 'promo_name' => undef }, 'id' => '4000', 'name' => 'Number of domains with DNS hosting provided', 'is_metered' => '0', 'short_name' => 'numdnshosting', 'units' => 'domain(s)', 'is_rateable' => '1', 'multiplier' => '1' } ], 'series_key' => '3' };
Loading...
+ 332 hidden pages