API Reference

Contents

  1. SUMMARY
    1. Conventions used in this document
    2. Syntax
  2. VERSION
    1. Objects
    2. Extensions
  3. INITIAL COMMANDS
    1. Greeting
    2. Log In
    3. Log Out
  4. PACKAGE SETUP AND DELETION COMMANDS
    1. Creating Web Hosting Packages
    2. Deleting Web Hosting Packages
    3. Deactivating Web Hosting Packages
    4. Reactivating Web Hosting Packages
  5. PACKAGE MAINTENANCE COMMANDS
    1. Inspecting Web Hosting Packages
    2. Listing Web Hosting Packages
    3. Changing Web Hosting Package Types
    4. Adding Domain Names to Web Hosting Packages
    5. Removing Domain Names from Web Hosting Packages
    6. Renaming Web Hosting Packages
    7. Changing Web Hosting Package Limits
    8. Adding Stop The Hacker to Packages
    9. Removing Stop The Hacker to Packages
    10. Adding SiteGuard to Packages
    11. Removing SiteGuard from Packages
  6. PACKAGE AUTHENTICATION AND ACTION COMMANDS
    1. Changing Web Hosting Package Passwords
    2. eXtend Control Panel Pre-Authentication
    3. Resending Welcome Emails
  7. PACKAGE TYPE COMMANDS
    1. Listing Welcome Emails
    2. Creating Web Hosting Package Types
    3. Listing Web Hosting Package Types
    4. Examining Web Hosting Package Types
    5. Updating Web Hosting Package Types
    6. Examining Web Hosting Package Resource Usage
  8. SUPPORT DATABASE COMMANDS
    1. Listing Support Database Categories
    2. Querying the Support Database
    3. Getting a Support Question
    4. Retrieving the status page data
  9. DATABASE COMMANDS
    1. Create A Database
    2. Delete (Cancel) a Database
    3. List Databases
    4. Inspect Database
    5. Renew a Database
  10. MAILBOX COMMANDS
    1. Create A Mailbox
    2. Update (upgrade) A Mailbox
    3. Delete (Cancel) a Mailbox
    4. List Mailboxes
    5. Inspect Mailbox
    6. Renew a Mailbox
  11. SERVER COMMANDS
    1. Prepare a Dedicated Server Order
    2. Prepare a VPS Order
    3. Check Existing Server Order
    4. List Servers
    5. Inspect Dedicated Server
    6. Inspect VPS
    7. Prepare a VPS Upgrade Order
    8. Check Existing VPS Upgrade Order
    9. Power a VPS on/off, or reboot
  12. BILLING COMMANDS
    1. Listing Invoices
  13. WEB BUILDER PLUS COMMANDS
    1. List Web Builder Plus
  14. PERSONALISED SECURE SERVER COMMANDS
    1. List Secure Server Instances
  15. EMAIL ANTI-VIRUS COMMANDS
    1. List Email Anti-virus Instances
  16. SITEDESIGNER COMMANDS
    1. Creating SiteDesigner Instances
    2. Creating SiteDesigner Trial Instances
    3. Listing SiteDesigner Instances
    4. Control Panel Pre-Authentication
    5. Changing SiteDesigner Types
  17. SCHEMAS
    1. Filenames
  18. NOTES
    1. WHAPI Error codes
    2. Loading Multiple Versions of One Object or Extension
  19. Changelog
    1. 2015-11-24 Documentation: server-2.2
    2. 2014-09-01 package-2.2 ext-package-2.2
    3. 2014-01-28 ext-server-2.2 server-2.2
    4. 2014-01-27 package-2.1 ext-package-2.1 offsite-package-2.2 ext-offsite-package-2.2
    5. 2013-05-08 offsite-package-2.1 ext-offsite-package-2.1
    6. 2012-10-30 ext-antivirus-2.0.xsd ext-billing-2.0.xsd ext-database-2.0.xsd database-2.0.xsd ext-dns-2.0.xsd ext-mailbox-2.0.xsd mailbox-2.0.xsd offsite-package-2.0.xsd ext-package-2.0.xsd package-2.0.xsd ext-security-2.0.xsd ext-server-2.0.xsd server-2.0.xsd ext-support-2.0.xsd support-2.0.xsd ext-wbp-2.0.xsd
    7. 2012-08-22 ext-package-1.3
    8. 2012-07-12 package-1.5 ext-package-1.2
    9. 2012-04-27 offsite-package-1.0
    10. 2012-01-12 ext-support-1.1
    11. 2011-12-14 server-1.3 ext-server-1.3
    12. 2011-10-26 mailbox-1.2 ext-mailbox-1.1
    13. 2011-07-11 ext-package-1.1
    14. 2011-05-31 ext-dns-1.0
    15. 2011-03-31
    16. 2010-11-30 database-1.1 ext-antivirus-1.0 ext-billing-1.0 ext-contact-1.0 ext-database-1.0 ext-domain-1.0 ext-mailbox-1.0 ext-host-1.0 ext-null-1.0 ext-package-1.0 ext-security-1.0 ext-server-1.0 ext-support-1.0 ext-wbp-1.0 ext-whapi-1.0 mailbox-1.1 null-1.1 package-1.4 server-1.1 support-1.3 whapi-common-1.0
    17. 2010-11-26 billing-1.2
    18. 2010-11-08
    19. 2010-09-02 server-1.0
    20. 2010-08-11 database-1.0 mailbox-1.0
    21. 2010-08-11 whapi-1.1 null-1.0 package-1.3 contact-1.1 domain-1.2 support-1.2
    22. 2010-03-26 package-1.2
    23. 2009-10-30
    24. 2009-10-08
    25. 2009-10-07
    26. 2009-09-29
    27. 2009-09-25 package-1.1
    28. 2009-09-23 support-1.1
    29. 2009-09-22 domain-1.1
    30. 2009-09-09
    31. 2009-07-21
    32. 2009-07-13 whapi-1.0 package-1.0 contact-1.0 domain-1.0

SUMMARY [^Back to contents]

This document covers the full reseller API features which do not apply to domain resellers. For documentation of the protocol and domain features, please see: https://api.heartinternet.uk/api2.html

This only documents the latest version of the specification (see SCHEMAS); for an indication of what has changed since older versions, please see CHANGELOG.

Conventions used in this document [^Back to contents]

Package

Refers to a single web site, and more specifically to all configuration and authentication data related to it.

Package type

Refers to the configuration which could apply to a newly set-up web site, and may be the basis for the configuration of some existing packages

Syntax [^Back to contents]

To provide guidance in how to form the request, as well as the examples we've included a brief description of the syntax of that specific command. Conventions used for those tables are:

<something>

An element called "something"

(something)

Some kind of text content:

(empty)

The empty string

(number)

A number, usually a positive integer

(text)

Any other kind of text content

"something"

literally the text quoted.

something

An attribute

?

Zero or one of the preceding item

*

Zero or more of the preceding item

+

One or more of the preceding item

For any responses which are completely standard (ie, just a response code and a possible error message), no syntax will be given.

VERSION [^Back to contents]

This document describes the following API component versions only:

Objects [^Back to contents]

database-2.0
mailbox-2.0
offsite-package-2.2
package-2.2
server-2.2
support-2.0

Extensions [^Back to contents]

ext-antivirus-2.0
ext-billing-2.0
ext-database-2.0
ext-dns-2.0
ext-mailbox-2.0
ext-offsite-package-2.2
ext-package-2.2
ext-security-2.0
ext-server-2.2
ext-support-2.0
ext-wbp-2.0

INITIAL COMMANDS [^Back to contents]

Greeting [^Back to contents]

This just does a very simple test to make sure you're getting a response. You just send the empty command "hello". In response, you get an EPP greeting, which identifies all objects which are valid (objURI), and all extensions which are available (extURI). You will need to specify which you intend to use when you log in.

What to send

Syntax

KeyAttributesContentsNotes
<hello>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <hello />
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->emptyTag('hello');
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'hello');
    $l->appendChild($c);
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current.add_element('hello', {})
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version="1.0" encoding="utf-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <greeting>
    <svID>Heart Internet Test API Server</svID>
    <svDate>2010-08-17T12:34:53Z</svDate>
    <svcMenu>
      <version>1.0</version>
      <lang>en-GB</lang>
      <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
      <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/database-2.0</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/mailbox-2.0</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/null-2.0</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/package-2.2</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/server-2.2</objURI>
      <objURI>http://www.heartinternet.co.uk/whapi/support-2.0</objURI>
      <svcExtension>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-billing-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-database-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-dns-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-domain-2.5</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-contact-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-host-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-null-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-package-2.2</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-security-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-server-2.2</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-support-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-wbp-2.0</extURI>
        <extURI>http://www.heartinternet.co.uk/whapi/ext-whapi-2.0</extURI>
      </svcExtension>
    </svcMenu>
    <dcp>
      <access>
        <all />
      </access>
      <statement>
        <purpose>
          <admin />
          <prov />
        </purpose>
        <recipient>
          <ours />
        </recipient>
        <retention>
          <indefinite />
        </retention>
      </statement>
    </dcp>
  </greeting>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'greeting' => {
        'svcMenu' => {
            'svcExtension' => {
                  'extURI' => [
                     'http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-billing-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-database-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-dns-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-domain-2.5',
                     'http://www.heartinternet.co.uk/whapi/ext-contact-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-host-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-null-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-package-2.2',
                     'http://www.heartinternet.co.uk/whapi/ext-security-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-server-2.2',
                     'http://www.heartinternet.co.uk/whapi/ext-support-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-wbp-2.0',
                     'http://www.heartinternet.co.uk/whapi/ext-whapi-2.0'
                   ]
                },
            'lang' => 'en-GB',
            'version' => '1.0',
            'objURI' => [
               'urn:ietf:params:xml:ns:contact-1.0',
               'urn:ietf:params:xml:ns:domain-1.0',
               'http://www.heartinternet.co.uk/whapi/database-2.0',
               'http://www.heartinternet.co.uk/whapi/mailbox-2.0',
               'http://www.heartinternet.co.uk/whapi/null-2.0',
               'http://www.heartinternet.co.uk/whapi/package-2.2',
               'http://www.heartinternet.co.uk/whapi/server-2.2',
               'http://www.heartinternet.co.uk/whapi/support-2.0'
                ]
             },
        'svDate' => '2010-08-17T12:34:53Z',
        'svID' => 'Heart Internet Test API Server',
        'dcp' => {
           'statement' => {
              'recipient' => {
                    'ours' => {}
                  },
              'purpose' => {
                  'admin' => {},
                  'prov' => {}
                   },
              'retention' => {
                    'indefinite' => {}
                  }
               },
           'access' => {
              'all' => {}
               }
            }
         }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => greeting
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => svID
              [type] => complete
              [level] => 3
              [value] => Heart Internet Test API Server
          )
  
      [3] => Array
          (
              [tag] => svDate
              [type] => complete
              [level] => 3
              [value] => 2010-08-17T12:34:53Z
          )
  
      [4] => Array
          (
              [tag] => svcMenu
              [type] => open
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => version
              [type] => complete
              [level] => 4
              [value] => 1.0
          )
  
      [6] => Array
          (
              [tag] => lang
              [type] => complete
              [level] => 4
              [value] => en-GB
          )
  
      [7] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => urn:ietf:params:xml:ns:contact-1.0
          )
  
      [8] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => urn:ietf:params:xml:ns:domain-1.0
          )
  
      [9] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/database-2.0
          )
  
      [10] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/mailbox-2.0
          )
  
      [11] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/null-2.0
          )
  
      [12] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/package-2.2
          )
  
      [13] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/server-2.2
          )
  
      [14] => Array
          (
              [tag] => objURI
              [type] => complete
              [level] => 4
              [value] => http://www.heartinternet.co.uk/whapi/support-2.0
          )
  
      [15] => Array
          (
              [tag] => svcExtension
              [type] => open
              [level] => 4
          )
  
      [16] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0
          )
  
      [17] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-billing-2.0
          )
  
      [18] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-database-2.0
          )
  
      [19] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-dns-2.0
          )
  
      [20] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-domain-2.5
          )
  
      [21] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-contact-2.0
          )
  
      [22] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0
          )
  
      [23] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-host-2.0
          )
  
      [24] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-null-2.0
          )
  
      [25] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
          )
  
      [26] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-security-2.0
          )
  
      [27] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-server-2.2
          )
  
      [28] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-support-2.0
          )
  
      [29] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-wbp-2.0
          )
  
      [30] => Array
          (
              [tag] => extURI
              [type] => complete
              [level] => 5
              [value] => http://www.heartinternet.co.uk/whapi/ext-whapi-2.0
          )
  
      [31] => Array
          (
              [tag] => svcExtension
              [type] => close
              [level] => 4
          )
  
      [32] => Array
          (
              [tag] => svcMenu
              [type] => close
              [level] => 3
          )
  
      [33] => Array
          (
              [tag] => dcp
              [type] => open
              [level] => 3
          )
  
      [34] => Array
          (
              [tag] => access
              [type] => open
              [level] => 4
          )
  
      [35] => Array
          (
              [tag] => all
              [type] => complete
              [level] => 5
          )
  
      [36] => Array
          (
              [tag] => access
              [type] => close
              [level] => 4
          )
  
      [37] => Array
          (
              [tag] => statement
              [type] => open
              [level] => 4
          )
  
      [38] => Array
          (
              [tag] => purpose
              [type] => open
              [level] => 5
          )
  
      [39] => Array
          (
              [tag] => admin
              [type] => complete
              [level] => 6
          )
  
      [40] => Array
          (
              [tag] => prov
              [type] => complete
              [level] => 6
          )
  
      [41] => Array
          (
              [tag] => purpose
              [type] => close
              [level] => 5
          )
  
      [42] => Array
          (
              [tag] => recipient
              [type] => open
              [level] => 5
          )
  
      [43] => Array
          (
              [tag] => ours
              [type] => complete
              [level] => 6
          )
  
      [44] => Array
          (
              [tag] => recipient
              [type] => close
              [level] => 5
          )
  
      [45] => Array
          (
              [tag] => retention
              [type] => open
              [level] => 5
          )
  
      [46] => Array
          (
              [tag] => indefinite
              [type] => complete
              [level] => 6
          )
  
      [47] => Array
          (
              [tag] => retention
              [type] => close
              [level] => 5
          )
  
      [48] => Array
          (
              [tag] => statement
              [type] => close
              [level] => 4
          )
  
      [49] => Array
          (
              [tag] => dcp
              [type] => close
              [level] => 3
          )
  
      [50] => Array
          (
              [tag] => greeting
              [type] => close
              [level] => 2
          )
  
      [51] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0' encoding='UTF-8'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "greeting"
                           (...).children[0].name = "svID"
                                       (...).children[0].to_s = "Heart Internet Test API Server"
                           (...).children[1].name = "svDate"
                                       (...).children[0].to_s = "2010-08-17T12:34:53Z"
                           (...).children[2].name = "svcMenu"
                                       (...).children[0].name = "version"
                                                   (...).children[0].to_s = "1.0"
                                       (...).children[1].name = "lang"
                                                   (...).children[0].to_s = "en-GB"
                                       (...).children[2].name = "objURI"
                                                   (...).children[0].to_s = "urn:ietf:params:xml:ns:contact-1.0"
                                       (...).children[3].name = "objURI"
                                                   (...).children[0].to_s = "urn:ietf:params:xml:ns:domain-1.0"
                                       (...).children[4].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/database-2.0"
                                       (...).children[5].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/mailbox-2.0"
                                       (...).children[6].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/null-2.0"
                                       (...).children[7].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/package-2.2"
                                       (...).children[8].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                       (...).children[9].name = "objURI"
                                                   (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/support-2.0"
                                       (...).children[10].name = "svcExtension"
                                                    (...).children[0].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0"
                                                    (...).children[1].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-billing-2.0"
                                                    (...).children[2].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-database-2.0"
                                                    (...).children[3].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-dns-2.0"
                                                    (...).children[4].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-domain-2.5"
                                                    (...).children[5].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-contact-2.0"
                                                    (...).children[6].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0"
                                                    (...).children[7].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-host-2.0"
                                                    (...).children[8].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-null-2.0"
                                                    (...).children[9].name = "extURI"
                                                                (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
                                                    (...).children[10].name = "extURI"
                                                                 (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-security-2.0"
                                                    (...).children[11].name = "extURI"
                                                                 (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-server-2.2"
                                                    (...).children[12].name = "extURI"
                                                                 (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-support-2.0"
                                                    (...).children[13].name = "extURI"
                                                                 (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0"
                                                    (...).children[14].name = "extURI"
                                                                 (...).children[0].to_s = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"
                           (...).children[3].name = "dcp"
                                       (...).children[0].name = "access"
                                                   (...).children[0].name = "all"
                                       (...).children[1].name = "statement"
                                                   (...).children[0].name = "purpose"
                                                               (...).children[0].name = "admin"
                                                               (...).children[1].name = "prov"
                                                   (...).children[1].name = "recipient"
                                                               (...).children[0].name = "ours"
                                                   (...).children[2].name = "retention"
                                                               (...).children[0].name = "indefinite"
  result.children[2].to_s = " \n"

Log In [^Back to contents]

This logs you in, returning an indication of how long it will be before your session times out.

EPP syntax requires a username (clID) and password (pw). You may provide your authcode for both, but it is better to enter your clID and pw as given at https://customer.heartinternet.co.uk/manage/api

At login time, you must specify the objects (schemas without ext- at the start) and extensions (schemas with ext- at the start) you're going to use - the ones available are advertised in the greeting (and <hello> response), although some may be mutually exclusive. This will determine both what functionality the server should allow and what elements you're expected to understand in the responses. It is very strongly recommended that you include the "ext-whapi" extension regardless.

Please note that this is the only time when you can get an <extension> element in the response without asking for it.

What to send

Syntax

KeyAttributesContentsNotes
<command><login>
<login><clID> <pw> <newPW>? <options> <svcs>
<clID>(text)See description
<pw>(text)See description
<newPW>(N/A)Not implemented
<options><version> <lang>
<version>1.0Ignored
<lang>enIgnored
<svcs><objURI>+ <svcExtension>?
<objURI>(text)Object you intend to use
<svcExtension><extURI>+
<extURI>(text)Extension you intend to use

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <login>
      <clID>0176b313f8baae7c</clID>
      <pw>FSAFDSfdsfa</pw>
      <options>
        <version>1.0</version>
        <lang>en</lang>
      </options>
      <svcs>
        <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
        <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/database-2.0</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/mailbox-2.0</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/null-2.0</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/offsite-package-2.2</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/package-2.2</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/server-2.2</objURI>
        <objURI>http://www.heartinternet.co.uk/whapi/support-2.0</objURI>
        <svcExtension>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-billing-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-contact-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-database-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-dns-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-domain-2.5</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-host-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-null-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-package-2.2</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-security-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-server-2.2</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-support-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-wbp-2.0</extURI>
          <extURI>http://www.heartinternet.co.uk/whapi/ext-whapi-2.0</extURI>
        </svcExtension>
      </svcs>
    </login>
    <clTRID>1b8257ac1c3d2ee9d667a252cfe23373</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('login');
        $w->dataElement('clID', "0176b313f8baae7c");
        $w->dataElement('pw', "FSAFDSfdsfa");
        $w->startTag('options');
          $w->dataElement('version', "1.0");
          $w->dataElement('lang', "en");
        $w->endTag();
        $w->startTag('svcs');
          $w->dataElement('objURI', "urn:ietf:params:xml:ns:contact-1.0");
          $w->dataElement('objURI', "urn:ietf:params:xml:ns:domain-1.0");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/database-2.0");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/mailbox-2.0");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/null-2.0");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/offsite-package-2.2");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/package-2.2");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/server-2.2");
          $w->dataElement('objURI', "http://www.heartinternet.co.uk/whapi/support-2.0");
          $w->startTag('svcExtension');
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-billing-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-contact-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-database-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-dns-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-domain-2.5");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-host-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-null-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-package-2.2");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-security-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-server-2.2");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-support-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0");
            $w->dataElement('extURI', "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "1b8257ac1c3d2ee9d667a252cfe23373");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'login');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($namespace, 'clID');
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('0176b313f8baae7c'));
        $c = $doc->createElementNS($namespace, 'pw');
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('FSAFDSfdsfa'));
        $c = $doc->createElementNS($namespace, 'options');
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($namespace, 'version');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('1.0'));
          $c = $doc->createElementNS($namespace, 'lang');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('en'));
        $l = $l->parentNode;
        $c = $doc->createElementNS($namespace, 'svcs');
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('urn:ietf:params:xml:ns:contact-1.0'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('urn:ietf:params:xml:ns:domain-1.0'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/database-2.0'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/mailbox-2.0'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/null-2.0'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/offsite-package-2.2'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/package-2.2'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/server-2.2'));
          $c = $doc->createElementNS($namespace, 'objURI');
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/support-2.0'));
          $c = $doc->createElementNS($namespace, 'svcExtension');
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-billing-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-contact-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-database-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-dns-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-domain-2.5'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-host-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-null-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-package-2.2'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-security-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-server-2.2'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-support-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-wbp-2.0'));
            $c = $doc->createElementNS($namespace, 'extURI');
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('http://www.heartinternet.co.uk/whapi/ext-whapi-2.0'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('1b8257ac1c3d2ee9d667a252cfe23373'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('login', {})
        current.add_element('clID', {}).add_text("0176b313f8baae7c")
        current.add_element('pw', {}).add_text("FSAFDSfdsfa")
        current = current.add_element('options', {})
          current.add_element('version', {}).add_text("1.0")
          current.add_element('lang', {}).add_text("en")
        current = current.parent
        current = current.add_element('svcs', {})
          current.add_element('objURI', {}).add_text("urn:ietf:params:xml:ns:contact-1.0")
          current.add_element('objURI', {}).add_text("urn:ietf:params:xml:ns:domain-1.0")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/database-2.0")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/mailbox-2.0")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/null-2.0")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/offsite-package-2.2")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/package-2.2")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/server-2.2")
          current.add_element('objURI', {}).add_text("http://www.heartinternet.co.uk/whapi/support-2.0")
          current = current.add_element('svcExtension', {})
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-billing-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-contact-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-database-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-dns-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-domain-2.5")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-host-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-null-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-package-2.2")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-security-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-server-2.2")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-support-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-wbp-2.0")
            current.add_element('extURI', {}).add_text("http://www.heartinternet.co.uk/whapi/ext-whapi-2.0")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("1b8257ac1c3d2ee9d667a252cfe23373")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<extension><ext-whapi:sessionExpiry>
<ext-whapi:sessionExpiry>unit(number)
unit"s"

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <extension>
      <ext-whapi:sessionExpiry xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0" unit="s">600</ext-whapi:sessionExpiry>
    </extension>
    <trID>
      <clTRID>1b8257ac1c3d2ee9d667a252cfe23373</clTRID>
      <svTRID>test-97384f32ba0a56cf40fd047a5b01e39b</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'extension' => {
               'ext-whapi:sessionExpiry' => {
                      'unit' => 's',
                      'xmlns:ext-whapi' => 'http://www.heartinternet.co.uk/whapi/ext-whapi-2.0',
                      'content' => '600'
                    }
             },
          'trID' => {
             'clTRID' => '1b8257ac1c3d2ee9d667a252cfe23373',
             'svTRID' => 'test-97384f32ba0a56cf40fd047a5b01e39b'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => extension
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-whapi:sessionExpiry
              [type] => complete
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-whapi] => http://www.heartinternet.co.uk/whapi/ext-whapi-2.0
                      [unit] => s
                  )
  
              [value] => 600
          )
  
      [7] => Array
          (
              [tag] => extension
              [type] => close
              [level] => 3
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 1b8257ac1c3d2ee9d667a252cfe23373
          )
  
      [10] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-97384f32ba0a56cf40fd047a5b01e39b
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [13] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "extension"
                                       (...).children[0].name = "sessionExpiry"
                                                   (...).attributes["unit"] = "s"
                                                   (...).attributes["ext-whapi"] = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"
                                                   (...).children[0].to_s = "600"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "1b8257ac1c3d2ee9d667a252cfe23373"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-97384f32ba0a56cf40fd047a5b01e39b"
  result.children[2].to_s = " \n"

Log Out [^Back to contents]

This will disconnect you. You should do this before disconnecting yourself.

What to send

Syntax

KeyAttributesContentsNotes
<command><logout>
<logout>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <logout />
    <clTRID>90908b2caabbb97c1e79899816efc093</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->emptyTag('logout');
      $w->dataElement('clTRID', "90908b2caabbb97c1e79899816efc093");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'logout');
      $l->appendChild($c);
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('90908b2caabbb97c1e79899816efc093'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current.add_element('logout', {})
      current.add_element('clTRID', {}).add_text("90908b2caabbb97c1e79899816efc093")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1500'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>90908b2caabbb97c1e79899816efc093</clTRID>
      <svTRID>test-673076c2a80828e53c296681f29b5eaf</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '90908b2caabbb97c1e79899816efc093',
             'svTRID' => 'test-673076c2a80828e53c296681f29b5eaf'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1500'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1500
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 90908b2caabbb97c1e79899816efc093
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-673076c2a80828e53c296681f29b5eaf
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1500"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "90908b2caabbb97c1e79899816efc093"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-673076c2a80828e53c296681f29b5eaf"
  result.children[2].to_s = " \n"

PACKAGE SETUP AND DELETION COMMANDS [^Back to contents]

Everywhere <package:id> is specified in this section, you may provide as the content either the package ID or a domain name attached to the package. It's preferable to use the former.

Creating Web Hosting Packages [^Back to contents]

This sets up a hosting package, either with a pre-existing domain name (no "mustCreate" attribute) or by creating a domain name reference to allow you to register or transfer it later on. If you want to prohibit use of an existing domain name (ie, to prevent your customers from effectively stealing each others' domain names), set mustCreate to 1.

Please note that since domain transfers/registrations may not complete immediately and a domain name in the intervening state is not considered valid for attaching to a web hosting package, you should create the web hosting package first if you intend to set up a package for a newly registered or transferred domain name.

The setup operation is done immediately, however it may be up to an hour before the site is working fully.

In response, you get the generated passwords (guaranteed to at least include one with type='control-panel') and the new package ID.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><package:create>
<package:create><package:domainName> <package:emailAddress>? <package:type> <package:destination>?
<package:domainName>mustCreate?(domain name)
mustCreate1See description above
<package:emailAddress>name?(email address)
name(A person's name)
<package:type>(type id)See "Creating Web Hosting Package Types"
<package:destination>(A Premium Hosting server name)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <create>
      <package:create>
        <package:domainName mustCreate='1'>foo.com</package:domainName>
        <package:emailAddress name="Bob Foo">bob@foo.example.org</package:emailAddress>
        <package:type>260b269a6e359505</package:type>
        <package:destination>mws321</package:destination>
      </package:create>
    </create>
    <clTRID>974c756193ea5c2a309ec8ea1df87a89</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$package_ns, "create"]);
          $w->dataElement([$package_ns, "domainName"], "foo.com", 'mustCreate' => "1");
          $w->dataElement([$package_ns, "emailAddress"], "bob\x40foo.example.org", 'name' => "Bob Foo");
          $w->dataElement([$package_ns, "type"], "260b269a6e359505");
          $w->dataElement([$package_ns, "destination"], "mws321");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "974c756193ea5c2a309ec8ea1df87a89");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "create");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "domainName");$c->setAttribute('mustCreate', "1"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('foo.com'));
          $c = $doc->createElementNS($package_ns, "emailAddress");$c->setAttribute('name', "Bob Foo"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('bob@foo.example.org'));
          $c = $doc->createElementNS($package_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('260b269a6e359505'));
          $c = $doc->createElementNS($package_ns, "destination");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('mws321'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('974c756193ea5c2a309ec8ea1df87a89'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('package:create', {})
          current.add_element('package:domainName', {'mustCreate' => "1"}).add_text("foo.com")
          current.add_element('package:emailAddress', {'name' => "Bob Foo"}).add_text("bob\x40foo.example.org")
          current.add_element('package:type', {}).add_text("260b269a6e359505")
          current.add_element('package:destination', {}).add_text("mws321")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("974c756193ea5c2a309ec8ea1df87a89")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><package:creData>
<package:creData><package:passwordSet> <package:id>
<package:passwordSet><package:password>+
<package:password>type(text)
type"control-panel" or "ftp"
<package:id> (number)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <package:creData>
        <package:passwordSet>
          <package:password type='control-panel'>SADFdsfas</package:password>
          <package:password type='ftp'>fgfdsFSDSss</package:password>
        </package:passwordSet>
        <package:id>e9f3dfe45604e7da</package:id>
      </package:creData>
    </resData>
    <trID>
      <clTRID>974c756193ea5c2a309ec8ea1df87a89</clTRID>
      <svTRID>test-78f1a636435dc6e6ffdea20e7d2ebb1d</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '974c756193ea5c2a309ec8ea1df87a89',
             'svTRID' => 'test-78f1a636435dc6e6ffdea20e7d2ebb1d'
           },
          'resData' => {
             'package:creData' => {
                  'package:id' => 'e9f3dfe45604e7da',
                  'package:passwordSet' => {
                           'package:password' => [
                                 {
                                'content' => 'SADFdsfas',
                                'type' => 'control-panel'
                                 },
                                 {
                                'content' => 'fgfdsFSDSss',
                                'type' => 'ftp'
                                 }
                               ]
                         }
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:creData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => package:passwordSet
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => package:password
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [type] => control-panel
                  )
  
              [value] => SADFdsfas
          )
  
      [9] => Array
          (
              [tag] => package:password
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [type] => ftp
                  )
  
              [value] => fgfdsFSDSss
          )
  
      [10] => Array
          (
              [tag] => package:passwordSet
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => package:id
              [type] => complete
              [level] => 5
              [value] => e9f3dfe45604e7da
          )
  
      [12] => Array
          (
              [tag] => package:creData
              [type] => close
              [level] => 4
          )
  
      [13] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 974c756193ea5c2a309ec8ea1df87a89
          )
  
      [16] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-78f1a636435dc6e6ffdea20e7d2ebb1d
          )
  
      [17] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [18] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [19] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).children[0].name = "passwordSet"
                                                               (...).children[0].name = "password"
                                                                           (...).attributes["type"] = "control-panel"
                                                                           (...).children[0].to_s = "SADFdsfas"
                                                               (...).children[1].name = "password"
                                                                           (...).attributes["type"] = "ftp"
                                                                           (...).children[0].to_s = "fgfdsFSDSss"
                                                   (...).children[1].name = "id"
                                                               (...).children[0].to_s = "e9f3dfe45604e7da"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "974c756193ea5c2a309ec8ea1df87a89"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-78f1a636435dc6e6ffdea20e7d2ebb1d"
  result.children[2].to_s = " \n"

Deleting Web Hosting Packages [^Back to contents]

This function immediately deletes a hosting package, including all content, mailboxes, databases, and configuration. As this action is irrevocable, it's recommended that you do this manually rather than via the API.

What to send

Syntax

KeyAttributesContentsNotes
<command><delete>
<delete><package:delete>
<package:delete><package:id>
<package:id>(text)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <delete>
      <package:delete>
        <package:id>2ec7ac89de8357a5</package:id>
      </package:delete>
    </delete>
    <clTRID>92b926adf5508e54f7f974bd79dc0439</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('delete');
        $w->startTag([$package_ns, "delete"]);
          $w->dataElement([$package_ns, "id"], "2ec7ac89de8357a5");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "92b926adf5508e54f7f974bd79dc0439");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'delete');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "delete");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('2ec7ac89de8357a5'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('92b926adf5508e54f7f974bd79dc0439'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('delete', {})
        current = current.add_element('package:delete', {})
          current.add_element('package:id', {}).add_text("2ec7ac89de8357a5")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("92b926adf5508e54f7f974bd79dc0439")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>92b926adf5508e54f7f974bd79dc0439</clTRID>
      <svTRID>test-ab914f460ea226727317a1f2a9dbf2e1</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '92b926adf5508e54f7f974bd79dc0439',
             'svTRID' => 'test-ab914f460ea226727317a1f2a9dbf2e1'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 92b926adf5508e54f7f974bd79dc0439
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-ab914f460ea226727317a1f2a9dbf2e1
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "92b926adf5508e54f7f974bd79dc0439"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-ab914f460ea226727317a1f2a9dbf2e1"
  result.children[2].to_s = " \n"

Deactivating Web Hosting Packages [^Back to contents]

This will disable all services for the hosting package, including control panel login (eXtend).

Deactivations may take up to an hour to complete fully.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:add>
<package:id>(text)
<package:add><package:status>
<package:status>s(empty)
s"inactive"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:add>
          <package:status s="inactive"/>
        </package:add>
      </package:update>
    </update>
    <clTRID>874aa7ef4def5e9c66f28ea56d7ca5bd</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "add"]);
            $w->emptyTag([$package_ns, "status"], 's' => "inactive");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "874aa7ef4def5e9c66f28ea56d7ca5bd");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "add");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "status");$c->setAttribute('s', "inactive"); 
            $l->appendChild($c);
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('874aa7ef4def5e9c66f28ea56d7ca5bd'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:add', {})
            current.add_element('package:status', {'s' => "inactive"})
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("874aa7ef4def5e9c66f28ea56d7ca5bd")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>874aa7ef4def5e9c66f28ea56d7ca5bd</clTRID>
      <svTRID>test-77ac72718622a0e161a6c3c24ff460ed</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '874aa7ef4def5e9c66f28ea56d7ca5bd',
             'svTRID' => 'test-77ac72718622a0e161a6c3c24ff460ed'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 874aa7ef4def5e9c66f28ea56d7ca5bd
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-77ac72718622a0e161a6c3c24ff460ed
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "874aa7ef4def5e9c66f28ea56d7ca5bd"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-77ac72718622a0e161a6c3c24ff460ed"
  result.children[2].to_s = " \n"

Reactivating Web Hosting Packages [^Back to contents]

This will reverse a deactivate operation.

Reactivations may take up to an hour to complete fully.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:rem>
<package:id>(text)
<package:rem><package:status>
<package:status>s(empty)
s"inactive"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>14d0261f5175a7f3</package:id>
        <package:rem>
          <package:status s="inactive"/>
        </package:rem>
      </package:update>
    </update>
    <clTRID>a052cb78deea8cd108ebc512c4788c0c</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "14d0261f5175a7f3");
          $w->startTag([$package_ns, "rem"]);
            $w->emptyTag([$package_ns, "status"], 's' => "inactive");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "a052cb78deea8cd108ebc512c4788c0c");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('14d0261f5175a7f3'));
          $c = $doc->createElementNS($package_ns, "rem");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "status");$c->setAttribute('s', "inactive"); 
            $l->appendChild($c);
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('a052cb78deea8cd108ebc512c4788c0c'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("14d0261f5175a7f3")
          current = current.add_element('package:rem', {})
            current.add_element('package:status', {'s' => "inactive"})
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("a052cb78deea8cd108ebc512c4788c0c")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>a052cb78deea8cd108ebc512c4788c0c</clTRID>
      <svTRID>test-f90c087c234e66919e4017448859f2f9</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'a052cb78deea8cd108ebc512c4788c0c',
             'svTRID' => 'test-f90c087c234e66919e4017448859f2f9'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => a052cb78deea8cd108ebc512c4788c0c
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-f90c087c234e66919e4017448859f2f9
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "a052cb78deea8cd108ebc512c4788c0c"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-f90c087c234e66919e4017448859f2f9"
  result.children[2].to_s = " \n"

PACKAGE MAINTENANCE COMMANDS [^Back to contents]

These functions allow you to change which services are available to your hosting packages. As with the section above, you can substitute a domain name for an actual package ID anywhere the <package:id> element appears.

Inspecting Web Hosting Packages [^Back to contents]

This provides information on the given web site, including all domain names in use, but not including authentication details such as passwords.

If you use <ext-package:info> you can request some more information, please see the request syntax for more information.

What to send

Syntax

KeyAttributesContentsNotes
<command><info> <extension>?
<info><package:info>
<package:info><package:id>
<package:id>(text)
<extension><ext-package:info>
<ext-package:info><ext-package:detail>
<ext-package:detail>"mailbox"Use to request mailbox info

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <info>
      <package:info>
        <package:id>10ce58c951fa310b</package:id>
      </package:info>
    </info>
    <extension>
      <ext-package:info xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
        <ext-package:detail>mailbox</ext-package:detail>
      </ext-package:info>
    </extension>
    <clTRID>bbb5a214d249f7d923e4790fd342ce89</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
  $ext_package_ns => "ext-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$package_ns, "info"]);
          $w->dataElement([$package_ns, "id"], "10ce58c951fa310b");
        $w->endTag();
      $w->endTag();
      $w->startTag('extension');
        $w->startTag([$ext_package_ns, "info"]);
          $w->dataElement([$ext_package_ns, "detail"], "mailbox");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "bbb5a214d249f7d923e4790fd342ce89");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('10ce58c951fa310b'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'extension');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_package_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($ext_package_ns, "detail");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('mailbox'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('bbb5a214d249f7d923e4790fd342ce89'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('package:info', {})
          current.add_element('package:id', {}).add_text("10ce58c951fa310b")
        current = current.parent
      current = current.parent
      current = current.add_element('extension', {})
        current = current.add_element('ext-package:info', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
          current.add_element('ext-package:detail', {}).add_text("mailbox")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("bbb5a214d249f7d923e4790fd342ce89")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><package:infData>
<package:infData><package:id> <package:roid> <package:status>* <package:counters> <package:limits> <package:detail> <package:domainName>+
<package:id>(text)
<package:roid>(text)
<package:status>s"ok", "scripts-disabled", or "inactive"
s"ok", "scripts-disabled", or "inactive"
<package:counters><package:bandwidth>* <package:webSpace>?
<package:bandwidth>scopeNumber of megabytes
scope"month", "last-month" or "last-hour"
<package:webSpace>Number of megabytes
<package:limits><package:site> <package:email> <package:controlPanel>See "Creating Web Hosting Package Types"
<package:detail>addedDate updatedDate<package:type> <package:server>+
addedDateWhen you created the web hosting package
updatedDateWhen anything (apart from counters) last changed
<package:type>See "Changing Web Hosting Package Types"
<package:server>role type?A server name
role"web", "ftp", "mail" or "db"
type"exchange", "hosted" or "premium"
<package:domainName>(a domain name)The first name is primary for the package
<extension><ext-package:infData>
<ext-package:infData><ext-package:mailboxes>?
<ext-package:mailboxes><ext-package:mailbox>*
<ext-package:mailbox>type<ext-package:emailAddress>
type"exchange", "hosted" or "premium"
<ext-package:emailAddress>(An email address)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <package:infData>
        <package:id>2e3cc0422afb0503</package:id>
        <package:roid>2E3CC0422AFB0503-HI</package:roid>
        <package:status s='ok'>ok</package:status>
        <package:counters>
          <package:bandwidth scope='last-hour'>50</package:bandwidth>
          <package:bandwidth scope='month'>3154</package:bandwidth>
          <package:webSpace>267</package:webSpace>
        </package:counters>
        <package:limits>
          <package:site>
            <package:webSpace>40000</package:webSpace>
            <package:bandwidth>20000</package:bandwidth>
            <package:subDomains>2</package:subDomains>
            <package:extraFTPUsers>20</package:extraFTPUsers>
            <package:databases>200</package:databases>
          </package:site>
          <package:email>
            <package:emailForwarders>unlimited</package:emailForwarders>
            <package:emailResponders>10</package:emailResponders>
            <package:emailLists>100</package:emailLists>
            <package:emailBoxes>2000</package:emailBoxes>
          </package:email>
          <package:controlPanel>
            <package:tool>website-builder</package:tool>
            <package:script>wordpress</package:script>
          </package:controlPanel>
        </package:limits>
        <package:detail addedDate='2008-03-14T22:03:55' updatedDate='2009-09-21T19:35:22'>
          <package:type>0be9f5a18732b4c1</package:type>
          <package:server role='web' type='linux'>web1.extendcp.co.uk</package:server>
          <package:server role='ftp'>ftp1.extendcp.co.uk</package:server>
          <package:server role='mail'>mail3.extendcp.co.uk</package:server>
        </package:detail>
        <package:domainName>one.example.org</package:domainName>
        <package:domainName>three.example.org</package:domainName>
      </package:infData>
    </resData>
    <extension>
      <ext-package:infData xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
        <ext-package:mailboxes>
          <ext-package:mailbox type='hosted'>
            <ext-package:emailAddress>guy@glc.example.org</ext-package:emailAddress>
          </ext-package:mailbox>
          <ext-package:mailbox type='hosted'>
            <ext-package:emailAddress>john@glc.example.org</ext-package:emailAddress>
          </ext-package:mailbox>
        </ext-package:mailboxes>
      </ext-package:infData>
    </extension>
    <trID>
      <clTRID>bbb5a214d249f7d923e4790fd342ce89</clTRID>
      <svTRID>test-4506e46ddcb3b4de0ba76743fd790158</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'extension' => {
               'ext-package:infData' => {
                     'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2',
                     'ext-package:mailboxes' => {
                             'ext-package:mailbox' => [
                                   {
                                  'ext-package:emailAddress' => 'guy@glc.example.org',
                                  'type' => 'hosted'
                                   },
                                   {
                                  'ext-package:emailAddress' => 'john@glc.example.org',
                                  'type' => 'hosted'
                                   }
                                 ]
                           }
                   }
             },
          'trID' => {
             'clTRID' => 'bbb5a214d249f7d923e4790fd342ce89',
             'svTRID' => 'test-4506e46ddcb3b4de0ba76743fd790158'
           },
          'resData' => {
             'package:infData' => {
                  'package:id' => '2e3cc0422afb0503',
                  'package:roid' => '2E3CC0422AFB0503-HI',
                  'package:status' => {
                         'content' => 'ok',
                         's' => 'ok'
                       },
                  'package:counters' => {
                        'package:webSpace' => '267',
                        'package:bandwidth' => [
                               {
                                 'content' => '50',
                                 'scope' => 'last-hour'
                               },
                               {
                                 'content' => '3154',
                                 'scope' => 'month'
                               }
                                ]
                         },
                  'package:limits' => {
                         'package:email' => {
                               'package:emailLists' => '100',
                               'package:emailBoxes' => '2000',
                               'package:emailForwarders' => 'unlimited',
                               'package:emailResponders' => '10'
                             },
                         'package:controlPanel' => {
                                'package:tool' => 'website-builder',
                                'package:script' => 'wordpress'
                              },
                         'package:site' => {
                              'package:extraFTPUsers' => '20',
                              'package:webSpace' => '40000',
                              'package:databases' => '200',
                              'package:subDomains' => '2',
                              'package:bandwidth' => '20000'
                            }
                       },
                  'package:detail' => {
                         'package:server' => [
                             {
                               'content' => 'web1.extendcp.co.uk',
                               'type' => 'linux',
                               'role' => 'web'
                             },
                             {
                               'content' => 'ftp1.extendcp.co.uk',
                               'role' => 'ftp'
                             },
                             {
                               'content' => 'mail3.extendcp.co.uk',
                               'role' => 'mail'
                             }
                              ],
                         'updatedDate' => '2009-09-21T19:35:22',
                         'package:type' => '0be9f5a18732b4c1',
                         'addedDate' => '2008-03-14T22:03:55'
                       },
                  'package:domainName' => [
                          'one.example.org',
                          'three.example.org'
                        ]
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:infData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => package:id
              [type] => complete
              [level] => 5
              [value] => 2e3cc0422afb0503
          )
  
      [8] => Array
          (
              [tag] => package:roid
              [type] => complete
              [level] => 5
              [value] => 2E3CC0422AFB0503-HI
          )
  
      [9] => Array
          (
              [tag] => package:status
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [s] => ok
                  )
  
              [value] => ok
          )
  
      [10] => Array
          (
              [tag] => package:counters
              [type] => open
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => package:bandwidth
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [scope] => last-hour
                  )
  
              [value] => 50
          )
  
      [12] => Array
          (
              [tag] => package:bandwidth
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [scope] => month
                  )
  
              [value] => 3154
          )
  
      [13] => Array
          (
              [tag] => package:webSpace
              [type] => complete
              [level] => 6
              [value] => 267
          )
  
      [14] => Array
          (
              [tag] => package:counters
              [type] => close
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => package:limits
              [type] => open
              [level] => 5
          )
  
      [16] => Array
          (
              [tag] => package:site
              [type] => open
              [level] => 6
          )
  
      [17] => Array
          (
              [tag] => package:webSpace
              [type] => complete
              [level] => 7
              [value] => 40000
          )
  
      [18] => Array
          (
              [tag] => package:bandwidth
              [type] => complete
              [level] => 7
              [value] => 20000
          )
  
      [19] => Array
          (
              [tag] => package:subDomains
              [type] => complete
              [level] => 7
              [value] => 2
          )
  
      [20] => Array
          (
              [tag] => package:extraFTPUsers
              [type] => complete
              [level] => 7
              [value] => 20
          )
  
      [21] => Array
          (
              [tag] => package:databases
              [type] => complete
              [level] => 7
              [value] => 200
          )
  
      [22] => Array
          (
              [tag] => package:site
              [type] => close
              [level] => 6
          )
  
      [23] => Array
          (
              [tag] => package:email
              [type] => open
              [level] => 6
          )
  
      [24] => Array
          (
              [tag] => package:emailForwarders
              [type] => complete
              [level] => 7
              [value] => unlimited
          )
  
      [25] => Array
          (
              [tag] => package:emailResponders
              [type] => complete
              [level] => 7
              [value] => 10
          )
  
      [26] => Array
          (
              [tag] => package:emailLists
              [type] => complete
              [level] => 7
              [value] => 100
          )
  
      [27] => Array
          (
              [tag] => package:emailBoxes
              [type] => complete
              [level] => 7
              [value] => 2000
          )
  
      [28] => Array
          (
              [tag] => package:email
              [type] => close
              [level] => 6
          )
  
      [29] => Array
          (
              [tag] => package:controlPanel
              [type] => open
              [level] => 6
          )
  
      [30] => Array
          (
              [tag] => package:tool
              [type] => complete
              [level] => 7
              [value] => website-builder
          )
  
      [31] => Array
          (
              [tag] => package:script
              [type] => complete
              [level] => 7
              [value] => wordpress
          )
  
      [32] => Array
          (
              [tag] => package:controlPanel
              [type] => close
              [level] => 6
          )
  
      [33] => Array
          (
              [tag] => package:limits
              [type] => close
              [level] => 5
          )
  
      [34] => Array
          (
              [tag] => package:detail
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [addedDate] => 2008-03-14T22:03:55
                      [updatedDate] => 2009-09-21T19:35:22
                  )
  
          )
  
      [35] => Array
          (
              [tag] => package:type
              [type] => complete
              [level] => 6
              [value] => 0be9f5a18732b4c1
          )
  
      [36] => Array
          (
              [tag] => package:server
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [role] => web
                      [type] => linux
                  )
  
              [value] => web1.extendcp.co.uk
          )
  
      [37] => Array
          (
              [tag] => package:server
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [role] => ftp
                  )
  
              [value] => ftp1.extendcp.co.uk
          )
  
      [38] => Array
          (
              [tag] => package:server
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [role] => mail
                  )
  
              [value] => mail3.extendcp.co.uk
          )
  
      [39] => Array
          (
              [tag] => package:detail
              [type] => close
              [level] => 5
          )
  
      [40] => Array
          (
              [tag] => package:domainName
              [type] => complete
              [level] => 5
              [value] => one.example.org
          )
  
      [41] => Array
          (
              [tag] => package:domainName
              [type] => complete
              [level] => 5
              [value] => three.example.org
          )
  
      [42] => Array
          (
              [tag] => package:infData
              [type] => close
              [level] => 4
          )
  
      [43] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [44] => Array
          (
              [tag] => extension
              [type] => open
              [level] => 3
          )
  
      [45] => Array
          (
              [tag] => ext-package:infData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [46] => Array
          (
              [tag] => ext-package:mailboxes
              [type] => open
              [level] => 5
          )
  
      [47] => Array
          (
              [tag] => ext-package:mailbox
              [type] => open
              [level] => 6
              [attributes] => Array
                  (
                      [type] => hosted
                  )
  
          )
  
      [48] => Array
          (
              [tag] => ext-package:emailAddress
              [type] => complete
              [level] => 7
              [value] => guy@glc.example.org
          )
  
      [49] => Array
          (
              [tag] => ext-package:mailbox
              [type] => close
              [level] => 6
          )
  
      [50] => Array
          (
              [tag] => ext-package:mailbox
              [type] => open
              [level] => 6
              [attributes] => Array
                  (
                      [type] => hosted
                  )
  
          )
  
      [51] => Array
          (
              [tag] => ext-package:emailAddress
              [type] => complete
              [level] => 7
              [value] => john@glc.example.org
          )
  
      [52] => Array
          (
              [tag] => ext-package:mailbox
              [type] => close
              [level] => 6
          )
  
      [53] => Array
          (
              [tag] => ext-package:mailboxes
              [type] => close
              [level] => 5
          )
  
      [54] => Array
          (
              [tag] => ext-package:infData
              [type] => close
              [level] => 4
          )
  
      [55] => Array
          (
              [tag] => extension
              [type] => close
              [level] => 3
          )
  
      [56] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [57] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => bbb5a214d249f7d923e4790fd342ce89
          )
  
      [58] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-4506e46ddcb3b4de0ba76743fd790158
          )
  
      [59] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [60] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [61] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "2e3cc0422afb0503"
                                                   (...).children[1].name = "roid"
                                                               (...).children[0].to_s = "2E3CC0422AFB0503-HI"
                                                   (...).children[2].name = "status"
                                                               (...).attributes["s"] = "ok"
                                                               (...).children[0].to_s = "ok"
                                                   (...).children[3].name = "counters"
                                                               (...).children[0].name = "bandwidth"
                                                                           (...).attributes["scope"] = "last-hour"
                                                                           (...).children[0].to_s = "50"
                                                               (...).children[1].name = "bandwidth"
                                                                           (...).attributes["scope"] = "month"
                                                                           (...).children[0].to_s = "3154"
                                                               (...).children[2].name = "webSpace"
                                                                           (...).children[0].to_s = "267"
                                                   (...).children[4].name = "limits"
                                                               (...).children[0].name = "site"
                                                                           (...).children[0].name = "webSpace"
                                                                                       (...).children[0].to_s = "40000"
                                                                           (...).children[1].name = "bandwidth"
                                                                                       (...).children[0].to_s = "20000"
                                                                           (...).children[2].name = "subDomains"
                                                                                       (...).children[0].to_s = "2"
                                                                           (...).children[3].name = "extraFTPUsers"
                                                                                       (...).children[0].to_s = "20"
                                                                           (...).children[4].name = "databases"
                                                                                       (...).children[0].to_s = "200"
                                                               (...).children[1].name = "email"
                                                                           (...).children[0].name = "emailForwarders"
                                                                                       (...).children[0].to_s = "unlimited"
                                                                           (...).children[1].name = "emailResponders"
                                                                                       (...).children[0].to_s = "10"
                                                                           (...).children[2].name = "emailLists"
                                                                                       (...).children[0].to_s = "100"
                                                                           (...).children[3].name = "emailBoxes"
                                                                                       (...).children[0].to_s = "2000"
                                                               (...).children[2].name = "controlPanel"
                                                                           (...).children[0].name = "tool"
                                                                                       (...).children[0].to_s = "website-builder"
                                                                           (...).children[1].name = "script"
                                                                                       (...).children[0].to_s = "wordpress"
                                                   (...).children[5].name = "detail"
                                                               (...).attributes["updatedDate"] = "2009-09-21T19:35:22"
                                                               (...).attributes["addedDate"] = "2008-03-14T22:03:55"
                                                               (...).children[0].name = "type"
                                                                           (...).children[0].to_s = "0be9f5a18732b4c1"
                                                               (...).children[1].name = "server"
                                                                           (...).attributes["type"] = "linux"
                                                                           (...).attributes["role"] = "web"
                                                                           (...).children[0].to_s = "web1.extendcp.co.uk"
                                                               (...).children[2].name = "server"
                                                                           (...).attributes["role"] = "ftp"
                                                                           (...).children[0].to_s = "ftp1.extendcp.co.uk"
                                                               (...).children[3].name = "server"
                                                                           (...).attributes["role"] = "mail"
                                                                           (...).children[0].to_s = "mail3.extendcp.co.uk"
                                                   (...).children[6].name = "domainName"
                                                               (...).children[0].to_s = "one.example.org"
                                                   (...).children[7].name = "domainName"
                                                               (...).children[0].to_s = "three.example.org"
                           (...).children[2].name = "extension"
                                       (...).children[0].name = "infData"
                                                   (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
                                                   (...).children[0].name = "mailboxes"
                                                               (...).children[0].name = "mailbox"
                                                                           (...).attributes["type"] = "hosted"
                                                                           (...).children[0].name = "emailAddress"
                                                                                       (...).children[0].to_s = "guy@glc.example.org"
                                                               (...).children[1].name = "mailbox"
                                                                           (...).attributes["type"] = "hosted"
                                                                           (...).children[0].name = "emailAddress"
                                                                                       (...).children[0].to_s = "john@glc.example.org"
                           (...).children[3].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "bbb5a214d249f7d923e4790fd342ce89"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-4506e46ddcb3b4de0ba76743fd790158"
  result.children[2].to_s = " \n"

Listing Web Hosting Packages [^Back to contents]

This provides a list of hosting packages with fairly minimal information (primary domain name and ID). This is intended to provide a very general overview of your account (ie, see how many packages you have) and let you see the current site to domain name map.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-package:list>
<ext-package:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <extension>
    <ext-package:list/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">b57b7ac295ac79664fe5176761b35529</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_package_ns => "ext-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_package_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "b57b7ac295ac79664fe5176761b35529");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_package_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('b57b7ac295ac79664fe5176761b35529'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
    current = current.add_element('extension', {})
      current.add_element('ext-package:list', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("b57b7ac295ac79664fe5176761b35529")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-package:lstData>
<ext-package:lstData><ext-package:package>*
<ext-package:package><ext-package:id> <ext-package:domainName>
<ext-package:id>(number)
<ext-package:domainName>(a domain name)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-package:lstData>
        <ext-package:package>
          <ext-package:id>3e50664779a66336</ext-package:id>
          <ext-package:domainName>foo.example.org</ext-package:domainName>
        </ext-package:package>
        <ext-package:package>
          <ext-package:id>bb00181b84305c57</ext-package:id>
          <ext-package:domainName>bar.example.org</ext-package:domainName>
        </ext-package:package>
        <ext-package:package>
          <ext-package:id>308142b49153f743</ext-package:id>
          <ext-package:domainName>boo.example.org</ext-package:domainName>
        </ext-package:package>
      </ext-package:lstData>
    </resData>
    <trID>
      <clTRID>b57b7ac295ac79664fe5176761b35529</clTRID>
      <svTRID>test-7635e02f43ac2d1538e1b5a5ed1434ea</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'b57b7ac295ac79664fe5176761b35529',
             'svTRID' => 'test-7635e02f43ac2d1538e1b5a5ed1434ea'
           },
          'resData' => {
             'ext-package:lstData' => {
                   'ext-package:package' => [
                            {
                           'ext-package:id' => '3e50664779a66336',
                           'ext-package:domainName' => 'foo.example.org'
                            },
                            {
                           'ext-package:id' => 'bb00181b84305c57',
                           'ext-package:domainName' => 'bar.example.org'
                            },
                            {
                           'ext-package:id' => '308142b49153f743',
                           'ext-package:domainName' => 'boo.example.org'
                            }
                          ]
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-package:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-package:package
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => 3e50664779a66336
          )
  
      [9] => Array
          (
              [tag] => ext-package:domainName
              [type] => complete
              [level] => 6
              [value] => foo.example.org
          )
  
      [10] => Array
          (
              [tag] => ext-package:package
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => ext-package:package
              [type] => open
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => bb00181b84305c57
          )
  
      [13] => Array
          (
              [tag] => ext-package:domainName
              [type] => complete
              [level] => 6
              [value] => bar.example.org
          )
  
      [14] => Array
          (
              [tag] => ext-package:package
              [type] => close
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => ext-package:package
              [type] => open
              [level] => 5
          )
  
      [16] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => 308142b49153f743
          )
  
      [17] => Array
          (
              [tag] => ext-package:domainName
              [type] => complete
              [level] => 6
              [value] => boo.example.org
          )
  
      [18] => Array
          (
              [tag] => ext-package:package
              [type] => close
              [level] => 5
          )
  
      [19] => Array
          (
              [tag] => ext-package:lstData
              [type] => close
              [level] => 4
          )
  
      [20] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [21] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [22] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => b57b7ac295ac79664fe5176761b35529
          )
  
      [23] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-7635e02f43ac2d1538e1b5a5ed1434ea
          )
  
      [24] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [25] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [26] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "package"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "3e50664779a66336"
                                                               (...).children[1].name = "domainName"
                                                                           (...).children[0].to_s = "foo.example.org"
                                                   (...).children[1].name = "package"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "bb00181b84305c57"
                                                               (...).children[1].name = "domainName"
                                                                           (...).children[0].to_s = "bar.example.org"
                                                   (...).children[2].name = "package"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "308142b49153f743"
                                                               (...).children[1].name = "domainName"
                                                                           (...).children[0].to_s = "boo.example.org"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "b57b7ac295ac79664fe5176761b35529"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-7635e02f43ac2d1538e1b5a5ed1434ea"
  result.children[2].to_s = " \n"

Changing Web Hosting Package Types [^Back to contents]

From time to time you may wish to change the type of a hosting package, eg. to perform an upgrade or downgrade. This will make the entire package conform to the new type, even if you've made modifications to the package's services directly.

You can use this to set a package to its own type, if it has deviated or the type itself has been modified.

The configuration is changed immediately.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:chg>
<package:id>(text)
<package:chg><package:type>
<package:type>(text)Type ID or type name

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:chg>
          <package:type>3659911a94fecc81</package:type>
        </package:chg>
      </package:update>
    </update>
    <clTRID>35fbfcd55a1f8e95fb4f243385f1ea39</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "chg"]);
            $w->dataElement([$package_ns, "type"], "3659911a94fecc81");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "35fbfcd55a1f8e95fb4f243385f1ea39");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "type");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('3659911a94fecc81'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('35fbfcd55a1f8e95fb4f243385f1ea39'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:chg', {})
            current.add_element('package:type', {}).add_text("3659911a94fecc81")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("35fbfcd55a1f8e95fb4f243385f1ea39")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>35fbfcd55a1f8e95fb4f243385f1ea39</clTRID>
      <svTRID>test-b0dd87a8d878b61e9a9aab043e58e5bf</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '35fbfcd55a1f8e95fb4f243385f1ea39',
             'svTRID' => 'test-b0dd87a8d878b61e9a9aab043e58e5bf'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 35fbfcd55a1f8e95fb4f243385f1ea39
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-b0dd87a8d878b61e9a9aab043e58e5bf
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "35fbfcd55a1f8e95fb4f243385f1ea39"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-b0dd87a8d878b61e9a9aab043e58e5bf"
  result.children[2].to_s = " \n"

Adding Domain Names to Web Hosting Packages [^Back to contents]

Some of your customers may have multiple domain names which are effectively synonyms of their main one, eg. my-company.com and my-company.co.uk. In this case, you can "map" the extra domain names to their hosting package so that the web server treats them all as being the same site.

To do this, you supply one or more domain names to this function. Please note that domain names cannot be mapped if they're already attached to a hosting package.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:add>
<package:add><package:domainName>+
<package:domainName>mustCreate?(domain name)
mustCreate1See "Creating Web Hosting Packages"
<package:id>(text)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>86416e48b9f13449</package:id>
        <package:add>
          <package:domainName>one.example.org</package:domainName>
          <package:domainName>two.example.org</package:domainName>
        </package:add>
      </package:update>
    </update>
    <clTRID>405381be6b1feb90a5e1c98071289111</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "86416e48b9f13449");
          $w->startTag([$package_ns, "add"]);
            $w->dataElement([$package_ns, "domainName"], "one.example.org");
            $w->dataElement([$package_ns, "domainName"], "two.example.org");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "405381be6b1feb90a5e1c98071289111");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('86416e48b9f13449'));
          $c = $doc->createElementNS($package_ns, "add");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "domainName");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('one.example.org'));
            $c = $doc->createElementNS($package_ns, "domainName");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('two.example.org'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('405381be6b1feb90a5e1c98071289111'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("86416e48b9f13449")
          current = current.add_element('package:add', {})
            current.add_element('package:domainName', {}).add_text("one.example.org")
            current.add_element('package:domainName', {}).add_text("two.example.org")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("405381be6b1feb90a5e1c98071289111")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='2304'>
      <msg>101: two.example.org is already used for web hosting</msg>
    </result>
    <trID>
      <clTRID>405381be6b1feb90a5e1c98071289111</clTRID>
      <svTRID>test-67c4672e203c60c55dc68269e931631e</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '405381be6b1feb90a5e1c98071289111',
             'svTRID' => 'test-67c4672e203c60c55dc68269e931631e'
           },
          'result' => {
            'msg' => '101: two.example.org is already used for web hosting',
            'code' => '2304'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 2304
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => 101: two.example.org is already used for web hosting
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 405381be6b1feb90a5e1c98071289111
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-67c4672e203c60c55dc68269e931631e
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "2304"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "101: two.example.org is already used for web hosting"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "405381be6b1feb90a5e1c98071289111"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-67c4672e203c60c55dc68269e931631e"
  result.children[2].to_s = " \n"

Removing Domain Names from Web Hosting Packages [^Back to contents]

Under some circumstances it is useful to remove a secondary domain name from a package, eg. to split an existing package into two separate sites. To do this, you supply one or more domain names to this function. Please note that the primary domain name cannot be unmapped as that would result in a site which would be completely inaccessible.

Any package-related services (eg. mailboxes) which apply to the domain name in question will be removed when you do this. Sometimes this can take a few minutes while all any stored mail is rerouted.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:rem>
<package:id>(text)
<package:rem><package:domainName>+
<package:domainName>(a domain name)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>14d0261f5175a7f3</package:id>
        <package:rem>
          <package:domainName>one.example.org</package:domainName>
          <package:domainName>two.example.org</package:domainName>
        </package:rem>
      </package:update>
    </update>
    <clTRID>b096442a6dba07e48a387010158d47e4</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "14d0261f5175a7f3");
          $w->startTag([$package_ns, "rem"]);
            $w->dataElement([$package_ns, "domainName"], "one.example.org");
            $w->dataElement([$package_ns, "domainName"], "two.example.org");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "b096442a6dba07e48a387010158d47e4");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('14d0261f5175a7f3'));
          $c = $doc->createElementNS($package_ns, "rem");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "domainName");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('one.example.org'));
            $c = $doc->createElementNS($package_ns, "domainName");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('two.example.org'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('b096442a6dba07e48a387010158d47e4'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("14d0261f5175a7f3")
          current = current.add_element('package:rem', {})
            current.add_element('package:domainName', {}).add_text("one.example.org")
            current.add_element('package:domainName', {}).add_text("two.example.org")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("b096442a6dba07e48a387010158d47e4")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='2305'>
      <msg>1403: one.example.org is a primary domain name</msg>
    </result>
    <trID>
      <clTRID>b096442a6dba07e48a387010158d47e4</clTRID>
      <svTRID>test-50e8b5f12cdbf0fdf23ce18e5f42d54b</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'b096442a6dba07e48a387010158d47e4',
             'svTRID' => 'test-50e8b5f12cdbf0fdf23ce18e5f42d54b'
           },
          'result' => {
            'msg' => '1403: one.example.org is a primary domain name',
            'code' => '2305'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 2305
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => 1403: one.example.org is a primary domain name
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => b096442a6dba07e48a387010158d47e4
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-50e8b5f12cdbf0fdf23ce18e5f42d54b
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "2305"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "1403: one.example.org is a primary domain name"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "b096442a6dba07e48a387010158d47e4"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-50e8b5f12cdbf0fdf23ce18e5f42d54b"
  result.children[2].to_s = " \n"

Renaming Web Hosting Packages [^Back to contents]

Although for the vast majority of purposes all mapped domain names are synonymous, the "primary" domain name for the site does show up in a few places, and your customers may wish to change this, eg. if they manage to buy a better name.

You can use this function to change the web site's primary domain name to either one of the ones already mapped to it or another domain name that you have already set up which is not currently used for web hosting. This will change all logins for the site (eg. eXtend, SSH) as well as the temporary and shared SSL URLs.

It's recommended under most circumstances to keep the old name mapped, but you can remove it afterwards if desired.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:chg>
<package:id>(text)
<package:chg><package:domainName>
<package:domainName>(a domain name)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:chg>
          <package:domainName>three.example.org</package:domainName>
        </package:chg>
      </package:update>
    </update>
    <clTRID>dfe39b788047bcd42ef5f0a09fdaa7fb</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "chg"]);
            $w->dataElement([$package_ns, "domainName"], "three.example.org");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "dfe39b788047bcd42ef5f0a09fdaa7fb");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "domainName");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('three.example.org'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('dfe39b788047bcd42ef5f0a09fdaa7fb'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:chg', {})
            current.add_element('package:domainName', {}).add_text("three.example.org")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("dfe39b788047bcd42ef5f0a09fdaa7fb")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command succeeded</msg>
    </result>
    <trID>
      <clTRID>dfe39b788047bcd42ef5f0a09fdaa7fb</clTRID>
      <svTRID>test-3e3b77723a897695f834d189aa72a739</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'dfe39b788047bcd42ef5f0a09fdaa7fb',
             'svTRID' => 'test-3e3b77723a897695f834d189aa72a739'
           },
          'result' => {
            'msg' => 'Command succeeded',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command succeeded
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => dfe39b788047bcd42ef5f0a09fdaa7fb
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-3e3b77723a897695f834d189aa72a739
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command succeeded"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "dfe39b788047bcd42ef5f0a09fdaa7fb"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-3e3b77723a897695f834d189aa72a739"
  result.children[2].to_s = " \n"

Changing Web Hosting Package Limits [^Back to contents]

You can change the services available on a per-package basis as well as per-package-type. Please see "Creating Web Hosting Package Types" for details of what each option means.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:chg>
<package:id>(text)
<package:chg><package:limits>
<package:limits><package:site>? <package:email>? <package:controlPanel>?Anything not present is unchanged. See "Updating Web Hosting Package Types"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:chg>
          <package:limits>
            <package:site>
              <package:webSpace>40000</package:webSpace>
            </package:site>
          </package:limits>
        </package:chg>
      </package:update>
    </update>
    <clTRID>741eee1b9f16b7207c5b55b9a6f3bbee</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "chg"]);
            $w->startTag([$package_ns, "limits"]);
              $w->startTag([$package_ns, "site"]);
                $w->dataElement([$package_ns, "webSpace"], "40000");
              $w->endTag();
            $w->endTag();
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "741eee1b9f16b7207c5b55b9a6f3bbee");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "limits");
            $l->appendChild($c); $l = $c;
              $c = $doc->createElementNS($package_ns, "site");
              $l->appendChild($c); $l = $c;
                $c = $doc->createElementNS($package_ns, "webSpace");
                $l->appendChild($c);
                $c->appendChild($doc->createTextNode('40000'));
              $l = $l->parentNode;
            $l = $l->parentNode;
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('741eee1b9f16b7207c5b55b9a6f3bbee'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:chg', {})
            current = current.add_element('package:limits', {})
              current = current.add_element('package:site', {})
                current.add_element('package:webSpace', {}).add_text("40000")
              current = current.parent
            current = current.parent
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("741eee1b9f16b7207c5b55b9a6f3bbee")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>741eee1b9f16b7207c5b55b9a6f3bbee</clTRID>
      <svTRID>test-eeb3582adf5c963355b3f4df0ad6963a</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '741eee1b9f16b7207c5b55b9a6f3bbee',
             'svTRID' => 'test-eeb3582adf5c963355b3f4df0ad6963a'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 741eee1b9f16b7207c5b55b9a6f3bbee
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-eeb3582adf5c963355b3f4df0ad6963a
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "741eee1b9f16b7207c5b55b9a6f3bbee"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-eeb3582adf5c963355b3f4df0ad6963a"
  result.children[2].to_s = " \n"

Adding Stop The Hacker to Packages [^Back to contents]

Applies to Stop The Hacker resellers only.

This will add the Stop The Hacker service to the product. If you provide a type code of "lite" or nothing, you will get the standard type which should get set up instantly. If you provide a type code of "pro", you will get the enhanced service which requires you to visit the prebasket page to complete the order.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:add>
<package:id>(text)
<package:add><package:stopTheHacker>
<package:stopTheHacker>"lite" or "pro" or ""

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:add>
          <package:stopTheHacker>pro</package:stopTheHacker>
        </package:add>
      </package:update>
    </update>
    <clTRID>78604c4170e59f394f615d2fa64fec96</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "add"]);
            $w->dataElement([$package_ns, "stopTheHacker"], "pro");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "78604c4170e59f394f615d2fa64fec96");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "add");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "stopTheHacker");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('pro'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('78604c4170e59f394f615d2fa64fec96'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:add', {})
            current.add_element('package:stopTheHacker', {}).add_text("pro")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("78604c4170e59f394f615d2fa64fec96")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <package:preBasket>
        <package:id>5d79635ea29fa5dd</package:id>
      </package:preBasket>
    </resData>
    <trID>
      <clTRID>78604c4170e59f394f615d2fa64fec96</clTRID>
      <svTRID>test-fb95645ccc22d6cb7a12d17442134ccc</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '78604c4170e59f394f615d2fa64fec96',
             'svTRID' => 'test-fb95645ccc22d6cb7a12d17442134ccc'
           },
          'resData' => {
             'package:preBasket' => {
                    'package:id' => '5d79635ea29fa5dd'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:preBasket
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => package:id
              [type] => complete
              [level] => 5
              [value] => 5d79635ea29fa5dd
          )
  
      [8] => Array
          (
              [tag] => package:preBasket
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 78604c4170e59f394f615d2fa64fec96
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-fb95645ccc22d6cb7a12d17442134ccc
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "preBasket"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "5d79635ea29fa5dd"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "78604c4170e59f394f615d2fa64fec96"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-fb95645ccc22d6cb7a12d17442134ccc"
  result.children[2].to_s = " \n"

Removing Stop The Hacker to Packages [^Back to contents]

Applies to Stop The Hacker resellers only.

This will remove the Stop The Hacker service from the product.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:rem>
<package:id>(text)
<package:rem><package:stopTheHacker>
<package:stopTheHacker>"lite" or ""

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>14d0261f5175a7f3</package:id>
        <package:rem>
          <package:stopTheHacker>lite</package:stopTheHacker>
        </package:rem>
      </package:update>
    </update>
    <clTRID>e62ac1ac6ecd39a623a0f54a06829633</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "14d0261f5175a7f3");
          $w->startTag([$package_ns, "rem"]);
            $w->dataElement([$package_ns, "stopTheHacker"], "lite");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "e62ac1ac6ecd39a623a0f54a06829633");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('14d0261f5175a7f3'));
          $c = $doc->createElementNS($package_ns, "rem");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "stopTheHacker");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('lite'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('e62ac1ac6ecd39a623a0f54a06829633'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("14d0261f5175a7f3")
          current = current.add_element('package:rem', {})
            current.add_element('package:stopTheHacker', {}).add_text("lite")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("e62ac1ac6ecd39a623a0f54a06829633")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>e62ac1ac6ecd39a623a0f54a06829633</clTRID>
      <svTRID>test-7327babbb2cf015a33bc1ea88b21184e</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'e62ac1ac6ecd39a623a0f54a06829633',
             'svTRID' => 'test-7327babbb2cf015a33bc1ea88b21184e'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => e62ac1ac6ecd39a623a0f54a06829633
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-7327babbb2cf015a33bc1ea88b21184e
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "e62ac1ac6ecd39a623a0f54a06829633"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-7327babbb2cf015a33bc1ea88b21184e"
  result.children[2].to_s = " \n"

Adding SiteGuard to Packages [^Back to contents]

Applies to SiteGuard resellers only.

This will add the SiteGuard service to the product.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:add>
<package:id>(text)
<package:add><package:siteGuard>
<package:siteGuard>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:add>
          <package:siteGuard/>
        </package:add>
      </package:update>
    </update>
    <clTRID>85cc669ed010bf0fc3db9ae41bf17855</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "add"]);
            $w->emptyTag([$package_ns, "siteGuard"]);
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "85cc669ed010bf0fc3db9ae41bf17855");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "add");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "siteGuard");
            $l->appendChild($c);
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('85cc669ed010bf0fc3db9ae41bf17855'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:add', {})
            current.add_element('package:siteGuard', {})
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("85cc669ed010bf0fc3db9ae41bf17855")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>85cc669ed010bf0fc3db9ae41bf17855</clTRID>
      <svTRID>test-7742527b6c3f548f61285607cde9c26b</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '85cc669ed010bf0fc3db9ae41bf17855',
             'svTRID' => 'test-7742527b6c3f548f61285607cde9c26b'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 85cc669ed010bf0fc3db9ae41bf17855
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-7742527b6c3f548f61285607cde9c26b
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "85cc669ed010bf0fc3db9ae41bf17855"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-7742527b6c3f548f61285607cde9c26b"
  result.children[2].to_s = " \n"

Removing SiteGuard from Packages [^Back to contents]

Applies to SiteGuard resellers only.

This will remove the SiteGuard service from the product.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:rem>
<package:id>(text)
<package:rem><package:siteGuard>
<package:siteGuard>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>14d0261f5175a7f3</package:id>
        <package:rem>
          <package:siteGuard/>
        </package:rem>
      </package:update>
    </update>
    <clTRID>8f89502b5302a0ba70431394e687077c</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "14d0261f5175a7f3");
          $w->startTag([$package_ns, "rem"]);
            $w->emptyTag([$package_ns, "siteGuard"]);
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "8f89502b5302a0ba70431394e687077c");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('14d0261f5175a7f3'));
          $c = $doc->createElementNS($package_ns, "rem");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "siteGuard");
            $l->appendChild($c);
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('8f89502b5302a0ba70431394e687077c'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("14d0261f5175a7f3")
          current = current.add_element('package:rem', {})
            current.add_element('package:siteGuard', {})
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("8f89502b5302a0ba70431394e687077c")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>8f89502b5302a0ba70431394e687077c</clTRID>
      <svTRID>test-8d7dc02fa0cb56a3a6bd1bd56fefbbaf</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '8f89502b5302a0ba70431394e687077c',
             'svTRID' => 'test-8d7dc02fa0cb56a3a6bd1bd56fefbbaf'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 8f89502b5302a0ba70431394e687077c
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-8d7dc02fa0cb56a3a6bd1bd56fefbbaf
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "8f89502b5302a0ba70431394e687077c"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-8d7dc02fa0cb56a3a6bd1bd56fefbbaf"
  result.children[2].to_s = " \n"

PACKAGE AUTHENTICATION AND ACTION COMMANDS [^Back to contents]

Changing Web Hosting Package Passwords [^Back to contents]

As with renaming packages, this affects authentication (eXtend, SSH et cetera). This will change the specified password only to the value provided. If you ask for the "control-panel" type, that will only affect the login password; if you ask for the "ftp" type, that will only affect the other (SSH, et cetera) passwords, unless the eXtend login password is already the same.

There are several password validity requirements. At the time of writing, they are:

Must have all of:

[Show]
 I. Contains non-alphanumeric characters
 II. At least 8 characters long.
 III. Satisfy two of:
  A. Contains capital letters
  B. Contains lower-case letters
  C. Contains digits

If you don't specify the password, one will be generated randomly for you. This is the recommended approach. In either case, the password will be fed back to you on success.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:update>
<package:update><package:id> <package:chg>
<package:id>(text)
<package:chg><package:password>
<package:password>type(text)Either a password, or empty (to generate one)
type"control-panel" or "ftp"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:update>
        <package:id>d14fc1b01e9ce334</package:id>
        <package:chg>
          <package:password type="control-panel"/>
        </package:chg>
      </package:update>
    </update>
    <clTRID>5f43b7a1badbcc27bbe3b39428e65cf5</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "update"]);
          $w->dataElement([$package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$package_ns, "chg"]);
            $w->emptyTag([$package_ns, "password"], 'type' => "control-panel");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "5f43b7a1badbcc27bbe3b39428e65cf5");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($package_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "password");$c->setAttribute('type', "control-panel"); 
            $l->appendChild($c);
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('5f43b7a1badbcc27bbe3b39428e65cf5'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:update', {})
          current.add_element('package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('package:chg', {})
            current.add_element('package:password', {'type' => "control-panel"})
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("5f43b7a1badbcc27bbe3b39428e65cf5")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><package:password>
<package:password>(text)The password allocated

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <package:password>5wNDUcSo=</package:password>
    </resData>
    <trID>
      <clTRID>5f43b7a1badbcc27bbe3b39428e65cf5</clTRID>
      <svTRID>test-4f31a8a0310b2e8b72fa5fcb9b4d6e56</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '5f43b7a1badbcc27bbe3b39428e65cf5',
             'svTRID' => 'test-4f31a8a0310b2e8b72fa5fcb9b4d6e56'
           },
          'resData' => {
             'package:password' => '5wNDUcSo='
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:password
              [type] => complete
              [level] => 4
              [value] => 5wNDUcSo=
          )
  
      [7] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 5f43b7a1badbcc27bbe3b39428e65cf5
          )
  
      [10] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-4f31a8a0310b2e8b72fa5fcb9b4d6e56
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [13] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "password"
                                                   (...).children[0].to_s = "5wNDUcSo="
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "5f43b7a1badbcc27bbe3b39428e65cf5"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-4f31a8a0310b2e8b72fa5fcb9b4d6e56"
  result.children[2].to_s = " \n"

eXtend Control Panel Pre-Authentication [^Back to contents]

This will provide you with a URL to allow the user to log straight in to eXtend without providing a username and password. The URL expires soon afterwards, so this should be used for immediate redirects only.

What to send

Syntax

KeyAttributesContentsNotes
<command><info> <extension>
<info><package:info>
<package:info><package:id>
<package:id>(text)
<extension><ext-package:preAuthenticate>
<ext-package:preAuthenticate>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <info>
      <package:info>
        <package:id>17824b25c16eecfa</package:id>
      </package:info>
    </info>
    <extension>
      <ext-package:preAuthenticate xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2"/>
    </extension>
    <clTRID>fac89208bea460fa3fef11b22a519cce</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
  $ext_package_ns => "ext-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$package_ns, "info"]);
          $w->dataElement([$package_ns, "id"], "17824b25c16eecfa");
        $w->endTag();
      $w->endTag();
      $w->startTag('extension');
        $w->emptyTag([$ext_package_ns, "preAuthenticate"]);
      $w->endTag();
      $w->dataElement('clTRID', "fac89208bea460fa3fef11b22a519cce");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('17824b25c16eecfa'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'extension');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_package_ns, "preAuthenticate");
        $l->appendChild($c);
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('fac89208bea460fa3fef11b22a519cce'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('package:info', {})
          current.add_element('package:id', {}).add_text("17824b25c16eecfa")
        current = current.parent
      current = current.parent
      current = current.add_element('extension', {})
        current.add_element('ext-package:preAuthenticate', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
      current = current.parent
      current.add_element('clTRID', {}).add_text("fac89208bea460fa3fef11b22a519cce")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-package:redirectURL>
<ext-package:redirectURL>(a URL)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-package:redirectURL>http://bobcp.example.org/sso.cgi?session=LUB9UNbw6jTW</ext-package:redirectURL>
    </resData>
    <trID>
      <clTRID>fac89208bea460fa3fef11b22a519cce</clTRID>
      <svTRID>test-19272326601ef4c3bf6b64730d09c6cf</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'fac89208bea460fa3fef11b22a519cce',
             'svTRID' => 'test-19272326601ef4c3bf6b64730d09c6cf'
           },
          'resData' => {
             'ext-package:redirectURL' => 'http://bobcp.example.org/sso.cgi?session=LUB9UNbw6jTW'
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-package:redirectURL
              [type] => complete
              [level] => 4
              [value] => http://bobcp.example.org/sso.cgi?session=LUB9UNbw6jTW
          )
  
      [7] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => fac89208bea460fa3fef11b22a519cce
          )
  
      [10] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-19272326601ef4c3bf6b64730d09c6cf
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [13] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "redirectURL"
                                                   (...).children[0].to_s = "http://bobcp.example.org/sso.cgi?session=LUB9UNbw6jTW"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "fac89208bea460fa3fef11b22a519cce"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-19272326601ef4c3bf6b64730d09c6cf"
  result.children[2].to_s = " \n"

Resending Welcome Emails [^Back to contents]

Although a welcome email (if you configured one in the RCC) is sent when a hosting package is set up, your customer may lose or simply not receive the message. If that's the case then you can re-send it using this function. Please note that you must specify the recipient email address.

A success response does not guarantee that the message will be received, just that a send has been attempted.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-package:resendWelcomeEmail>
<ext-package:resendWelcomeEmail><ext-package:id> <ext-package:emailAddress>
<ext-package:id>(text)
<ext-package:emailAddress>name?(An email address)
name(A person's name)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <extension>
    <ext-package:resendWelcomeEmail>
      <ext-package:id>98b76dae8d6204ab</ext-package:id>
      <ext-package:emailAddress name="Foo Bar">foo@bar.example.org</ext-package:emailAddress>
    </ext-package:resendWelcomeEmail>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">8e8165124f3f341981b0339ca48568b0</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_package_ns => "ext-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->startTag([$ext_package_ns, "resendWelcomeEmail"]);
        $w->dataElement([$ext_package_ns, "id"], "98b76dae8d6204ab");
        $w->dataElement([$ext_package_ns, "emailAddress"], "foo\x40bar.example.org", 'name' => "Foo Bar");
      $w->endTag();
      $w->dataElement([$ext_whapi_ns, "clTRID"], "8e8165124f3f341981b0339ca48568b0");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_package_ns, "resendWelcomeEmail");
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_package_ns, "id");
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('98b76dae8d6204ab'));
        $c = $doc->createElementNS($ext_package_ns, "emailAddress");$c->setAttribute('name', "Foo Bar"); 
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('foo@bar.example.org'));
      $l = $l->parentNode;
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('8e8165124f3f341981b0339ca48568b0'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
    current = current.add_element('extension', {})
      current = current.add_element('ext-package:resendWelcomeEmail', {})
        current.add_element('ext-package:id', {}).add_text("98b76dae8d6204ab")
        current.add_element('ext-package:emailAddress', {'name' => "Foo Bar"}).add_text("foo\x40bar.example.org")
      current = current.parent
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("8e8165124f3f341981b0339ca48568b0")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>8e8165124f3f341981b0339ca48568b0</clTRID>
      <svTRID>test-e47fb2eec159c5347e9a089c02037953</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '8e8165124f3f341981b0339ca48568b0',
             'svTRID' => 'test-e47fb2eec159c5347e9a089c02037953'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 8e8165124f3f341981b0339ca48568b0
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-e47fb2eec159c5347e9a089c02037953
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "8e8165124f3f341981b0339ca48568b0"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-e47fb2eec159c5347e9a089c02037953"
  result.children[2].to_s = " \n"

PACKAGE TYPE COMMANDS [^Back to contents]

Listing Welcome Emails [^Back to contents]

This provides a list of welcome email titles and IDs to help you select which one is appropriate to assign to a particular web hosting package type.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-package:listWelcomeEmails>
<ext-package:listWelcomeEmails>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <extension>
    <ext-package:listWelcomeEmails/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">0984efee0664d403da12d77e4d958c90</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_package_ns => "ext-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_package_ns, "listWelcomeEmails"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "0984efee0664d403da12d77e4d958c90");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_package_ns, "listWelcomeEmails");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('0984efee0664d403da12d77e4d958c90'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
    current = current.add_element('extension', {})
      current.add_element('ext-package:listWelcomeEmails', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("0984efee0664d403da12d77e4d958c90")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-package:lstData>
<ext-package:lstData><ext-package:welcomeEmail>*
<ext-package:welcomeEmail>id(a name)
id(number)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-package:lstData>
        <ext-package:welcomeEmail id='3f98c4f6f2aeb38d'>Big business</ext-package:welcomeEmail>
        <ext-package:welcomeEmail id='1f5ee58018d03228'>Home user</ext-package:welcomeEmail>
        <ext-package:welcomeEmail id='9fca3c83452b404d'>Small business</ext-package:welcomeEmail>
      </ext-package:lstData>
    </resData>
    <trID>
      <clTRID>0984efee0664d403da12d77e4d958c90</clTRID>
      <svTRID>test-ce611ec5add0a834c353eae7dc339bc9</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '0984efee0664d403da12d77e4d958c90',
             'svTRID' => 'test-ce611ec5add0a834c353eae7dc339bc9'
           },
          'resData' => {
             'ext-package:lstData' => {
                   'ext-package:welcomeEmail' => {
                           '3f98c4f6f2aeb38d' => {
                                 'content' => 'Big business'
                                  },
                           '9fca3c83452b404d' => {
                                 'content' => 'Small business'
                                  },
                           '1f5ee58018d03228' => {
                                 'content' => 'Home user'
                                  }
                            }
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-package:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-package:welcomeEmail
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 3f98c4f6f2aeb38d
                  )
  
              [value] => Big business
          )
  
      [8] => Array
          (
              [tag] => ext-package:welcomeEmail
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 1f5ee58018d03228
                  )
  
              [value] => Home user
          )
  
      [9] => Array
          (
              [tag] => ext-package:welcomeEmail
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 9fca3c83452b404d
                  )
  
              [value] => Small business
          )
  
      [10] => Array
          (
              [tag] => ext-package:lstData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 0984efee0664d403da12d77e4d958c90
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-ce611ec5add0a834c353eae7dc339bc9
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "welcomeEmail"
                                                               (...).attributes["id"] = "3f98c4f6f2aeb38d"
                                                               (...).children[0].to_s = "Big business"
                                                   (...).children[1].name = "welcomeEmail"
                                                               (...).attributes["id"] = "1f5ee58018d03228"
                                                               (...).children[0].to_s = "Home user"
                                                   (...).children[2].name = "welcomeEmail"
                                                               (...).attributes["id"] = "9fca3c83452b404d"
                                                               (...).children[0].to_s = "Small business"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "0984efee0664d403da12d77e4d958c90"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-ce611ec5add0a834c353eae7dc339bc9"
  result.children[2].to_s = " \n"

Creating Web Hosting Package Types [^Back to contents]

This interface supports creating new types of web hosting package. You must provide a <package:serverType> element (containing "windows" or "linux") and a <package:typeName>, but most of the other sections are optional and default to "unlimited" where applicable.

Please note that the features are grouped by the underlying type, eg. "webalizer" must be in a <package:script> element despite the fact that it doesn't appear with the rest of the installable scripts in eXtend.

Feature Codes

Please note that not all features apply to all package types.

backupBackup Your Website
builderWebsite Builder
bwstatsBandwidth Graphs
catchallCatch All Email Forwarding
cronScheduled Tasks
dl_images100,000+ Photos, Images and Web Art
dl_softwareFree Software
duWeb Space Checker
email_filter_logsEmail Filter Logs
email_summaryEmail Summary
filemanagerFile Manager
htaccessWebsite Password Protection & IP Address Blocking
html_tidyHTML Tools
iis_appIIS Applications (Windows only)
iis_app_poolManage IIS Applications Pools (Windows only)
logsLog File Download
net_toolsNetwork Tools
package_infoDisplay Account Summary
passwordChange Your Password
perl_cCGI Script Tools
php5ifySwitch PHP version
redirectWebsite Redirect
searchsubmitSite Submission
server_infoDisplay Web Server Information
sitemapGoogle Site Map
spamJunk Mail Filters
sshSSH Server Access (Linux only)
sslSecure Server Access
supportdbSupport DB access (make sure you configure this in the RCC first)
templates550+ Website Templates
wd_javascriptJavascript Maker
wd_linksWeb Design Links
webmailWebmail
whtemplates5 Web Hosting Templates

CGI Script Codes

This list may change relatively frequently, but the current supported scripts for each server type are listed below.

Linux

404404/500 Error Page
advertsBanner Advert Manager
auctionWeb Auction
awstatsAWStats Graphical Statistics
b2evolutionb2evolution - blog/CMS engine
bbpressBbpress - fast forum software from Wordpress
buddypressBuddypress - Wordpress with social networking
calendarWeb Calendar
classifiedClassified Adverts,
clockJava Clock
cms2Nucleus Weblog
cmsmadesimpleCms Made Simple - Powerful website creation
cmsGeeklog - The Ultimate Weblog System
concrete5Concrete5 - a CMS managed from anywhere
coppermineCoppermine Photo Gallery
countdownInternet Countdown
counterGraphical/Text Access Counter & Hits Logger in One
craftyCrafty Syntax Live Help,
cubecartCubeCart
dotprojectdotProject
drupal7Drupal7 CMS
drupalDrupal6 CMS
elggElgg
formmailForm to Email
forumphpBB 3,
friendTell-A-Friend
gallery2Photo Gallery (db)
guestbookproGuestbook
guestbookGuestbook
joomla15Joomla! CMS 1.5
joomla25Joomla! CMS 2.5
joomla3Joomla! CMS 3.0
joomlaJoomla! CMS 1.7
lalLocked Area Lite
linksFree For All Links Page
mamboMambo CMS
mediawikiMediaWiki
modxMODX
moodleMoodle
openadsOpenads
opencartOpenCart
osticketosTicket
owaOpen Web Analytics
photoPhoto Gallery (no db)
phpbb2phpBB 2
phpcoinPHPCoin
piwikPiwik
pliggPligg Social Networking
postcardWeb Postcards
prestashopPrestashop
randomimagesRandom Images Displayer
randomtextRandom Text Displayer
roundcubeRoundCube WebMail
searchWebsite Search
shopping2osCommerce Shopping Cart
shoppingAgora Shopping Cart
silverstripeSilverStripe CMS
sinvoicesSimple Invoices
squirrelmailSquirrel Mail
sugarcrmSugarCRM
surveyWeb Survey
ticketTrouble Ticket Express
tomatocartTomatoCart
tracewatchTraceWatch
typoTypo3
vanillaVanilla Forums
webalizerWebalizer Graphical Statistics
webboardE-Blah Discussion Board
webringWeb Ring
whoisDomain Name Checker
wordpressWordPress Blog
zencartZen Cart

Windows

404404/500 Error Page
awstatsAWStats Graphical Statistics
counterGraphical/Text Access Counter & Hits Logger in One
formmailForm to Email
guestbookproGuestbook
igalleryPhoto Gallery
joomla15Joomla! CMS 1.5
joomla25Joomla! CMS 2.5
joomlaJoomla! CMS 1.7
mcartfreeMetaCart Shopping Cart
roundcubeRoundCube WebMail
searchWebsite Search
simpleblogSimple Blog
umbraco5Umbraco 5 CMS
umbracoUmbraco 4.7 CMS
webalizerWebalizer Graphical Statistics
wordpressWordPress Blog

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><package:createType>
<package:createType><package:serverType> <package:typeName> <package:welcomeEmailId>? <package:site>? <package:email>? <package:controlPanel>?Anything not present is unlimited
<package:serverType>(text)"linux" or "windows"
<package:typeName>(text)
<package:welcomeEmailId>(text)This is the ID of one of your welcome emails
<package:site><package:webSpace>? <package:bandwidth>? <package:subDomains>? <package:extraFTPUsers>? <package:databases>?Anything not present is unlimited
<package:webSpace>(number or "unlimited")Expressed as a number of megabytes
<package:bandwidth>(number or "unlimited")Expressed as a number of megabytes
<package:subDomains>(number or "unlimited")
<package:extraFTPUsers>(number or "unlimited")
<package:databases>(number or "unlimited")
<package:email><package:emailForwarders>? <package:emailResponders>? <package:emailLists>? <package:emailBoxes>?Anything not present is unlimited
<package:emailForwarders>(number or "unlimited")
<package:emailResponders>(number or "unlimited")
<package:emailLists>(number or "unlimited")
<package:emailBoxes>(number or "unlimited")
<package:controlPanel><package:tool>* <package:script>*Anything not present is disabled
<package:tool>(text)Feature code, see above.
<package:script>(text)CGI script code, see above

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <create>
      <package:createType>
        <package:serverType>linux</package:serverType>
        <package:typeName>Gold Web Site</package:typeName>
        <package:welcomeEmailId>b4e59e9404d02661</package:welcomeEmailId>
        <package:site>
          <package:webSpace>20000</package:webSpace>
          <package:bandwidth>20000</package:bandwidth>
          <package:subDomains>2</package:subDomains>
          <package:extraFTPUsers>20</package:extraFTPUsers>
          <package:databases>200</package:databases>
        </package:site>
        <package:email>
          <package:emailForwarders>unlimited</package:emailForwarders>
          <package:emailResponders>10</package:emailResponders>
          <package:emailLists>100</package:emailLists>
          <package:emailBoxes>2000</package:emailBoxes>
        </package:email>
        <package:controlPanel>
          <package:tool>builder</package:tool>
          <package:tool>filemanager</package:tool>
          <package:script>wordpress</package:script>
          <package:script>cms</package:script>
        </package:controlPanel>
      </package:createType>
    </create>
    <clTRID>92484572cb741a8f9b5a7cfe1f123f45</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$package_ns, "createType"]);
          $w->dataElement([$package_ns, "serverType"], "linux");
          $w->dataElement([$package_ns, "typeName"], "Gold Web Site");
          $w->dataElement([$package_ns, "welcomeEmailId"], "b4e59e9404d02661");
          $w->startTag([$package_ns, "site"]);
            $w->dataElement([$package_ns, "webSpace"], "20000");
            $w->dataElement([$package_ns, "bandwidth"], "20000");
            $w->dataElement([$package_ns, "subDomains"], "2");
            $w->dataElement([$package_ns, "extraFTPUsers"], "20");
            $w->dataElement([$package_ns, "databases"], "200");
          $w->endTag();
          $w->startTag([$package_ns, "email"]);
            $w->dataElement([$package_ns, "emailForwarders"], "unlimited");
            $w->dataElement([$package_ns, "emailResponders"], "10");
            $w->dataElement([$package_ns, "emailLists"], "100");
            $w->dataElement([$package_ns, "emailBoxes"], "2000");
          $w->endTag();
          $w->startTag([$package_ns, "controlPanel"]);
            $w->dataElement([$package_ns, "tool"], "builder");
            $w->dataElement([$package_ns, "tool"], "filemanager");
            $w->dataElement([$package_ns, "script"], "wordpress");
            $w->dataElement([$package_ns, "script"], "cms");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "92484572cb741a8f9b5a7cfe1f123f45");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "createType");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "serverType");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('linux'));
          $c = $doc->createElementNS($package_ns, "typeName");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('Gold Web Site'));
          $c = $doc->createElementNS($package_ns, "welcomeEmailId");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('b4e59e9404d02661'));
          $c = $doc->createElementNS($package_ns, "site");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "webSpace");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20000'));
            $c = $doc->createElementNS($package_ns, "bandwidth");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20000'));
            $c = $doc->createElementNS($package_ns, "subDomains");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('2'));
            $c = $doc->createElementNS($package_ns, "extraFTPUsers");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20'));
            $c = $doc->createElementNS($package_ns, "databases");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('200'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($package_ns, "email");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "emailForwarders");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('unlimited'));
            $c = $doc->createElementNS($package_ns, "emailResponders");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('10'));
            $c = $doc->createElementNS($package_ns, "emailLists");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('100'));
            $c = $doc->createElementNS($package_ns, "emailBoxes");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('2000'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($package_ns, "controlPanel");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "tool");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('builder'));
            $c = $doc->createElementNS($package_ns, "tool");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('filemanager'));
            $c = $doc->createElementNS($package_ns, "script");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('wordpress'));
            $c = $doc->createElementNS($package_ns, "script");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('cms'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('92484572cb741a8f9b5a7cfe1f123f45'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('package:createType', {})
          current.add_element('package:serverType', {}).add_text("linux")
          current.add_element('package:typeName', {}).add_text("Gold Web Site")
          current.add_element('package:welcomeEmailId', {}).add_text("b4e59e9404d02661")
          current = current.add_element('package:site', {})
            current.add_element('package:webSpace', {}).add_text("20000")
            current.add_element('package:bandwidth', {}).add_text("20000")
            current.add_element('package:subDomains', {}).add_text("2")
            current.add_element('package:extraFTPUsers', {}).add_text("20")
            current.add_element('package:databases', {}).add_text("200")
          current = current.parent
          current = current.add_element('package:email', {})
            current.add_element('package:emailForwarders', {}).add_text("unlimited")
            current.add_element('package:emailResponders', {}).add_text("10")
            current.add_element('package:emailLists', {}).add_text("100")
            current.add_element('package:emailBoxes', {}).add_text("2000")
          current = current.parent
          current = current.add_element('package:controlPanel', {})
            current.add_element('package:tool', {}).add_text("builder")
            current.add_element('package:tool', {}).add_text("filemanager")
            current.add_element('package:script', {}).add_text("wordpress")
            current.add_element('package:script', {}).add_text("cms")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("92484572cb741a8f9b5a7cfe1f123f45")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><package:creData>
<package:creData><package:typeId>
<package:typeId>(text)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Hosting package type created/updated successfully</msg>
    </result>
    <resData>
      <package:creData>
        <package:typeId>afd1a0447971c92d</package:typeId>
      </package:creData>
    </resData>
    <trID>
      <clTRID>92484572cb741a8f9b5a7cfe1f123f45</clTRID>
      <svTRID>test-792bef96a18ceeeede423b073669734d</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '92484572cb741a8f9b5a7cfe1f123f45',
             'svTRID' => 'test-792bef96a18ceeeede423b073669734d'
           },
          'resData' => {
             'package:creData' => {
                  'package:typeId' => 'afd1a0447971c92d'
                   }
              },
          'result' => {
            'msg' => 'Hosting package type created/updated successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Hosting package type created/updated successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:creData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => package:typeId
              [type] => complete
              [level] => 5
              [value] => afd1a0447971c92d
          )
  
      [8] => Array
          (
              [tag] => package:creData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 92484572cb741a8f9b5a7cfe1f123f45
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-792bef96a18ceeeede423b073669734d
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Hosting package type created/updated successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).children[0].name = "typeId"
                                                               (...).children[0].to_s = "afd1a0447971c92d"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "92484572cb741a8f9b5a7cfe1f123f45"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-792bef96a18ceeeede423b073669734d"
  result.children[2].to_s = " \n"

Listing Web Hosting Package Types [^Back to contents]

This provides a list of package types (just names and IDs), intended mainly for debugging purposes.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-package:listTypes>
<ext-package:listTypes>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <extension>
    <ext-package:listTypes/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">82562e1830f07de8e8913cb894efd6b5</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_package_ns => "ext-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_package_ns, "listTypes"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "82562e1830f07de8e8913cb894efd6b5");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_package_ns, "listTypes");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('82562e1830f07de8e8913cb894efd6b5'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
    current = current.add_element('extension', {})
      current.add_element('ext-package:listTypes', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("82562e1830f07de8e8913cb894efd6b5")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-package:lstData>
<ext-package:lstData><ext-package:packageType>*
<ext-package:packageType>id serverType(a name)
id(number)
serverType"linux" or "windows"

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-package:lstData>
        <ext-package:packageType id='63b3d8d7a1383273' serverType='linux'>Gold Package</ext-package:packageType>
        <ext-package:packageType id='3b2db89769d20c0d' serverType='windows'>Silver Package</ext-package:packageType>
        <ext-package:packageType id='d646b5a8b964f8c6' serverType='linux'>My Custom Config</ext-package:packageType>
      </ext-package:lstData>
    </resData>
    <trID>
      <clTRID>82562e1830f07de8e8913cb894efd6b5</clTRID>
      <svTRID>test-0ba2a26d4d9c5b44a8b268f102a71fc3</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '82562e1830f07de8e8913cb894efd6b5',
             'svTRID' => 'test-0ba2a26d4d9c5b44a8b268f102a71fc3'
           },
          'resData' => {
             'ext-package:lstData' => {
                   'ext-package:packageType' => {
                             '3b2db89769d20c0d' => {
                                   'content' => 'Silver Package',
                                   'serverType' => 'windows'
                                 },
                             '63b3d8d7a1383273' => {
                                   'content' => 'Gold Package',
                                   'serverType' => 'linux'
                                 },
                             'd646b5a8b964f8c6' => {
                                   'content' => 'My Custom Config',
                                   'serverType' => 'linux'
                                 }
                           }
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-package:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-package:packageType
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 63b3d8d7a1383273
                      [serverType] => linux
                  )
  
              [value] => Gold Package
          )
  
      [8] => Array
          (
              [tag] => ext-package:packageType
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 3b2db89769d20c0d
                      [serverType] => windows
                  )
  
              [value] => Silver Package
          )
  
      [9] => Array
          (
              [tag] => ext-package:packageType
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => d646b5a8b964f8c6
                      [serverType] => linux
                  )
  
              [value] => My Custom Config
          )
  
      [10] => Array
          (
              [tag] => ext-package:lstData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 82562e1830f07de8e8913cb894efd6b5
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-0ba2a26d4d9c5b44a8b268f102a71fc3
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "packageType"
                                                               (...).attributes["id"] = "63b3d8d7a1383273"
                                                               (...).attributes["serverType"] = "linux"
                                                               (...).children[0].to_s = "Gold Package"
                                                   (...).children[1].name = "packageType"
                                                               (...).attributes["id"] = "3b2db89769d20c0d"
                                                               (...).attributes["serverType"] = "windows"
                                                               (...).children[0].to_s = "Silver Package"
                                                   (...).children[2].name = "packageType"
                                                               (...).attributes["id"] = "d646b5a8b964f8c6"
                                                               (...).attributes["serverType"] = "linux"
                                                               (...).children[0].to_s = "My Custom Config"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "82562e1830f07de8e8913cb894efd6b5"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-0ba2a26d4d9c5b44a8b268f102a71fc3"
  result.children[2].to_s = " \n"

Examining Web Hosting Package Types [^Back to contents]

This allows you to get the full current configuration of one of your web hosting package types.

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><package:infoType>
<package:infoType><package:typeId>
<package:typeId>(text)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <info>
      <package:infoType>
        <package:typeId>5d62718c88ab975e</package:typeId>
      </package:infoType>
    </info>
    <clTRID>90693d2dc60019b2cd50ba6d47b0e1cc</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$package_ns, "infoType"]);
          $w->dataElement([$package_ns, "typeId"], "5d62718c88ab975e");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "90693d2dc60019b2cd50ba6d47b0e1cc");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "infoType");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "typeId");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('5d62718c88ab975e'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('90693d2dc60019b2cd50ba6d47b0e1cc'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('package:infoType', {})
          current.add_element('package:typeId', {}).add_text("5d62718c88ab975e")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("90693d2dc60019b2cd50ba6d47b0e1cc")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><package:infData>
<package:infData><package:typeId> <package:roid> <package:serverType> <package:typeName> <package:welcomeEmailId>? <package:site>? <package:email>? <package:controlPanel>?Anything not present is unlimited
<package:typeId>(text)
<package:roid>(text)
<package:serverType>(text)"linux" or "windows"
<package:typeName>(text)
<package:welcomeEmailId>(text)This is the ID of one of your welcome emails
<package:site><package:webSpace>? <package:bandwidth>? <package:subDomains>? <package:extraFTPUsers>? <package:databases>?Anything not present is unlimited
<package:webSpace>(number or "unlimited")Expressed as a number of megabytes
<package:bandwidth>(number or "unlimited")Expressed as a number of megabytes
<package:subDomains>(number or "unlimited")
<package:extraFTPUsers>(number or "unlimited")
<package:databases>(number or "unlimited")
<package:email><package:emailForwarders>? <package:emailResponders>? <package:emailLists>? <package:emailBoxes>?Anything not present is unlimited
<package:emailForwarders>(number or "unlimited")
<package:emailResponders>(number or "unlimited")
<package:emailLists>(number or "unlimited")
<package:emailBoxes>(number or "unlimited")
<package:controlPanel><package:tool>* <package:script>*Anything not present is disabled
<package:tool>(text)Feature code, see above.
<package:script>(text)CGI script code, see above

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Command succeeded</msg>
    </result>
    <resData>
      <package:infData>
        <package:typeId>bdebb61525364a4b</package:typeId>
        <package:roid>BDEBB61525364A4B-HI</package:roid>
        <package:serverType>linux</package:serverType>
        <package:typeName>Gold Web Site</package:typeName>
        <package:welcomeEmailId>b4e59e9404d02661</package:welcomeEmailId>
        <package:site>
          <package:webSpace>20000</package:webSpace>
          <package:bandwidth>20000</package:bandwidth>
          <package:subDomains>2</package:subDomains>
          <package:extraFTPUsers>20</package:extraFTPUsers>
          <package:databases>200</package:databases>
        </package:site>
        <package:email>
          <package:emailForwarders>unlimited</package:emailForwarders>
          <package:emailResponders>10</package:emailResponders>
          <package:emailLists>100</package:emailLists>
          <package:emailBoxes>2000</package:emailBoxes>
        </package:email>
        <package:controlPanel>
          <package:tool>builder</package:tool>
          <package:script>wordpress</package:script>
        </package:controlPanel>
      </package:infData>
    </resData>
    <trID>
      <clTRID>90693d2dc60019b2cd50ba6d47b0e1cc</clTRID>
      <svTRID>test-91e242226c362d5127f98db8330b9e59</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '90693d2dc60019b2cd50ba6d47b0e1cc',
             'svTRID' => 'test-91e242226c362d5127f98db8330b9e59'
           },
          'resData' => {
             'package:infData' => {
                  'package:email' => {
                        'package:emailLists' => '100',
                        'package:emailBoxes' => '2000',
                        'package:emailForwarders' => 'unlimited',
                        'package:emailResponders' => '10'
                         },
                  'package:controlPanel' => {
                         'package:tool' => 'builder',
                         'package:script' => 'wordpress'
                          },
                  'package:roid' => 'BDEBB61525364A4B-HI',
                  'package:welcomeEmailId' => 'b4e59e9404d02661',
                  'package:serverType' => 'linux',
                  'package:site' => {
                       'package:extraFTPUsers' => '20',
                       'package:webSpace' => '20000',
                       'package:databases' => '200',
                       'package:subDomains' => '2',
                       'package:bandwidth' => '20000'
                        },
                  'package:typeName' => 'Gold Web Site',
                  'package:typeId' => 'bdebb61525364a4b'
                   }
              },
          'result' => {
            'msg' => 'Command succeeded',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command succeeded
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => package:infData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => package:typeId
              [type] => complete
              [level] => 5
              [value] => bdebb61525364a4b
          )
  
      [8] => Array
          (
              [tag] => package:roid
              [type] => complete
              [level] => 5
              [value] => BDEBB61525364A4B-HI
          )
  
      [9] => Array
          (
              [tag] => package:serverType
              [type] => complete
              [level] => 5
              [value] => linux
          )
  
      [10] => Array
          (
              [tag] => package:typeName
              [type] => complete
              [level] => 5
              [value] => Gold Web Site
          )
  
      [11] => Array
          (
              [tag] => package:welcomeEmailId
              [type] => complete
              [level] => 5
              [value] => b4e59e9404d02661
          )
  
      [12] => Array
          (
              [tag] => package:site
              [type] => open
              [level] => 5
          )
  
      [13] => Array
          (
              [tag] => package:webSpace
              [type] => complete
              [level] => 6
              [value] => 20000
          )
  
      [14] => Array
          (
              [tag] => package:bandwidth
              [type] => complete
              [level] => 6
              [value] => 20000
          )
  
      [15] => Array
          (
              [tag] => package:subDomains
              [type] => complete
              [level] => 6
              [value] => 2
          )
  
      [16] => Array
          (
              [tag] => package:extraFTPUsers
              [type] => complete
              [level] => 6
              [value] => 20
          )
  
      [17] => Array
          (
              [tag] => package:databases
              [type] => complete
              [level] => 6
              [value] => 200
          )
  
      [18] => Array
          (
              [tag] => package:site
              [type] => close
              [level] => 5
          )
  
      [19] => Array
          (
              [tag] => package:email
              [type] => open
              [level] => 5
          )
  
      [20] => Array
          (
              [tag] => package:emailForwarders
              [type] => complete
              [level] => 6
              [value] => unlimited
          )
  
      [21] => Array
          (
              [tag] => package:emailResponders
              [type] => complete
              [level] => 6
              [value] => 10
          )
  
      [22] => Array
          (
              [tag] => package:emailLists
              [type] => complete
              [level] => 6
              [value] => 100
          )
  
      [23] => Array
          (
              [tag] => package:emailBoxes
              [type] => complete
              [level] => 6
              [value] => 2000
          )
  
      [24] => Array
          (
              [tag] => package:email
              [type] => close
              [level] => 5
          )
  
      [25] => Array
          (
              [tag] => package:controlPanel
              [type] => open
              [level] => 5
          )
  
      [26] => Array
          (
              [tag] => package:tool
              [type] => complete
              [level] => 6
              [value] => builder
          )
  
      [27] => Array
          (
              [tag] => package:script
              [type] => complete
              [level] => 6
              [value] => wordpress
          )
  
      [28] => Array
          (
              [tag] => package:controlPanel
              [type] => close
              [level] => 5
          )
  
      [29] => Array
          (
              [tag] => package:infData
              [type] => close
              [level] => 4
          )
  
      [30] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [31] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [32] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 90693d2dc60019b2cd50ba6d47b0e1cc
          )
  
      [33] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-91e242226c362d5127f98db8330b9e59
          )
  
      [34] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [35] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [36] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command succeeded"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).children[0].name = "typeId"
                                                               (...).children[0].to_s = "bdebb61525364a4b"
                                                   (...).children[1].name = "roid"
                                                               (...).children[0].to_s = "BDEBB61525364A4B-HI"
                                                   (...).children[2].name = "serverType"
                                                               (...).children[0].to_s = "linux"
                                                   (...).children[3].name = "typeName"
                                                               (...).children[0].to_s = "Gold Web Site"
                                                   (...).children[4].name = "welcomeEmailId"
                                                               (...).children[0].to_s = "b4e59e9404d02661"
                                                   (...).children[5].name = "site"
                                                               (...).children[0].name = "webSpace"
                                                                           (...).children[0].to_s = "20000"
                                                               (...).children[1].name = "bandwidth"
                                                                           (...).children[0].to_s = "20000"
                                                               (...).children[2].name = "subDomains"
                                                                           (...).children[0].to_s = "2"
                                                               (...).children[3].name = "extraFTPUsers"
                                                                           (...).children[0].to_s = "20"
                                                               (...).children[4].name = "databases"
                                                                           (...).children[0].to_s = "200"
                                                   (...).children[6].name = "email"
                                                               (...).children[0].name = "emailForwarders"
                                                                           (...).children[0].to_s = "unlimited"
                                                               (...).children[1].name = "emailResponders"
                                                                           (...).children[0].to_s = "10"
                                                               (...).children[2].name = "emailLists"
                                                                           (...).children[0].to_s = "100"
                                                               (...).children[3].name = "emailBoxes"
                                                                           (...).children[0].to_s = "2000"
                                                   (...).children[7].name = "controlPanel"
                                                               (...).children[0].name = "tool"
                                                                           (...).children[0].to_s = "builder"
                                                               (...).children[1].name = "script"
                                                                           (...).children[0].to_s = "wordpress"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "90693d2dc60019b2cd50ba6d47b0e1cc"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-91e242226c362d5127f98db8330b9e59"
  result.children[2].to_s = " \n"

Updating Web Hosting Package Types [^Back to contents]

This interface supports altering package types. You must specify a <package:type-id>, and you have the option of updating all your existing hosting packages of that type so that they are configured identically to the new settings.

All fields apart from the package type ID are optional.

Please also see the notes for creating package types

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><package:updateType>
<package:updateType><package:typeId> <package:typeName>? <package:welcomeEmailId>? <package:site>? <package:email>? <package:controlPanel>?Anything not present is unchanged
<package:typeId>updateExistingPackages?(text)See "Creating Web Hosting Packages"
updateExistingPackages1If set, this will update packages of the type
<package:typeName>(text)See "Creating Web Hosting Package Types"
<package:welcomeEmailId>(text)See "Creating Web Hosting Package Types"
<package:site><package:webSpace>? <package:bandwidth>? <package:subDomains>? <package:extraFTPUsers>? <package:databases>?Anything not present is unchanged. See "Creating Web Hosting Package Types"
<package:email><package:emailForwarders>? <package:emailResponders>? <package:emailLists>? <package:emailBoxes>?Anything not present is unchanged. See "Creating Web Hosting Package Types"
<package:controlPanel><package:tool>* <package:script>*Anything not present is unchanged. See "Creating Web Hosting Package Types"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <command>
    <update>
      <package:updateType>
        <package:typeId updateExistingPackages="1">5d62718c88ab975e</package:typeId>
        <package:typeName>Gold Web Site</package:typeName>
        <package:welcomeEmailId>61a0c220ec7debf0</package:welcomeEmailId>
        <package:site>
          <package:webSpace>20000</package:webSpace>
          <package:bandwidth>20000</package:bandwidth>
          <package:subDomains>2</package:subDomains>
          <package:extraFTPUsers>20</package:extraFTPUsers>
          <package:databases>200</package:databases>
        </package:site>
        <package:email>
          <package:emailForwarders>unlimited</package:emailForwarders>
          <package:emailResponders>10</package:emailResponders>
          <package:emailLists>100</package:emailLists>
          <package:emailBoxes>2000</package:emailBoxes>
        </package:email>
        <package:controlPanel>
          <package:tool enable="1">builder</package:tool>
          <package:tool>filemanager</package:tool>
          <package:script enable="1">wordpress</package:script>
          <package:script>cms</package:script>
        </package:controlPanel>
      </package:updateType>
    </update>
    <clTRID>4f2f905a28998300a4bb99697d2f5c43</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $package_ns => "package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$package_ns, "updateType"]);
          $w->dataElement([$package_ns, "typeId"], "5d62718c88ab975e", 'updateExistingPackages' => "1");
          $w->dataElement([$package_ns, "typeName"], "Gold Web Site");
          $w->dataElement([$package_ns, "welcomeEmailId"], "61a0c220ec7debf0");
          $w->startTag([$package_ns, "site"]);
            $w->dataElement([$package_ns, "webSpace"], "20000");
            $w->dataElement([$package_ns, "bandwidth"], "20000");
            $w->dataElement([$package_ns, "subDomains"], "2");
            $w->dataElement([$package_ns, "extraFTPUsers"], "20");
            $w->dataElement([$package_ns, "databases"], "200");
          $w->endTag();
          $w->startTag([$package_ns, "email"]);
            $w->dataElement([$package_ns, "emailForwarders"], "unlimited");
            $w->dataElement([$package_ns, "emailResponders"], "10");
            $w->dataElement([$package_ns, "emailLists"], "100");
            $w->dataElement([$package_ns, "emailBoxes"], "2000");
          $w->endTag();
          $w->startTag([$package_ns, "controlPanel"]);
            $w->dataElement([$package_ns, "tool"], "builder", 'enable' => "1");
            $w->dataElement([$package_ns, "tool"], "filemanager");
            $w->dataElement([$package_ns, "script"], "wordpress", 'enable' => "1");
            $w->dataElement([$package_ns, "script"], "cms");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "4f2f905a28998300a4bb99697d2f5c43");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $package_ns = "http://www.heartinternet.co.uk/whapi/package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($package_ns, "updateType");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($package_ns, "typeId");$c->setAttribute('updateExistingPackages', "1"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('5d62718c88ab975e'));
          $c = $doc->createElementNS($package_ns, "typeName");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('Gold Web Site'));
          $c = $doc->createElementNS($package_ns, "welcomeEmailId");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('61a0c220ec7debf0'));
          $c = $doc->createElementNS($package_ns, "site");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "webSpace");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20000'));
            $c = $doc->createElementNS($package_ns, "bandwidth");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20000'));
            $c = $doc->createElementNS($package_ns, "subDomains");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('2'));
            $c = $doc->createElementNS($package_ns, "extraFTPUsers");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('20'));
            $c = $doc->createElementNS($package_ns, "databases");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('200'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($package_ns, "email");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "emailForwarders");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('unlimited'));
            $c = $doc->createElementNS($package_ns, "emailResponders");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('10'));
            $c = $doc->createElementNS($package_ns, "emailLists");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('100'));
            $c = $doc->createElementNS($package_ns, "emailBoxes");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('2000'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($package_ns, "controlPanel");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($package_ns, "tool");$c->setAttribute('enable', "1"); 
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('builder'));
            $c = $doc->createElementNS($package_ns, "tool");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('filemanager'));
            $c = $doc->createElementNS($package_ns, "script");$c->setAttribute('enable', "1"); 
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('wordpress'));
            $c = $doc->createElementNS($package_ns, "script");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('cms'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('4f2f905a28998300a4bb99697d2f5c43'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("package", "http://www.heartinternet.co.uk/whapi/package-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('package:updateType', {})
          current.add_element('package:typeId', {'updateExistingPackages' => "1"}).add_text("5d62718c88ab975e")
          current.add_element('package:typeName', {}).add_text("Gold Web Site")
          current.add_element('package:welcomeEmailId', {}).add_text("61a0c220ec7debf0")
          current = current.add_element('package:site', {})
            current.add_element('package:webSpace', {}).add_text("20000")
            current.add_element('package:bandwidth', {}).add_text("20000")
            current.add_element('package:subDomains', {}).add_text("2")
            current.add_element('package:extraFTPUsers', {}).add_text("20")
            current.add_element('package:databases', {}).add_text("200")
          current = current.parent
          current = current.add_element('package:email', {})
            current.add_element('package:emailForwarders', {}).add_text("unlimited")
            current.add_element('package:emailResponders', {}).add_text("10")
            current.add_element('package:emailLists', {}).add_text("100")
            current.add_element('package:emailBoxes', {}).add_text("2000")
          current = current.parent
          current = current.add_element('package:controlPanel', {})
            current.add_element('package:tool', {'enable' => "1"}).add_text("builder")
            current.add_element('package:tool', {}).add_text("filemanager")
            current.add_element('package:script', {'enable' => "1"}).add_text("wordpress")
            current.add_element('package:script', {}).add_text("cms")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("4f2f905a28998300a4bb99697d2f5c43")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:package="http://www.heartinternet.co.uk/whapi/package-2.2">
  <response>
    <result code='1000'>
      <msg>Hosting package type created/updated successfully</msg>
    </result>
    <trID>
      <clTRID>4f2f905a28998300a4bb99697d2f5c43</clTRID>
      <svTRID>test-2ca6665fa261e00865b5fef3dd13e42f</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '4f2f905a28998300a4bb99697d2f5c43',
             'svTRID' => 'test-2ca6665fa261e00865b5fef3dd13e42f'
           },
          'result' => {
            'msg' => 'Hosting package type created/updated successfully',
            'code' => '1000'
             }
        },
      'xmlns:package' => 'http://www.heartinternet.co.uk/whapi/package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:package] => http://www.heartinternet.co.uk/whapi/package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Hosting package type created/updated successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 4f2f905a28998300a4bb99697d2f5c43
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-2ca6665fa261e00865b5fef3dd13e42f
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["package"] = "http://www.heartinternet.co.uk/whapi/package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Hosting package type created/updated successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "4f2f905a28998300a4bb99697d2f5c43"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-2ca6665fa261e00865b5fef3dd13e42f"
  result.children[2].to_s = " \n"

Examining Web Hosting Package Resource Usage [^Back to contents]

This allows you to see all your packages' usage of countable resources, ie. bandwidth and disc space, both of which can be run up without using the control panel at all.

This is intended to be used for automatic notifications or similar.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-package:resourceUsage>
<ext-package:resourceUsage>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <extension>
    <ext-package:resourceUsage/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">298afb622570c1e04da7b66ff55e3856</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_package_ns => "ext-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_package_ns, "resourceUsage"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "298afb622570c1e04da7b66ff55e3856");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_package_ns = "http://www.heartinternet.co.uk/whapi/ext-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_package_ns, "resourceUsage");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('298afb622570c1e04da7b66ff55e3856'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-package' => "http://www.heartinternet.co.uk/whapi/ext-package-2.2"})
    current = current.add_element('extension', {})
      current.add_element('ext-package:resourceUsage', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("298afb622570c1e04da7b66ff55e3856")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-package:lstData>
<ext-package:lstData><ext-package:resources>*
<ext-package:resources><ext-package:id> <ext-package:bandwidth> <ext-package:webSpace>
<ext-package:id>(number)
<ext-package:bandwidth>limit(number)See "Creating Web Hosting Package Types"
<ext-package:webSpace>limit(number)This field will be empty if the value is not known. See "Creating Web Hosting Package Types"
limit(number)The value "unlimited" is also allowed

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-package="http://www.heartinternet.co.uk/whapi/ext-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-package:lstData>
        <ext-package:resources>
          <ext-package:id>e55a68159ad8264b</ext-package:id>
          <ext-package:bandwidth limit='unlimited'>5000</ext-package:bandwidth>
          <ext-package:webSpace limit='100000'>22000</ext-package:webSpace>
        </ext-package:resources>
        <ext-package:resources>
          <ext-package:id>f5924ef3a7ed4b68</ext-package:id>
          <ext-package:bandwidth limit='1000'>2279</ext-package:bandwidth>
          <ext-package:webSpace limit='unlimited'>43552</ext-package:webSpace>
        </ext-package:resources>
        <ext-package:resources>
          <ext-package:id>2664fb20fe012056</ext-package:id>
          <ext-package:bandwidth limit='10000'>54344</ext-package:bandwidth>
          <ext-package:webSpace limit='100000'></ext-package:webSpace>
        </ext-package:resources>
      </ext-package:lstData>
    </resData>
    <trID>
      <clTRID>298afb622570c1e04da7b66ff55e3856</clTRID>
      <svTRID>test-9c6cbc040df7ad2b34a1908b2e368f0a</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '298afb622570c1e04da7b66ff55e3856',
             'svTRID' => 'test-9c6cbc040df7ad2b34a1908b2e368f0a'
           },
          'resData' => {
             'ext-package:lstData' => {
                   'ext-package:resources' => [
                           {
                             'ext-package:webSpace' => {
                                    'content' => '22000',
                                    'limit' => '100000'
                                  },
                             'ext-package:id' => 'e55a68159ad8264b',
                             'ext-package:bandwidth' => {
                                  'content' => '5000',
                                  'limit' => 'unlimited'
                                   }
                           },
                           {
                             'ext-package:webSpace' => {
                                    'content' => '43552',
                                    'limit' => 'unlimited'
                                  },
                             'ext-package:id' => 'f5924ef3a7ed4b68',
                             'ext-package:bandwidth' => {
                                  'content' => '2279',
                                  'limit' => '1000'
                                   }
                           },
                           {
                             'ext-package:webSpace' => {
                                    'limit' => '100000'
                                  },
                             'ext-package:id' => '2664fb20fe012056',
                             'ext-package:bandwidth' => {
                                  'content' => '54344',
                                  'limit' => '10000'
                                   }
                           }
                            ]
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-package' => 'http://www.heartinternet.co.uk/whapi/ext-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-package] => http://www.heartinternet.co.uk/whapi/ext-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-package:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-package:resources
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => e55a68159ad8264b
          )
  
      [9] => Array
          (
              [tag] => ext-package:bandwidth
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => unlimited
                  )
  
              [value] => 5000
          )
  
      [10] => Array
          (
              [tag] => ext-package:webSpace
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => 100000
                  )
  
              [value] => 22000
          )
  
      [11] => Array
          (
              [tag] => ext-package:resources
              [type] => close
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => ext-package:resources
              [type] => open
              [level] => 5
          )
  
      [13] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => f5924ef3a7ed4b68
          )
  
      [14] => Array
          (
              [tag] => ext-package:bandwidth
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => 1000
                  )
  
              [value] => 2279
          )
  
      [15] => Array
          (
              [tag] => ext-package:webSpace
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => unlimited
                  )
  
              [value] => 43552
          )
  
      [16] => Array
          (
              [tag] => ext-package:resources
              [type] => close
              [level] => 5
          )
  
      [17] => Array
          (
              [tag] => ext-package:resources
              [type] => open
              [level] => 5
          )
  
      [18] => Array
          (
              [tag] => ext-package:id
              [type] => complete
              [level] => 6
              [value] => 2664fb20fe012056
          )
  
      [19] => Array
          (
              [tag] => ext-package:bandwidth
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => 10000
                  )
  
              [value] => 54344
          )
  
      [20] => Array
          (
              [tag] => ext-package:webSpace
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [limit] => 100000
                  )
  
          )
  
      [21] => Array
          (
              [tag] => ext-package:resources
              [type] => close
              [level] => 5
          )
  
      [22] => Array
          (
              [tag] => ext-package:lstData
              [type] => close
              [level] => 4
          )
  
      [23] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [24] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [25] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 298afb622570c1e04da7b66ff55e3856
          )
  
      [26] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-9c6cbc040df7ad2b34a1908b2e368f0a
          )
  
      [27] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [28] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [29] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-package"] = "http://www.heartinternet.co.uk/whapi/ext-package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "resources"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "e55a68159ad8264b"
                                                               (...).children[1].name = "bandwidth"
                                                                           (...).attributes["limit"] = "unlimited"
                                                                           (...).children[0].to_s = "5000"
                                                               (...).children[2].name = "webSpace"
                                                                           (...).attributes["limit"] = "100000"
                                                                           (...).children[0].to_s = "22000"
                                                   (...).children[1].name = "resources"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "f5924ef3a7ed4b68"
                                                               (...).children[1].name = "bandwidth"
                                                                           (...).attributes["limit"] = "1000"
                                                                           (...).children[0].to_s = "2279"
                                                               (...).children[2].name = "webSpace"
                                                                           (...).attributes["limit"] = "unlimited"
                                                                           (...).children[0].to_s = "43552"
                                                   (...).children[2].name = "resources"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "2664fb20fe012056"
                                                               (...).children[1].name = "bandwidth"
                                                                           (...).attributes["limit"] = "10000"
                                                                           (...).children[0].to_s = "54344"
                                                               (...).children[2].name = "webSpace"
                                                                           (...).attributes["limit"] = "100000"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "298afb622570c1e04da7b66ff55e3856"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-9c6cbc040df7ad2b34a1908b2e368f0a"
  result.children[2].to_s = " \n"

SUPPORT DATABASE COMMANDS [^Back to contents]

This section provides an interface to the support database, respecting all your pre-configured limits on which sections show up.

Listing Support Database Categories [^Back to contents]

This just returns the names and IDs of the allowed support categories.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-support:list>
<ext-support:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <extension>
    <ext-support:list/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">3b44788d4d68746f6136c44636f5558d</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_support_ns => "ext-support",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_support_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "3b44788d4d68746f6136c44636f5558d");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_support_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('3b44788d4d68746f6136c44636f5558d'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-support' => "http://www.heartinternet.co.uk/whapi/ext-support-2.0"})
    current = current.add_element('extension', {})
      current.add_element('ext-support:list', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("3b44788d4d68746f6136c44636f5558d")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-support:lstData>
<ext-support:lstData><ext-support:categoryGroup>*
<ext-support:categoryGroup>name<ext-support:category>+
<ext-support:category>id(text)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-support:lstData>
        <ext-support:categoryGroup name="Problems">
          <ext-support:category id='1'>FTP problems</ext-support:category>
          <ext-support:category id='2'>MySQL problems</ext-support:category>
        </ext-support:categoryGroup>
        <ext-support:categoryGroup name="Email">
          <ext-support:category id='3'>Email configuration</ext-support:category>
        </ext-support:categoryGroup>
      </ext-support:lstData>
    </resData>
    <trID>
      <clTRID>3b44788d4d68746f6136c44636f5558d</clTRID>
      <svTRID>test-60934bb75b05415681aee670c16e6511</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '3b44788d4d68746f6136c44636f5558d',
             'svTRID' => 'test-60934bb75b05415681aee670c16e6511'
           },
          'resData' => {
             'ext-support:lstData' => {
                   'ext-support:categoryGroup' => {
                            'Problems' => {
                                'ext-support:category' => {
                                       '1' => {
                                          'content' => 'FTP problems'
                                        },
                                       '2' => {
                                          'content' => 'MySQL problems'
                                        }
                                        }
                                 },
                            'Email' => {
                                'ext-support:category' => {
                                       'content' => 'Email configuration',
                                       'id' => '3'
                                     }
                              }
                             }
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-support' => 'http://www.heartinternet.co.uk/whapi/ext-support-2.0'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-support] => http://www.heartinternet.co.uk/whapi/ext-support-2.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-support:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-support:categoryGroup
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [name] => Problems
                  )
  
          )
  
      [8] => Array
          (
              [tag] => ext-support:category
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [id] => 1
                  )
  
              [value] => FTP problems
          )
  
      [9] => Array
          (
              [tag] => ext-support:category
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [id] => 2
                  )
  
              [value] => MySQL problems
          )
  
      [10] => Array
          (
              [tag] => ext-support:categoryGroup
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => ext-support:categoryGroup
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [name] => Email
                  )
  
          )
  
      [12] => Array
          (
              [tag] => ext-support:category
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [id] => 3
                  )
  
              [value] => Email configuration
          )
  
      [13] => Array
          (
              [tag] => ext-support:categoryGroup
              [type] => close
              [level] => 5
          )
  
      [14] => Array
          (
              [tag] => ext-support:lstData
              [type] => close
              [level] => 4
          )
  
      [15] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [17] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 3b44788d4d68746f6136c44636f5558d
          )
  
      [18] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-60934bb75b05415681aee670c16e6511
          )
  
      [19] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [20] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [21] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-support"] = "http://www.heartinternet.co.uk/whapi/ext-support-2.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "categoryGroup"
                                                               (...).attributes["name"] = "Problems"
                                                               (...).children[0].name = "category"
                                                                           (...).attributes["id"] = "1"
                                                                           (...).children[0].to_s = "FTP problems"
                                                               (...).children[1].name = "category"
                                                                           (...).attributes["id"] = "2"
                                                                           (...).children[0].to_s = "MySQL problems"
                                                   (...).children[1].name = "categoryGroup"
                                                               (...).attributes["name"] = "Email"
                                                               (...).children[0].name = "category"
                                                                           (...).attributes["id"] = "3"
                                                                           (...).children[0].to_s = "Email configuration"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "3b44788d4d68746f6136c44636f5558d"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-60934bb75b05415681aee670c16e6511"
  result.children[2].to_s = " \n"

Querying the Support Database [^Back to contents]

This allows you to find support database entries by either a search term or a category ID. You'll get a list of questions and their corresponding IDs back (enough to show a list of results).

Please note that the number of results can be huge in some cases, so it's strongly recommended that you set a limit of at most 50.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-support:query>
<ext-support:query><ext-support:search>? <ext-support:categoryRef>?
<ext-support:search>limit?(text)
limit(number)Maximum number of results to return
<ext-support:categoryRef>(A category ID)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <extension>
    <ext-support:query>
      <ext-support:search limit="5">FTP</ext-support:search>
    </ext-support:query>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">12272fc312e9972b5d067a04f580cb59</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_support_ns => "ext-support",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->startTag([$ext_support_ns, "query"]);
        $w->dataElement([$ext_support_ns, "search"], "FTP", 'limit' => "5");
      $w->endTag();
      $w->dataElement([$ext_whapi_ns, "clTRID"], "12272fc312e9972b5d067a04f580cb59");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_support_ns, "query");
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_support_ns, "search");$c->setAttribute('limit', "5"); 
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('FTP'));
      $l = $l->parentNode;
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('12272fc312e9972b5d067a04f580cb59'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-support' => "http://www.heartinternet.co.uk/whapi/ext-support-2.0"})
    current = current.add_element('extension', {})
      current = current.add_element('ext-support:query', {})
        current.add_element('ext-support:search', {'limit' => "5"}).add_text("FTP")
      current = current.parent
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("12272fc312e9972b5d067a04f580cb59")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-support:lstData>
<ext-support:lstData><ext-support:question>*
<ext-support:question>id(text)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-support:lstData>
        <ext-support:question id='321'>
          FTP doesn't work in passive mode
        </ext-support:question>
      </ext-support:lstData>
    </resData>
    <trID>
      <clTRID>12272fc312e9972b5d067a04f580cb59</clTRID>
      <svTRID>test-cb286caea85af62d69dbffc4908fdfac</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '12272fc312e9972b5d067a04f580cb59',
             'svTRID' => 'test-cb286caea85af62d69dbffc4908fdfac'
           },
          'resData' => {
             'ext-support:lstData' => {
                   'ext-support:question' => {
                          'content' => '
      FTP doesn\'t work in passive mode
    ',
                          'id' => '321'
                           }
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-support' => 'http://www.heartinternet.co.uk/whapi/ext-support-2.0'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-support] => http://www.heartinternet.co.uk/whapi/ext-support-2.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-support:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-support:question
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 321
                  )
  
              [value] => 
            FTP doesn't work in passive mode
          
          )
  
      [8] => Array
          (
              [tag] => ext-support:lstData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 12272fc312e9972b5d067a04f580cb59
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-cb286caea85af62d69dbffc4908fdfac
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-support"] = "http://www.heartinternet.co.uk/whapi/ext-support-2.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "question"
                                                               (...).attributes["id"] = "321"
                                                               (...).children[0].to_s = "FTP doesn't work in passive mode\n        "
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "12272fc312e9972b5d067a04f580cb59"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-cb286caea85af62d69dbffc4908fdfac"
  result.children[2].to_s = " \n"

Getting a Support Question [^Back to contents]

This allows you to get the full question and answer text for a support database entry. Answers may be in plain text or escaped HTML.

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><support:info>
<support:info><support:id>
<support:id>(A question ID)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:support="http://www.heartinternet.co.uk/whapi/support-2.0">
  <command>
    <info>
      <support:info>
        <support:id>42</support:id>
      </support:info>
    </info>
    <clTRID>3b4326dd8dc9968f8fd7e306d38e548f</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $support_ns = "http://www.heartinternet.co.uk/whapi/support-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $support_ns => "support",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$support_ns, "info"]);
          $w->dataElement([$support_ns, "id"], "42");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "3b4326dd8dc9968f8fd7e306d38e548f");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $support_ns = "http://www.heartinternet.co.uk/whapi/support-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($support_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($support_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('42'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('3b4326dd8dc9968f8fd7e306d38e548f'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("support", "http://www.heartinternet.co.uk/whapi/support-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('support:info', {})
          current.add_element('support:id', {}).add_text("42")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("3b4326dd8dc9968f8fd7e306d38e548f")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><support:infData>
<support:infData><support:roid> <support:question> <support:answer>
<support:question>id(text)
<support:answer>type(text)
type"text/plain" or "text/html"

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:support="http://www.heartinternet.co.uk/whapi/support-2.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <support:infData>
        <support:roid>10B8A03A75515AE0-HI</support:roid>
        <support:question id='42'>
          What is the answer to life, the universe and everything?
        </support:question>
        <support:answer type='text/plain'>forty-two</support:answer>
      </support:infData>
    </resData>
    <trID>
      <clTRID>3b4326dd8dc9968f8fd7e306d38e548f</clTRID>
      <svTRID>test-87d57351572e47996ce7dd1ab180598f</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '3b4326dd8dc9968f8fd7e306d38e548f',
             'svTRID' => 'test-87d57351572e47996ce7dd1ab180598f'
           },
          'resData' => {
             'support:infData' => {
                  'support:answer' => {
                         'content' => 'forty-two',
                         'type' => 'text/plain'
                       },
                  'support:question' => {
                        'content' => '
      What is the answer to life, the universe and everything?
    ',
                        'id' => '42'
                         },
                  'support:roid' => '10B8A03A75515AE0-HI'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:support' => 'http://www.heartinternet.co.uk/whapi/support-2.0'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:support] => http://www.heartinternet.co.uk/whapi/support-2.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => support:infData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => support:roid
              [type] => complete
              [level] => 5
              [value] => 10B8A03A75515AE0-HI
          )
  
      [8] => Array
          (
              [tag] => support:question
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 42
                  )
  
              [value] => 
            What is the answer to life, the universe and everything?
          
          )
  
      [9] => Array
          (
              [tag] => support:answer
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [type] => text/plain
                  )
  
              [value] => forty-two
          )
  
      [10] => Array
          (
              [tag] => support:infData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 3b4326dd8dc9968f8fd7e306d38e548f
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-87d57351572e47996ce7dd1ab180598f
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["support"] = "http://www.heartinternet.co.uk/whapi/support-2.0"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).children[0].name = "roid"
                                                               (...).children[0].to_s = "10B8A03A75515AE0-HI"
                                                   (...).children[1].name = "question"
                                                               (...).attributes["id"] = "42"
                                                               (...).children[0].to_s = "What is the answer to life, the universe and everything?\n        "
                                                   (...).children[2].name = "answer"
                                                               (...).attributes["type"] = "text/plain"
                                                               (...).children[0].to_s = "forty-two"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "3b4326dd8dc9968f8fd7e306d38e548f"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-87d57351572e47996ce7dd1ab180598f"
  result.children[2].to_s = " \n"

Retrieving the status page data [^Back to contents]

This fetches all current status page entries (which may or may not be relevant to your customers).

planned

These are advance notification of events which are expected to occur. The effective date will be in the future at the time when the entry is added, but will be in the past by the time the entry is removed. If the date is in the past, that's not a guarantee that the event actually happened.

event

These are at-the-time notification of something unexpected or something for which we were unable to provide advance notice.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-support:statusPage>
<ext-support:statusPage>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <extension>
    <ext-support:statusPage/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">d86d575312122fa15d16717c3c870c17</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_support_ns => "ext-support",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_support_ns, "statusPage"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "d86d575312122fa15d16717c3c870c17");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_support_ns = "http://www.heartinternet.co.uk/whapi/ext-support-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_support_ns, "statusPage");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('d86d575312122fa15d16717c3c870c17'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-support' => "http://www.heartinternet.co.uk/whapi/ext-support-2.0"})
    current = current.add_element('extension', {})
      current.add_element('ext-support:statusPage', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("d86d575312122fa15d16717c3c870c17")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-support:lstData>
<ext-support:lstData><ext-support:status>*
<ext-support:status>type subject when resolution?(An HTML status message)
type"planned" or "event"
subject(A plain text subject line)
when(The date and time the entry applies to)
resolution(text)Present if the item has been resolved.

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-support="http://www.heartinternet.co.uk/whapi/ext-support-2.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-support:lstData>
        <ext-support:status type='event' subject='POP3 access' when='2000-01-01T00:00:00' resolution='01:32:44 - resolved'>
          Due to an unforseen date problem, our POP3 servers are currently
          inaccessible for APOP users. Our engineers are working to
          resolve this. We apologise for any inconvenience caused.
        </ext-support:status>
        <ext-support:status type='planned' subject='FTP service upgrade' when='2000-01-03T04:00:00'>
          We are planning to upgrade our FTP server software on 3
          January. This will involve a possible disruption of service
          for up to 5 minutes while we migrate the configuration data.
        </ext-support:status>
      </ext-support:lstData>
    </resData>
    <trID>
      <clTRID>d86d575312122fa15d16717c3c870c17</clTRID>
      <svTRID>test-165016084c4d381e0c0cb260364ae35f</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'd86d575312122fa15d16717c3c870c17',
             'svTRID' => 'test-165016084c4d381e0c0cb260364ae35f'
           },
          'resData' => {
             'ext-support:lstData' => {
                   'ext-support:status' => [
                           {
                          'when' => '2000-01-01T00:00:00',
                          'subject' => 'POP3 access',
                          'content' => '
      Due to an unforseen date problem, our POP3 servers are currently
      inaccessible for APOP users. Our engineers are working to
      resolve this. We apologise for any inconvenience caused.
    ',
                          'resolution' => '01:32:44 - resolved',
                          'type' => 'event'
                           },
                           {
                          'when' => '2000-01-03T04:00:00',
                          'subject' => 'FTP service upgrade',
                          'content' => '
      We are planning to upgrade our FTP server software on 3
      January. This will involve a possible disruption of service
      for up to 5 minutes while we migrate the configuration data.
    ',
                          'type' => 'planned'
                           }
                         ]
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-support' => 'http://www.heartinternet.co.uk/whapi/ext-support-2.0'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-support] => http://www.heartinternet.co.uk/whapi/ext-support-2.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-support:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-support:status
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [type] => event
                      [subject] => POP3 access
                      [when] => 2000-01-01T00:00:00
                      [resolution] => 01:32:44 - resolved
                  )
  
              [value] => 
            Due to an unforseen date problem, our POP3 servers are currently
            inaccessible for APOP users. Our engineers are working to
            resolve this. We apologise for any inconvenience caused.
          
          )
  
      [8] => Array
          (
              [tag] => ext-support:status
              [type] => complete
              [level] => 5
              [attributes] => Array
                  (
                      [type] => planned
                      [subject] => FTP service upgrade
                      [when] => 2000-01-03T04:00:00
                  )
  
              [value] => 
            We are planning to upgrade our FTP server software on 3
            January. This will involve a possible disruption of service
            for up to 5 minutes while we migrate the configuration data.
          
          )
  
      [9] => Array
          (
              [tag] => ext-support:lstData
              [type] => close
              [level] => 4
          )
  
      [10] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => d86d575312122fa15d16717c3c870c17
          )
  
      [13] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-165016084c4d381e0c0cb260364ae35f
          )
  
      [14] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [16] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-support"] = "http://www.heartinternet.co.uk/whapi/ext-support-2.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "status"
                                                               (...).attributes["type"] = "event"
                                                               (...).attributes["resolution"] = "01:32:44 - resolved"
                                                               (...).attributes["when"] = "2000-01-01T00:00:00"
                                                               (...).attributes["subject"] = "POP3 access"
                                                               (...).children[0].to_s = "Due to an unforseen date problem, our POP3 servers are currently\n          inaccessible for APOP users. Our engineers are working to\n          resolve this. We apologise for any inconvenience caused.\n        "
                                                   (...).children[1].name = "status"
                                                               (...).attributes["type"] = "planned"
                                                               (...).attributes["when"] = "2000-01-03T04:00:00"
                                                               (...).attributes["subject"] = "FTP service upgrade"
                                                               (...).children[0].to_s = "We are planning to upgrade our FTP server software on 3\n          January. This will involve a possible disruption of service\n          for up to 5 minutes while we migrate the configuration data.\n        "
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "d86d575312122fa15d16717c3c870c17"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-165016084c4d381e0c0cb260364ae35f"
  result.children[2].to_s = " \n"

DATABASE COMMANDS [^Back to contents]

These are commands for chargeable (ie. MS SQL Server) databases for hosting packages.

Create A Database [^Back to contents]

By providing a package ID, you are increasing that package's allowance of MS SQL databases by one. This doesn't actually set up the database, so the database name and password will need to be specified in eXtend as usual.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><database:create>
<database:create>maxCharge<database:packageID>
maxCharge(decimal)If the price is higher than this, the operation will abort
<database:packageID>(the ID of the package to link to)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <create>
      <database:create xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0" maxCharge='50.00'>
        <database:packageID>e471f85ec9c48e75</database:packageID>
      </database:create>
    </create>
    <clTRID>cfe305a5d6964041a0fc93ee1aeced67</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $database_ns => "database",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$database_ns, "create"], 'maxCharge' => "50.00");
          $w->dataElement([$database_ns, "packageID"], "e471f85ec9c48e75");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "cfe305a5d6964041a0fc93ee1aeced67");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($database_ns, "create");$c->setAttribute('maxCharge', "50.00"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($database_ns, "packageID");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('e471f85ec9c48e75'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('cfe305a5d6964041a0fc93ee1aeced67'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("database", "http://www.heartinternet.co.uk/whapi/database-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('database:create', {'maxCharge' => "50.00"})
          current.add_element('database:packageID', {}).add_text("e471f85ec9c48e75")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("cfe305a5d6964041a0fc93ee1aeced67")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><database:creData>
<database:creData><database:id>
<database:id>(text)The allocated database ID

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <database:creData xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:id>13f8419d69e92f91</database:id>
      </database:creData>
    </resData>
    <trID>
      <clTRID>cfe305a5d6964041a0fc93ee1aeced67</clTRID>
      <svTRID>test-d4d2a12837e909934f9cc67aa0e58593</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'cfe305a5d6964041a0fc93ee1aeced67',
             'svTRID' => 'test-d4d2a12837e909934f9cc67aa0e58593'
           },
          'resData' => {
             'database:creData' => {
                   'database:id' => '13f8419d69e92f91',
                   'xmlns:database' => 'http://www.heartinternet.co.uk/whapi/database-2.0'
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => database:creData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:database] => http://www.heartinternet.co.uk/whapi/database-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => database:id
              [type] => complete
              [level] => 5
              [value] => 13f8419d69e92f91
          )
  
      [8] => Array
          (
              [tag] => database:creData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => cfe305a5d6964041a0fc93ee1aeced67
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-d4d2a12837e909934f9cc67aa0e58593
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).attributes["database"] = "http://www.heartinternet.co.uk/whapi/database-2.0"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "13f8419d69e92f91"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "cfe305a5d6964041a0fc93ee1aeced67"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-d4d2a12837e909934f9cc67aa0e58593"
  result.children[2].to_s = " \n"

Delete (Cancel) a Database [^Back to contents]

Cancels a Microsoft SQL Server database allowance, removing the database if one has been set up.

You can do this as far in advance of its renewal as you want, but no pro-rata refund will be given.

What to send

Syntax

KeyAttributesContentsNotes
<command><delete>
<delete><database:delete>
<database:delete><database:id>
<database:id>(A database ID)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <delete>
      <database:delete xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:id>68567f755c1f21b4</database:id>
      </database:delete>
    </delete>
    <clTRID>2b6ecacb3275ae0ad5d1c60b4a093b72</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $database_ns => "database",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('delete');
        $w->startTag([$database_ns, "delete"]);
          $w->dataElement([$database_ns, "id"], "68567f755c1f21b4");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "2b6ecacb3275ae0ad5d1c60b4a093b72");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'delete');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($database_ns, "delete");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($database_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('68567f755c1f21b4'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('2b6ecacb3275ae0ad5d1c60b4a093b72'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("database", "http://www.heartinternet.co.uk/whapi/database-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('delete', {})
        current = current.add_element('database:delete', {})
          current.add_element('database:id', {}).add_text("68567f755c1f21b4")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("2b6ecacb3275ae0ad5d1c60b4a093b72")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>2b6ecacb3275ae0ad5d1c60b4a093b72</clTRID>
      <svTRID>test-3c9fcaab5c22092eb2629746f2e48c15</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '2b6ecacb3275ae0ad5d1c60b4a093b72',
             'svTRID' => 'test-3c9fcaab5c22092eb2629746f2e48c15'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 2b6ecacb3275ae0ad5d1c60b4a093b72
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-3c9fcaab5c22092eb2629746f2e48c15
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "2b6ecacb3275ae0ad5d1c60b4a093b72"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-3c9fcaab5c22092eb2629746f2e48c15"
  result.children[2].to_s = " \n"

List Databases [^Back to contents]

This returns a list of all your database allowances.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-database:list>
<ext-database:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-database:list xmlns:ext-database="http://www.heartinternet.co.uk/whapi/ext-database-2.0"/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">72ff6c00e38c745674277cc496e858ca</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_database_ns = "http://www.heartinternet.co.uk/whapi/ext-database-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_database_ns => "ext-database",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_database_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "72ff6c00e38c745674277cc496e858ca");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_database_ns = "http://www.heartinternet.co.uk/whapi/ext-database-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_database_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('72ff6c00e38c745674277cc496e858ca'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current.add_element('ext-database:list', {'xmlns:ext-database' => "http://www.heartinternet.co.uk/whapi/ext-database-2.0"})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("72ff6c00e38c745674277cc496e858ca")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-database:lstData>
<ext-database:lstData><ext-database:db>*
<ext-database:db><ext-database:id> <ext-database:name>?
<ext-database:id>(A database ID)
<ext-database:name>(the name of the database, if it is set up)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-database:lstData xmlns:ext-database="http://www.heartinternet.co.uk/whapi/ext-database-2.0">
        <ext-database:db>
          <ext-database:id>108cca1e6dbd4b33</ext-database:id>
          <ext-database:name>web235-example</ext-database:name>
        </ext-database:db>
      </ext-database:lstData>
    </resData>
    <trID>
      <clTRID>72ff6c00e38c745674277cc496e858ca</clTRID>
      <svTRID>test-8fb04822b8e2aae712224b6c62f39907</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '72ff6c00e38c745674277cc496e858ca',
             'svTRID' => 'test-8fb04822b8e2aae712224b6c62f39907'
           },
          'resData' => {
             'ext-database:lstData' => {
                    'ext-database:db' => {
                         'ext-database:id' => '108cca1e6dbd4b33',
                         'ext-database:name' => 'web235-example'
                          },
                    'xmlns:ext-database' => 'http://www.heartinternet.co.uk/whapi/ext-database-2.0'
                     }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-database:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-database] => http://www.heartinternet.co.uk/whapi/ext-database-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-database:db
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-database:id
              [type] => complete
              [level] => 6
              [value] => 108cca1e6dbd4b33
          )
  
      [9] => Array
          (
              [tag] => ext-database:name
              [type] => complete
              [level] => 6
              [value] => web235-example
          )
  
      [10] => Array
          (
              [tag] => ext-database:db
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => ext-database:lstData
              [type] => close
              [level] => 4
          )
  
      [12] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 72ff6c00e38c745674277cc496e858ca
          )
  
      [15] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-8fb04822b8e2aae712224b6c62f39907
          )
  
      [16] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [17] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [18] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-database"] = "http://www.heartinternet.co.uk/whapi/ext-database-2.0"
                                                   (...).children[0].name = "db"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "108cca1e6dbd4b33"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "web235-example"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "72ff6c00e38c745674277cc496e858ca"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-8fb04822b8e2aae712224b6c62f39907"
  result.children[2].to_s = " \n"

Inspect Database [^Back to contents]

This gives you some information about a Microsoft SQL Server database allowance.

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><database:info>
<database:info><database:id>
<database:id>(A database ID)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <info>
      <database:info xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:id>68567f755c1f21b4</database:id>
      </database:info>
    </info>
    <clTRID>b6bf9dc8eed5a7d08e9b7c6c765a1ed2</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $database_ns => "database",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$database_ns, "info"]);
          $w->dataElement([$database_ns, "id"], "68567f755c1f21b4");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "b6bf9dc8eed5a7d08e9b7c6c765a1ed2");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($database_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($database_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('68567f755c1f21b4'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('b6bf9dc8eed5a7d08e9b7c6c765a1ed2'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("database", "http://www.heartinternet.co.uk/whapi/database-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('database:info', {})
          current.add_element('database:id', {}).add_text("68567f755c1f21b4")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("b6bf9dc8eed5a7d08e9b7c6c765a1ed2")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><database:infData>
<database:infData><database:roid> <database:id> <database:name>? <database:exDate> <database:packageID>?
<database:roid>(text)
<database:id>(A database ID)
<database:name>(the name of the database, if it is set up)
<database:exDate>(date when it will be due for renewal)
<database:packageID>(the ID of a package this is assigned to)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <database:infData xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:roid>CF82C7E7DA4B25B5-HI</database:roid>
        <database:id>cf82c7e7da4b25b5</database:id>
        <database:name>web235-example</database:name>
        <database:exDate>2010-09-08</database:exDate>
        <database:packageID>16a4ee61c1dba92c</database:packageID>
      </database:infData>
    </resData>
    <trID>
      <clTRID>b6bf9dc8eed5a7d08e9b7c6c765a1ed2</clTRID>
      <svTRID>test-444a57d2ae7461893dce69f0ed0f78d8</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'b6bf9dc8eed5a7d08e9b7c6c765a1ed2',
             'svTRID' => 'test-444a57d2ae7461893dce69f0ed0f78d8'
           },
          'resData' => {
             'database:infData' => {
                   'database:exDate' => '2010-09-08',
                   'database:id' => 'cf82c7e7da4b25b5',
                   'database:roid' => 'CF82C7E7DA4B25B5-HI',
                   'database:packageID' => '16a4ee61c1dba92c',
                   'xmlns:database' => 'http://www.heartinternet.co.uk/whapi/database-2.0',
                   'database:name' => 'web235-example'
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => database:infData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:database] => http://www.heartinternet.co.uk/whapi/database-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => database:roid
              [type] => complete
              [level] => 5
              [value] => CF82C7E7DA4B25B5-HI
          )
  
      [8] => Array
          (
              [tag] => database:id
              [type] => complete
              [level] => 5
              [value] => cf82c7e7da4b25b5
          )
  
      [9] => Array
          (
              [tag] => database:name
              [type] => complete
              [level] => 5
              [value] => web235-example
          )
  
      [10] => Array
          (
              [tag] => database:exDate
              [type] => complete
              [level] => 5
              [value] => 2010-09-08
          )
  
      [11] => Array
          (
              [tag] => database:packageID
              [type] => complete
              [level] => 5
              [value] => 16a4ee61c1dba92c
          )
  
      [12] => Array
          (
              [tag] => database:infData
              [type] => close
              [level] => 4
          )
  
      [13] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => b6bf9dc8eed5a7d08e9b7c6c765a1ed2
          )
  
      [16] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-444a57d2ae7461893dce69f0ed0f78d8
          )
  
      [17] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [18] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [19] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).attributes["database"] = "http://www.heartinternet.co.uk/whapi/database-2.0"
                                                   (...).children[0].name = "roid"
                                                               (...).children[0].to_s = "CF82C7E7DA4B25B5-HI"
                                                   (...).children[1].name = "id"
                                                               (...).children[0].to_s = "cf82c7e7da4b25b5"
                                                   (...).children[2].name = "name"
                                                               (...).children[0].to_s = "web235-example"
                                                   (...).children[3].name = "exDate"
                                                               (...).children[0].to_s = "2010-09-08"
                                                   (...).children[4].name = "packageID"
                                                               (...).children[0].to_s = "16a4ee61c1dba92c"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "b6bf9dc8eed5a7d08e9b7c6c765a1ed2"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-444a57d2ae7461893dce69f0ed0f78d8"
  result.children[2].to_s = " \n"

Renew a Database [^Back to contents]

Renews a Microsoft SQL Server database allowance. You can only do this when it is within 30 days of renewal.

You must provide the current expiry date (you can find it via <info>), and if this doesn't match no renewal will occur.

What to send

Syntax

KeyAttributesContentsNotes
<command><renew>
<renew><database:renew>
<database:renew><database:id> <database:curExpDate>
<database:id>(A database ID)
<database:curExpDate>(The date when the database will be due for renewal)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <renew>
      <database:renew xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:id>68567f755c1f21b4</database:id>
        <database:curExpDate>2010-01-01</database:curExpDate>
      </database:renew>
    </renew>
    <clTRID>5d0b9f1c21fc09acf454f8b27038ba3b</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $database_ns => "database",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('renew');
        $w->startTag([$database_ns, "renew"]);
          $w->dataElement([$database_ns, "id"], "68567f755c1f21b4");
          $w->dataElement([$database_ns, "curExpDate"], "2010-01-01");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "5d0b9f1c21fc09acf454f8b27038ba3b");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $database_ns = "http://www.heartinternet.co.uk/whapi/database-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'renew');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($database_ns, "renew");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($database_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('68567f755c1f21b4'));
          $c = $doc->createElementNS($database_ns, "curExpDate");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('2010-01-01'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('5d0b9f1c21fc09acf454f8b27038ba3b'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("database", "http://www.heartinternet.co.uk/whapi/database-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('renew', {})
        current = current.add_element('database:renew', {})
          current.add_element('database:id', {}).add_text("68567f755c1f21b4")
          current.add_element('database:curExpDate', {}).add_text("2010-01-01")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("5d0b9f1c21fc09acf454f8b27038ba3b")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><database:renData>
<database:renData><database:id> <database:exDate>?
<database:id>(the database reference originally provided)
<database:exDate>(the new expiry date)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <database:renData xmlns:database="http://www.heartinternet.co.uk/whapi/database-2.0">
        <database:id>68567f755c1f21b4</database:id>
        <database:exDate>2010-02-01</database:exDate>
      </database:renData>
    </resData>
    <trID>
      <clTRID>5d0b9f1c21fc09acf454f8b27038ba3b</clTRID>
      <svTRID>test-9bd9cf62c44ba241da3b6843972c9ba6</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '5d0b9f1c21fc09acf454f8b27038ba3b',
             'svTRID' => 'test-9bd9cf62c44ba241da3b6843972c9ba6'
           },
          'resData' => {
             'database:renData' => {
                   'database:exDate' => '2010-02-01',
                   'database:id' => '68567f755c1f21b4',
                   'xmlns:database' => 'http://www.heartinternet.co.uk/whapi/database-2.0'
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => database:renData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:database] => http://www.heartinternet.co.uk/whapi/database-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => database:id
              [type] => complete
              [level] => 5
              [value] => 68567f755c1f21b4
          )
  
      [8] => Array
          (
              [tag] => database:exDate
              [type] => complete
              [level] => 5
              [value] => 2010-02-01
          )
  
      [9] => Array
          (
              [tag] => database:renData
              [type] => close
              [level] => 4
          )
  
      [10] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 5d0b9f1c21fc09acf454f8b27038ba3b
          )
  
      [13] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-9bd9cf62c44ba241da3b6843972c9ba6
          )
  
      [14] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [16] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "renData"
                                                   (...).attributes["database"] = "http://www.heartinternet.co.uk/whapi/database-2.0"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "68567f755c1f21b4"
                                                   (...).children[1].name = "exDate"
                                                               (...).children[0].to_s = "2010-02-01"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "5d0b9f1c21fc09acf454f8b27038ba3b"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-9bd9cf62c44ba241da3b6843972c9ba6"
  result.children[2].to_s = " \n"

MAILBOX COMMANDS [^Back to contents]

These are commands for chargeable mailboxes for hosting packages.

Types are:

Microsoft Exchange

A mailbox set up on a Microsoft Exchange server, for seamless connectivity with Microsoft Outlook. Other mailboxes can't be converted to Exchange, so you need to use the <mailbox:create> command to create one.

Premium

A mailbox with extra space (1GB). This can only be an upgrade from an existing mailbox via <mailbox:update>. You cannot upgrade from Exchange mailboxes or Premium mailboxes.

Standalone

A mailbox which is not attached to a hosting account. Normally you would create a hosting account anyway, so these are included only in the <ext-mailbox:list> and <mailbox:info> functions.

Create A Mailbox [^Back to contents]

This allows you to order a Microsoft Exchange mailbox. You need to provide an email address which does not refer to an existing mailbox.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><mailbox:create>
<mailbox:create>maxCharge<mailbox:emailAddress> <mailbox:features>?
maxCharge(decimal)If the price is higher, the operation will abort
<mailbox:emailAddress>(the email address to use)
<mailbox:type>"exchange"
<mailbox:features><mailbox:exchangeFeatures>
<mailbox:exchangeFeatures>"blackberryServices"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <create>
      <mailbox:create xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0" maxCharge='50.00'>
        <mailbox:emailAddress>kyle@glc.example.org</mailbox:emailAddress>
        <mailbox:type>exchange</mailbox:type>
        <mailbox:features>
          <mailbox:exchangeFeatures>blackberryServices</mailbox:exchangeFeatures>
        </mailbox:features>
      </mailbox:create>
    </create>
    <clTRID>58774c08dd9444807bb1327095b0de63</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $mailbox_ns => "mailbox",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$mailbox_ns, "create"], 'maxCharge' => "50.00");
          $w->dataElement([$mailbox_ns, "emailAddress"], "kyle\x40glc.example.org");
          $w->dataElement([$mailbox_ns, "type"], "exchange");
          $w->startTag([$mailbox_ns, "features"]);
            $w->dataElement([$mailbox_ns, "exchangeFeatures"], "blackberryServices");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "58774c08dd9444807bb1327095b0de63");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($mailbox_ns, "create");$c->setAttribute('maxCharge', "50.00"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($mailbox_ns, "emailAddress");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('kyle@glc.example.org'));
          $c = $doc->createElementNS($mailbox_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('exchange'));
          $c = $doc->createElementNS($mailbox_ns, "features");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($mailbox_ns, "exchangeFeatures");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('blackberryServices'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('58774c08dd9444807bb1327095b0de63'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("mailbox", "http://www.heartinternet.co.uk/whapi/mailbox-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('mailbox:create', {'maxCharge' => "50.00"})
          current.add_element('mailbox:emailAddress', {}).add_text("kyle\x40glc.example.org")
          current.add_element('mailbox:type', {}).add_text("exchange")
          current = current.add_element('mailbox:features', {})
            current.add_element('mailbox:exchangeFeatures', {}).add_text("blackberryServices")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("58774c08dd9444807bb1327095b0de63")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>58774c08dd9444807bb1327095b0de63</clTRID>
      <svTRID>test-ab34cc3052ad12f52d921518d11d8204</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '58774c08dd9444807bb1327095b0de63',
             'svTRID' => 'test-ab34cc3052ad12f52d921518d11d8204'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 58774c08dd9444807bb1327095b0de63
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-ab34cc3052ad12f52d921518d11d8204
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "58774c08dd9444807bb1327095b0de63"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-ab34cc3052ad12f52d921518d11d8204"
  result.children[2].to_s = " \n"

Update (upgrade) A Mailbox [^Back to contents]

This allows you to convert a normal (not Exchange or Premium) mailbox into a premium mailbox.

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><mailbox:update>
<mailbox:update>maxCharge<mailbox:emailAddress> <mailbox:chg>? <mailbox:add>? <mailbox:rem>?
maxCharge(See "Create")
<mailbox:emailAddress>(the email address to use)
<mailbox:chg><mailbox:type>
<mailbox:type>"premium"Only valid for non-Exchange and non-Premium to Premium
<mailbox:add><mailbox:features>
<mailbox:rem>(empty)Not implemented
<mailbox:features><mailbox:exchangeFeatures>
<mailbox:exchangeFeatures>"blackberryServices"Only valid with Exchange mailboxes

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <mailbox:update xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0" maxCharge='50.00'>
        <mailbox:emailAddress>alan@gl.example.org</mailbox:emailAddress>
        <mailbox:chg>
          <mailbox:type>premium</mailbox:type>
        </mailbox:chg>
      </mailbox:update>
    </update>
    <clTRID>e7cbc5fb10f42f2ca6d1b60eb5bc1f84</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $mailbox_ns => "mailbox",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$mailbox_ns, "update"], 'maxCharge' => "50.00");
          $w->dataElement([$mailbox_ns, "emailAddress"], "alan\x40gl.example.org");
          $w->startTag([$mailbox_ns, "chg"]);
            $w->dataElement([$mailbox_ns, "type"], "premium");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "e7cbc5fb10f42f2ca6d1b60eb5bc1f84");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($mailbox_ns, "update");$c->setAttribute('maxCharge', "50.00"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($mailbox_ns, "emailAddress");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('alan@gl.example.org'));
          $c = $doc->createElementNS($mailbox_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($mailbox_ns, "type");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('premium'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('e7cbc5fb10f42f2ca6d1b60eb5bc1f84'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("mailbox", "http://www.heartinternet.co.uk/whapi/mailbox-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('mailbox:update', {'maxCharge' => "50.00"})
          current.add_element('mailbox:emailAddress', {}).add_text("alan\x40gl.example.org")
          current = current.add_element('mailbox:chg', {})
            current.add_element('mailbox:type', {}).add_text("premium")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("e7cbc5fb10f42f2ca6d1b60eb5bc1f84")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>e7cbc5fb10f42f2ca6d1b60eb5bc1f84</clTRID>
      <svTRID>test-5bf59ec8e38e82ee3dcd2bee28c62c08</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'e7cbc5fb10f42f2ca6d1b60eb5bc1f84',
             'svTRID' => 'test-5bf59ec8e38e82ee3dcd2bee28c62c08'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => e7cbc5fb10f42f2ca6d1b60eb5bc1f84
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-5bf59ec8e38e82ee3dcd2bee28c62c08
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "e7cbc5fb10f42f2ca6d1b60eb5bc1f84"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-5bf59ec8e38e82ee3dcd2bee28c62c08"
  result.children[2].to_s = " \n"

Delete (Cancel) a Mailbox [^Back to contents]

This will remove a Microsoft Exchange mailbox.

You can do this as far in advance of its renewal as you want, but no pro-rata refund will be given.

What to send

Syntax

KeyAttributesContentsNotes
<command><delete>
<delete><mailbox:delete>
<mailbox:delete>type<mailbox:emailAddress>
type"exchange"
<mailbox:emailAddress>(the email address of the mailbox)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <delete>
      <mailbox:delete xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0" type='exchange'>
        <mailbox:emailAddress>hal@glc.example.org</mailbox:emailAddress>
      </mailbox:delete>
    </delete>
    <clTRID>6f31b758f9e6b8bdc247b8b244966a1a</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $mailbox_ns => "mailbox",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('delete');
        $w->startTag([$mailbox_ns, "delete"], 'type' => "exchange");
          $w->dataElement([$mailbox_ns, "emailAddress"], "hal\x40glc.example.org");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "6f31b758f9e6b8bdc247b8b244966a1a");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'delete');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($mailbox_ns, "delete");$c->setAttribute('type', "exchange"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($mailbox_ns, "emailAddress");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('hal@glc.example.org'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('6f31b758f9e6b8bdc247b8b244966a1a'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("mailbox", "http://www.heartinternet.co.uk/whapi/mailbox-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('delete', {})
        current = current.add_element('mailbox:delete', {'type' => "exchange"})
          current.add_element('mailbox:emailAddress', {}).add_text("hal\x40glc.example.org")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("6f31b758f9e6b8bdc247b8b244966a1a")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <trID>
      <clTRID>6f31b758f9e6b8bdc247b8b244966a1a</clTRID>
      <svTRID>test-5598988cb0dd7397521a0bde795f76cf</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '6f31b758f9e6b8bdc247b8b244966a1a',
             'svTRID' => 'test-5598988cb0dd7397521a0bde795f76cf'
           },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 6f31b758f9e6b8bdc247b8b244966a1a
          )
  
      [7] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-5598988cb0dd7397521a0bde795f76cf
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [10] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "6f31b758f9e6b8bdc247b8b244966a1a"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-5598988cb0dd7397521a0bde795f76cf"
  result.children[2].to_s = " \n"

List Mailboxes [^Back to contents]

This returns a list of all paid-for mailboxes (all those not included in hosting packages).

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-mailbox:list>
<ext-mailbox:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-mailbox:list xmlns:ext-mailbox="http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0"/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">d98146fa2c922b1471645314b30b163d</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_mailbox_ns = "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_mailbox_ns => "ext-mailbox",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_mailbox_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "d98146fa2c922b1471645314b30b163d");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_mailbox_ns = "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_mailbox_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('d98146fa2c922b1471645314b30b163d'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current.add_element('ext-mailbox:list', {'xmlns:ext-mailbox' => "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0"})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("d98146fa2c922b1471645314b30b163d")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-mailbox:lstData>
<ext-mailbox:lstData><ext-mailbox:mailbox>*
<ext-mailbox:mailbox><ext-mailbox:emailAddress> <ext-mailbox:type> <ext-mailbox:features>?
<ext-mailbox:type>"exchange", "standalone" or "premium"
<ext-mailbox:emailAddress>(the email address of the mailbox)
<ext-mailbox:features><ext-mailbox:exchangeFeatures>
<ext-mailbox:exchangeFeatures>"blackberryServices"

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-mailbox:lstData xmlns:ext-mailbox="http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0">
        <ext-mailbox:mailbox>
          <ext-mailbox:emailAddress>guy@glc.example.org</ext-mailbox:emailAddress>
          <ext-mailbox:type>standalone</ext-mailbox:type>
          <ext-mailbox:features>
            <ext-mailbox:exchangeFeatures>blackberryServices</ext-mailbox:exchangeFeatures>
          </ext-mailbox:features>
        </ext-mailbox:mailbox>
        <ext-mailbox:mailbox>
          <ext-mailbox:emailAddress>john@glc.example.org</ext-mailbox:emailAddress>
          <ext-mailbox:type>standalone</ext-mailbox:type>
        </ext-mailbox:mailbox>
      </ext-mailbox:lstData>
    </resData>
    <trID>
      <clTRID>d98146fa2c922b1471645314b30b163d</clTRID>
      <svTRID>test-e35594badee3ff877743a2d519dc1147</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'd98146fa2c922b1471645314b30b163d',
             'svTRID' => 'test-e35594badee3ff877743a2d519dc1147'
           },
          'resData' => {
             'ext-mailbox:lstData' => {
                   'xmlns:ext-mailbox' => 'http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0',
                   'ext-mailbox:mailbox' => [
                            {
                           'ext-mailbox:type' => 'standalone',
                           'ext-mailbox:features' => {
                                  'ext-mailbox:exchangeFeatures' => 'blackberryServices'
                                   },
                           'ext-mailbox:emailAddress' => 'guy@glc.example.org'
                            },
                            {
                           'ext-mailbox:type' => 'standalone',
                           'ext-mailbox:emailAddress' => 'john@glc.example.org'
                            }
                          ]
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-mailbox:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-mailbox] => http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-mailbox:mailbox
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-mailbox:emailAddress
              [type] => complete
              [level] => 6
              [value] => guy@glc.example.org
          )
  
      [9] => Array
          (
              [tag] => ext-mailbox:type
              [type] => complete
              [level] => 6
              [value] => standalone
          )
  
      [10] => Array
          (
              [tag] => ext-mailbox:features
              [type] => open
              [level] => 6
          )
  
      [11] => Array
          (
              [tag] => ext-mailbox:exchangeFeatures
              [type] => complete
              [level] => 7
              [value] => blackberryServices
          )
  
      [12] => Array
          (
              [tag] => ext-mailbox:features
              [type] => close
              [level] => 6
          )
  
      [13] => Array
          (
              [tag] => ext-mailbox:mailbox
              [type] => close
              [level] => 5
          )
  
      [14] => Array
          (
              [tag] => ext-mailbox:mailbox
              [type] => open
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => ext-mailbox:emailAddress
              [type] => complete
              [level] => 6
              [value] => john@glc.example.org
          )
  
      [16] => Array
          (
              [tag] => ext-mailbox:type
              [type] => complete
              [level] => 6
              [value] => standalone
          )
  
      [17] => Array
          (
              [tag] => ext-mailbox:mailbox
              [type] => close
              [level] => 5
          )
  
      [18] => Array
          (
              [tag] => ext-mailbox:lstData
              [type] => close
              [level] => 4
          )
  
      [19] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [20] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [21] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => d98146fa2c922b1471645314b30b163d
          )
  
      [22] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-e35594badee3ff877743a2d519dc1147
          )
  
      [23] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [24] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [25] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-mailbox"] = "http://www.heartinternet.co.uk/whapi/ext-mailbox-2.0"
                                                   (...).children[0].name = "mailbox"
                                                               (...).children[0].name = "emailAddress"
                                                                           (...).children[0].to_s = "guy@glc.example.org"
                                                               (...).children[1].name = "type"
                                                                           (...).children[0].to_s = "standalone"
                                                               (...).children[2].name = "features"
                                                                           (...).children[0].name = "exchangeFeatures"
                                                                                       (...).children[0].to_s = "blackberryServices"
                                                   (...).children[1].name = "mailbox"
                                                               (...).children[0].name = "emailAddress"
                                                                           (...).children[0].to_s = "john@glc.example.org"
                                                               (...).children[1].name = "type"
                                                                           (...).children[0].to_s = "standalone"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "d98146fa2c922b1471645314b30b163d"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-e35594badee3ff877743a2d519dc1147"
  result.children[2].to_s = " \n"

Inspect Mailbox [^Back to contents]

This returns some information about an exchange, standalone or premium mailbox

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><mailbox:info>
<mailbox:info><mailbox:emailAddress>
<mailbox:emailAddress>(the email address of the mailbox)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <info>
      <mailbox:info xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0">
        <mailbox:emailAddress>guy@glc.example.org</mailbox:emailAddress>
      </mailbox:info>
    </info>
    <clTRID>0171ac186b80972ee89d62e70e7b2af3</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $mailbox_ns => "mailbox",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$mailbox_ns, "info"]);
          $w->dataElement([$mailbox_ns, "emailAddress"], "guy\x40glc.example.org");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "0171ac186b80972ee89d62e70e7b2af3");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($mailbox_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($mailbox_ns, "emailAddress");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('guy@glc.example.org'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('0171ac186b80972ee89d62e70e7b2af3'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("mailbox", "http://www.heartinternet.co.uk/whapi/mailbox-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('mailbox:info', {})
          current.add_element('mailbox:emailAddress', {}).add_text("guy\x40glc.example.org")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("0171ac186b80972ee89d62e70e7b2af3")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><mailbox:infData>
<mailbox:infData><mailbox:mailbox> <mailbox:roid> <mailbox:exDate> <mailbox:usage>?
<mailbox:mailbox>type<mailbox:emailAddress>
type"exchange", "standalone" or "premium"
<mailbox:emailAddress>(the email address of the mailbox)
<mailbox:roid>(text)
<mailbox:exDate>(The date when the mailbox will be due for renewal)
<mailbox:usage>(The number of bytes of the mailbox size, approximately)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <mailbox:infData xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0">
        <mailbox:mailbox type='exchange'>
          <mailbox:emailAddress>guy@glc.example.org</mailbox:emailAddress>
        </mailbox:mailbox>
        <mailbox:roid>13240AC0259E110F-HI</mailbox:roid>
        <mailbox:exDate>2011-01-01</mailbox:exDate>
        <mailbox:usage>1765376</mailbox:usage>
      </mailbox:infData>
    </resData>
    <trID>
      <clTRID>0171ac186b80972ee89d62e70e7b2af3</clTRID>
      <svTRID>test-81c6bd6ed146f1597c8471f37b7e78a7</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '0171ac186b80972ee89d62e70e7b2af3',
             'svTRID' => 'test-81c6bd6ed146f1597c8471f37b7e78a7'
           },
          'resData' => {
             'mailbox:infData' => {
                  'xmlns:mailbox' => 'http://www.heartinternet.co.uk/whapi/mailbox-2.0',
                  'mailbox:roid' => '13240AC0259E110F-HI',
                  'mailbox:usage' => '1765376',
                  'mailbox:mailbox' => {
                          'mailbox:emailAddress' => 'guy@glc.example.org',
                          'type' => 'exchange'
                        },
                  'mailbox:exDate' => '2011-01-01'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => mailbox:infData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:mailbox] => http://www.heartinternet.co.uk/whapi/mailbox-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => mailbox:mailbox
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [type] => exchange
                  )
  
          )
  
      [8] => Array
          (
              [tag] => mailbox:emailAddress
              [type] => complete
              [level] => 6
              [value] => guy@glc.example.org
          )
  
      [9] => Array
          (
              [tag] => mailbox:mailbox
              [type] => close
              [level] => 5
          )
  
      [10] => Array
          (
              [tag] => mailbox:roid
              [type] => complete
              [level] => 5
              [value] => 13240AC0259E110F-HI
          )
  
      [11] => Array
          (
              [tag] => mailbox:exDate
              [type] => complete
              [level] => 5
              [value] => 2011-01-01
          )
  
      [12] => Array
          (
              [tag] => mailbox:usage
              [type] => complete
              [level] => 5
              [value] => 1765376
          )
  
      [13] => Array
          (
              [tag] => mailbox:infData
              [type] => close
              [level] => 4
          )
  
      [14] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 0171ac186b80972ee89d62e70e7b2af3
          )
  
      [17] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-81c6bd6ed146f1597c8471f37b7e78a7
          )
  
      [18] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [19] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [20] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).attributes["mailbox"] = "http://www.heartinternet.co.uk/whapi/mailbox-2.0"
                                                   (...).children[0].name = "mailbox"
                                                               (...).attributes["type"] = "exchange"
                                                               (...).children[0].name = "emailAddress"
                                                                           (...).children[0].to_s = "guy@glc.example.org"
                                                   (...).children[1].name = "roid"
                                                               (...).children[0].to_s = "13240AC0259E110F-HI"
                                                   (...).children[2].name = "exDate"
                                                               (...).children[0].to_s = "2011-01-01"
                                                   (...).children[3].name = "usage"
                                                               (...).children[0].to_s = "1765376"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "0171ac186b80972ee89d62e70e7b2af3"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-81c6bd6ed146f1597c8471f37b7e78a7"
  result.children[2].to_s = " \n"

Renew a Mailbox [^Back to contents]

Renews a Premium or Exchange mailbox. You can only do this when it is within 30 days of renewal.

You must provide the current expiry date (you can find it via <info>), and if this doesn't match no renewal will occur.

What to send

Syntax

KeyAttributesContentsNotes
<command><renew>
<renew><mailbox:renew>
<mailbox:renew><mailbox:emailAddress> <mailbox:curExpDate>
<mailbox:emailAddress>(The email address of the mailbox to renew)
<mailbox:curExpDate>(The date when the mailbox will be due for renewal)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <renew>
      <mailbox:renew xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0">
        <mailbox:emailAddress>hal@glc.example.org</mailbox:emailAddress>
        <mailbox:curExpDate>2010-01-01</mailbox:curExpDate>
      </mailbox:renew>
    </renew>
    <clTRID>3b558c9f71646076e82f25d55c6401c7</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $mailbox_ns => "mailbox",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('renew');
        $w->startTag([$mailbox_ns, "renew"]);
          $w->dataElement([$mailbox_ns, "emailAddress"], "hal\x40glc.example.org");
          $w->dataElement([$mailbox_ns, "curExpDate"], "2010-01-01");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "3b558c9f71646076e82f25d55c6401c7");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $mailbox_ns = "http://www.heartinternet.co.uk/whapi/mailbox-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'renew');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($mailbox_ns, "renew");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($mailbox_ns, "emailAddress");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('hal@glc.example.org'));
          $c = $doc->createElementNS($mailbox_ns, "curExpDate");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('2010-01-01'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('3b558c9f71646076e82f25d55c6401c7'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("mailbox", "http://www.heartinternet.co.uk/whapi/mailbox-2.0")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('renew', {})
        current = current.add_element('mailbox:renew', {})
          current.add_element('mailbox:emailAddress', {}).add_text("hal\x40glc.example.org")
          current.add_element('mailbox:curExpDate', {}).add_text("2010-01-01")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("3b558c9f71646076e82f25d55c6401c7")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><mailbox:renData>
<mailbox:renData><mailbox:emailAddress> <mailbox:exDate>?
<mailbox:emailAddress>(the email address originally provided)
<mailbox:exDate>(the new expiry date)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <mailbox:renData xmlns:mailbox="http://www.heartinternet.co.uk/whapi/mailbox-2.0">
        <mailbox:emailAddress>hal@glc.example.org</mailbox:emailAddress>
        <mailbox:exDate>2010-02-01</mailbox:exDate>
      </mailbox:renData>
    </resData>
    <trID>
      <clTRID>3b558c9f71646076e82f25d55c6401c7</clTRID>
      <svTRID>test-c9d231978b2cb9d95706813067132449</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '3b558c9f71646076e82f25d55c6401c7',
             'svTRID' => 'test-c9d231978b2cb9d95706813067132449'
           },
          'resData' => {
             'mailbox:renData' => {
                  'xmlns:mailbox' => 'http://www.heartinternet.co.uk/whapi/mailbox-2.0',
                  'mailbox:emailAddress' => 'hal@glc.example.org',
                  'mailbox:exDate' => '2010-02-01'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => mailbox:renData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:mailbox] => http://www.heartinternet.co.uk/whapi/mailbox-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => mailbox:emailAddress
              [type] => complete
              [level] => 5
              [value] => hal@glc.example.org
          )
  
      [8] => Array
          (
              [tag] => mailbox:exDate
              [type] => complete
              [level] => 5
              [value] => 2010-02-01
          )
  
      [9] => Array
          (
              [tag] => mailbox:renData
              [type] => close
              [level] => 4
          )
  
      [10] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 3b558c9f71646076e82f25d55c6401c7
          )
  
      [13] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-c9d231978b2cb9d95706813067132449
          )
  
      [14] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [16] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "renData"
                                                   (...).attributes["mailbox"] = "http://www.heartinternet.co.uk/whapi/mailbox-2.0"
                                                   (...).children[0].name = "emailAddress"
                                                               (...).children[0].to_s = "hal@glc.example.org"
                                                   (...).children[1].name = "exDate"
                                                               (...).children[0].to_s = "2010-02-01"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "3b558c9f71646076e82f25d55c6401c7"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-c9d231978b2cb9d95706813067132449"
  result.children[2].to_s = " \n"

SERVER COMMANDS [^Back to contents]

These are commands for pre-loading VPS or dedicated servers into your basket, for you to later purchase manually.

Prepare a Dedicated Server Order [^Back to contents]

This will place the dedicated server details into your prebasket. The servers available for this are a reasonable subset of those available through our web site.

For the period, you can only select periods for which we have products, ie. 1 month or 1 year (or 12 months).

In return this will give you a unique value. This same value will be tagged on your order so that you can find the ID later. See "Examining old dedicated server orders".

To complete the order, you will need to visit https://customer.heartinternet.co.uk/manage/pre-basket-ds.cgi

Operating system options are:

linux

CentOS 5 (the community counterpart of RHEL 5)

windows

Windows Server 2008 Web Edition

windows_se

Windows Server 2008 Standard Edition

Server type options are:

2c

Dual core dedicated server.

4c

Quad core dedicated server. This is our high-performance/high-specification option.

Possible features are:

cpanel

This is a popular simplified administration interface, and applies only on Linux servers.

backup

This allocates some space for the server on our backup service. Only 10GB and 100GB increments are supported.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><server:create>
<server:create>op<server:purchaseMechanism> <server:specification> <server:features>? <server:period>
op"request"
<server:purchaseMechanism>"basket"
<server:specification><server:os> <server:role>
<server:os>"windows", "windows_se" or "linux"
<server:role>"2c", "4c" or "4c_bd"
<server:features><server:cpanel>? <server:backup>?
<server:cpanel>(empty)
<server:backup>"10" or "100"
<server:period>unit1 to 99
unit"y" or "m"Years or months

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <create>
      <server:create xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2" op="request">
        <server:purchaseMechanism>basket</server:purchaseMechanism>
        <server:specification>
          <server:os>linux</server:os>
          <server:role>4c</server:role>
        </server:specification>
        <server:features>
          <server:cpanel/>
          <server:backup>10</server:backup>
        </server:features>
        <server:period unit="y">1</server:period>
      </server:create>
    </create>
    <clTRID>2cba8269240823630f3340530a9ceff2</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$server_ns, "create"], 'op' => "request");
          $w->dataElement([$server_ns, "purchaseMechanism"], "basket");
          $w->startTag([$server_ns, "specification"]);
            $w->dataElement([$server_ns, "os"], "linux");
            $w->dataElement([$server_ns, "role"], "4c");
          $w->endTag();
          $w->startTag([$server_ns, "features"]);
            $w->emptyTag([$server_ns, "cpanel"]);
            $w->dataElement([$server_ns, "backup"], "10");
          $w->endTag();
          $w->dataElement([$server_ns, "period"], "1", 'unit' => "y");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "2cba8269240823630f3340530a9ceff2");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "create");$c->setAttribute('op', "request"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "purchaseMechanism");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('basket'));
          $c = $doc->createElementNS($server_ns, "specification");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "os");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('linux'));
            $c = $doc->createElementNS($server_ns, "role");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('4c'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($server_ns, "features");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "cpanel");
            $l->appendChild($c);
            $c = $doc->createElementNS($server_ns, "backup");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('10'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($server_ns, "period");$c->setAttribute('unit', "y"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('1'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('2cba8269240823630f3340530a9ceff2'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('server:create', {'op' => "request"})
          current.add_element('server:purchaseMechanism', {}).add_text("basket")
          current = current.add_element('server:specification', {})
            current.add_element('server:os', {}).add_text("linux")
            current.add_element('server:role', {}).add_text("4c")
          current = current.parent
          current = current.add_element('server:features', {})
            current.add_element('server:cpanel', {})
            current.add_element('server:backup', {}).add_text("10")
          current = current.parent
          current.add_element('server:period', {'unit' => "y"}).add_text("1")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("2cba8269240823630f3340530a9ceff2")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:creData>
<server:creData><server:preBasket>*
<server:preBasket>(text)A basket code

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1001'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:creData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:preBasket>pre-basket-ds:29</server:preBasket>
        <server:preBasket>pre-basket-cpanel:3</server:preBasket>
        <server:preBasket>pre-basket-backup:12</server:preBasket>
      </server:creData>
    </resData>
    <trID>
      <clTRID>2cba8269240823630f3340530a9ceff2</clTRID>
      <svTRID>test-caaff8019564bb11387fb77268279548</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '2cba8269240823630f3340530a9ceff2',
             'svTRID' => 'test-caaff8019564bb11387fb77268279548'
           },
          'resData' => {
             'server:creData' => {
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2',
                    'server:preBasket' => [
                          'pre-basket-ds:29',
                          'pre-basket-cpanel:3',
                          'pre-basket-backup:12'
                        ]
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1001'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1001
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:creData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-ds:29
          )
  
      [8] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-cpanel:3
          )
  
      [9] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-backup:12
          )
  
      [10] => Array
          (
              [tag] => server:creData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 2cba8269240823630f3340530a9ceff2
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-caaff8019564bb11387fb77268279548
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1001"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-ds:29"
                                                   (...).children[1].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-cpanel:3"
                                                   (...).children[2].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-backup:12"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "2cba8269240823630f3340530a9ceff2"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-caaff8019564bb11387fb77268279548"
  result.children[2].to_s = " \n"

Prepare a VPS Order [^Back to contents]

This will place the VPS details into your prebasket. A server can be configured by specifying its hardware specification preset code, OS and addon (cPanel or Plesk).

The preset codes relate to the available VPS product streams within the control panel. Configurations incompatible with existing VPS product streams will be rejected.

For the period, you can only select periods for which we have products, ie. 1 month or 1 year (or 12 months).

In return this will give you a unique value. This same value will be tagged on your order so that you can find the ID later. See "Examining old server orders".

To complete the order, you will need to visit https://customer.heartinternet.co.uk/manage/pre-basket-vps.cgi

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><server:create>
<server:create>op<server:purchaseMechanism> <server:specification> <server:features>? <server:period>
op"request"
<server:purchaseMechanism>"basket"
<server:specification><server:os> <server:addon>? <server:role> <server:preset>?
<server:os>"centos6", "centos7", "ubuntu_lts_1204", "ubuntu_lts_1404", "debian_7_wheezy", "fedora21", "suse", "netbsd_512", "freebsd_10_1", "windows2012", "windows_se_64" or "windows_we_64"
<server:addon>"cpanel", "plesk10", "plesk30", "plesk100", "plesk_ul", "plesk10_power_pack", "plesk30_power_pack", "plesk100_power_pack", "plesk_ul_power_pack"Different Plesk products are for numbers of sites
<server:role>"vps"
<server:preset>"vps2015-base-hdd", "vps2015-base-ssd", "vps2015-baseplus-hdd", "vps2015-baseplus-ssd", "vps2015-plus-hdd", "vps2015-plus-ssd", "vps2015-power-hdd", "vps2015-power-ssd", "vps2015-premium-hdd", "vps2015-premium-ssd", "vps2015-pro-hdd" or "vps2015-pro-ssd"Relates to new VPS products.Overrides other hardware specifications
<server:features><server:backup>?
<server:backup>10 to 500GB
<server:period>unit1 to 99
unit"y" or "m"Years or months

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <create>
      <server:create xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2" op="request">
        <server:purchaseMechanism>basket</server:purchaseMechanism>
        <server:specification>
          <server:os>centos6</server:os>
          <server:addon>plesk10</server:addon>
          <server:role>vps</server:role>
          <server:preset>vps2015-pro-hdd</server:preset>
        </server:specification>
        <server:features>
          <server:backup>10</server:backup>
        </server:features>
        <server:period unit="y">1</server:period>
      </server:create>
    </create>
    <clTRID>8f66695c66b75301f7669eb8b57f6877</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$server_ns, "create"], 'op' => "request");
          $w->dataElement([$server_ns, "purchaseMechanism"], "basket");
          $w->startTag([$server_ns, "specification"]);
            $w->dataElement([$server_ns, "os"], "centos6");
            $w->dataElement([$server_ns, "addon"], "plesk10");
            $w->dataElement([$server_ns, "role"], "vps");
            $w->dataElement([$server_ns, "preset"], "vps2015-pro-hdd");
          $w->endTag();
          $w->startTag([$server_ns, "features"]);
            $w->dataElement([$server_ns, "backup"], "10");
          $w->endTag();
          $w->dataElement([$server_ns, "period"], "1", 'unit' => "y");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "8f66695c66b75301f7669eb8b57f6877");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "create");$c->setAttribute('op', "request"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "purchaseMechanism");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('basket'));
          $c = $doc->createElementNS($server_ns, "specification");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "os");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('centos6'));
            $c = $doc->createElementNS($server_ns, "addon");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('plesk10'));
            $c = $doc->createElementNS($server_ns, "role");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('vps'));
            $c = $doc->createElementNS($server_ns, "preset");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('vps2015-pro-hdd'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($server_ns, "features");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "backup");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('10'));
          $l = $l->parentNode;
          $c = $doc->createElementNS($server_ns, "period");$c->setAttribute('unit', "y"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('1'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('8f66695c66b75301f7669eb8b57f6877'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('server:create', {'op' => "request"})
          current.add_element('server:purchaseMechanism', {}).add_text("basket")
          current = current.add_element('server:specification', {})
            current.add_element('server:os', {}).add_text("centos6")
            current.add_element('server:addon', {}).add_text("plesk10")
            current.add_element('server:role', {}).add_text("vps")
            current.add_element('server:preset', {}).add_text("vps2015-pro-hdd")
          current = current.parent
          current = current.add_element('server:features', {})
            current.add_element('server:backup', {}).add_text("10")
          current = current.parent
          current.add_element('server:period', {'unit' => "y"}).add_text("1")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("8f66695c66b75301f7669eb8b57f6877")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:creData>
<server:creData><server:preBasket>*
<server:preBasket>(text)A basket code

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1001'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:creData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:preBasket>pre-basket-ds:29</server:preBasket>
        <server:preBasket>pre-basket-cpanel:3</server:preBasket>
        <server:preBasket>pre-basket-backup:12</server:preBasket>
      </server:creData>
    </resData>
    <trID>
      <clTRID>8f66695c66b75301f7669eb8b57f6877</clTRID>
      <svTRID>test-2627fabf26ffc9eeecf39a50dd59a802</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '8f66695c66b75301f7669eb8b57f6877',
             'svTRID' => 'test-2627fabf26ffc9eeecf39a50dd59a802'
           },
          'resData' => {
             'server:creData' => {
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2',
                    'server:preBasket' => [
                          'pre-basket-ds:29',
                          'pre-basket-cpanel:3',
                          'pre-basket-backup:12'
                        ]
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1001'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1001
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:creData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-ds:29
          )
  
      [8] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-cpanel:3
          )
  
      [9] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-backup:12
          )
  
      [10] => Array
          (
              [tag] => server:creData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 8f66695c66b75301f7669eb8b57f6877
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-2627fabf26ffc9eeecf39a50dd59a802
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1001"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-ds:29"
                                                   (...).children[1].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-cpanel:3"
                                                   (...).children[2].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-backup:12"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "8f66695c66b75301f7669eb8b57f6877"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-2627fabf26ffc9eeecf39a50dd59a802"
  result.children[2].to_s = " \n"

Check Existing Server Order [^Back to contents]

This allows you to check the status of a previous order and find the server ID that was created.

When an order is placed through the API it goes into your prebasket, waiting for payment. This function will return the new server ID if the server order has been completed (i.e. checked out of prebasket and paid for).

You should pass the existing prebasket identifier to this function and you will get the ID of the item back. IDs are unique within their own category (no two VPS will have the same ID, but a VPS may have the same ID as a DS).

At this time, only the server (pre-basket-ds or prebasket-vps) prebasket identifier is supported.

If the server has not yet been set up, you will get an error.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><server:create>
<server:create>op<server:preBasket>
op"query"An indication that you want to check on an order
<server:preBasket>(text)A pre-basket identifier

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <create>
      <server:create xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2" op="query">
        <server:preBasket>pre-basket-ds:92</server:preBasket>
      </server:create>
    </create>
    <clTRID>f08be7a9be1afd1ed22e92f8de1087bb</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$server_ns, "create"], 'op' => "query");
          $w->dataElement([$server_ns, "preBasket"], "pre-basket-ds:92");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "f08be7a9be1afd1ed22e92f8de1087bb");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "create");$c->setAttribute('op', "query"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "preBasket");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('pre-basket-ds:92'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('f08be7a9be1afd1ed22e92f8de1087bb'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('server:create', {'op' => "query"})
          current.add_element('server:preBasket', {}).add_text("pre-basket-ds:92")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("f08be7a9be1afd1ed22e92f8de1087bb")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:creData>
<server:creData><server:id>
<server:id>(The server ID)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:creData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>c155fe2489529d86</server:id>
      </server:creData>
    </resData>
    <trID>
      <clTRID>f08be7a9be1afd1ed22e92f8de1087bb</clTRID>
      <svTRID>test-b99331cdfbae484f81170368e4b7145a</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'f08be7a9be1afd1ed22e92f8de1087bb',
             'svTRID' => 'test-b99331cdfbae484f81170368e4b7145a'
           },
          'resData' => {
             'server:creData' => {
                    'server:id' => 'c155fe2489529d86',
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:creData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:id
              [type] => complete
              [level] => 5
              [value] => c155fe2489529d86
          )
  
      [8] => Array
          (
              [tag] => server:creData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => f08be7a9be1afd1ed22e92f8de1087bb
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-b99331cdfbae484f81170368e4b7145a
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "c155fe2489529d86"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "f08be7a9be1afd1ed22e92f8de1087bb"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-b99331cdfbae484f81170368e4b7145a"
  result.children[2].to_s = " \n"

List Servers [^Back to contents]

This returns a list of all your VPS or dedicated servers.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-server:list>
<ext-server:list><server:type>
<server:type>"ds" or "vps"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-server:list xmlns:ext-server="http://www.heartinternet.co.uk/whapi/ext-server-2.2">
      <ext-server:type>ds</ext-server:type>
    </ext-server:list>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">c4a1558781ba3382f04294278acf2f80</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_server_ns = "http://www.heartinternet.co.uk/whapi/ext-server-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_server_ns => "ext-server",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->startTag([$ext_server_ns, "list"]);
        $w->dataElement([$ext_server_ns, "type"], "ds");
      $w->endTag();
      $w->dataElement([$ext_whapi_ns, "clTRID"], "c4a1558781ba3382f04294278acf2f80");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_server_ns = "http://www.heartinternet.co.uk/whapi/ext-server-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_server_ns, "list");
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_server_ns, "type");
        $l->appendChild($c);
        $c->appendChild($doc->createTextNode('ds'));
      $l = $l->parentNode;
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('c4a1558781ba3382f04294278acf2f80'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current = current.add_element('ext-server:list', {'xmlns:ext-server' => "http://www.heartinternet.co.uk/whapi/ext-server-2.2"})
        current.add_element('ext-server:type', {}).add_text("ds")
      current = current.parent
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("c4a1558781ba3382f04294278acf2f80")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-server:lstData>
<ext-server:lstData><ext-server:server>*
<ext-server:server><ext-server:id> <ext-server:name> <ext-server:allocated>?
<ext-server:id>(The server ID)
<ext-server:name>(The server name)
<ext-server:allocated>(empty)Whether the server has been allocated yet

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-server:lstData xmlns:ext-server="http://www.heartinternet.co.uk/whapi/ext-server-2.2">
        <ext-server:server>
          <ext-server:id>c155fe2489529d86</ext-server:id>
          <ext-server:name>ds-324121.ds-10.com</ext-server:name>
          <ext-server:allocated/>
        </ext-server:server>
        <ext-server:server>
          <ext-server:id>243020a6307c7d71</ext-server:id>
          <ext-server:name>ds-432453.ds-10.com</ext-server:name>
        </ext-server:server>
      </ext-server:lstData>
    </resData>
    <trID>
      <clTRID>c4a1558781ba3382f04294278acf2f80</clTRID>
      <svTRID>test-dc44985e456accb8a3df31860c388ae3</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'c4a1558781ba3382f04294278acf2f80',
             'svTRID' => 'test-dc44985e456accb8a3df31860c388ae3'
           },
          'resData' => {
             'ext-server:lstData' => {
                     'ext-server:server' => [
                         {
                           'ext-server:allocated' => {},
                           'ext-server:name' => 'ds-324121.ds-10.com',
                           'ext-server:id' => 'c155fe2489529d86'
                         },
                         {
                           'ext-server:name' => 'ds-432453.ds-10.com',
                           'ext-server:id' => '243020a6307c7d71'
                         }
                          ],
                     'xmlns:ext-server' => 'http://www.heartinternet.co.uk/whapi/ext-server-2.2'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-server:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-server] => http://www.heartinternet.co.uk/whapi/ext-server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-server:server
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-server:id
              [type] => complete
              [level] => 6
              [value] => c155fe2489529d86
          )
  
      [9] => Array
          (
              [tag] => ext-server:name
              [type] => complete
              [level] => 6
              [value] => ds-324121.ds-10.com
          )
  
      [10] => Array
          (
              [tag] => ext-server:allocated
              [type] => complete
              [level] => 6
          )
  
      [11] => Array
          (
              [tag] => ext-server:server
              [type] => close
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => ext-server:server
              [type] => open
              [level] => 5
          )
  
      [13] => Array
          (
              [tag] => ext-server:id
              [type] => complete
              [level] => 6
              [value] => 243020a6307c7d71
          )
  
      [14] => Array
          (
              [tag] => ext-server:name
              [type] => complete
              [level] => 6
              [value] => ds-432453.ds-10.com
          )
  
      [15] => Array
          (
              [tag] => ext-server:server
              [type] => close
              [level] => 5
          )
  
      [16] => Array
          (
              [tag] => ext-server:lstData
              [type] => close
              [level] => 4
          )
  
      [17] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [18] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [19] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => c4a1558781ba3382f04294278acf2f80
          )
  
      [20] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-dc44985e456accb8a3df31860c388ae3
          )
  
      [21] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [22] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [23] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-server"] = "http://www.heartinternet.co.uk/whapi/ext-server-2.2"
                                                   (...).children[0].name = "server"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "c155fe2489529d86"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "ds-324121.ds-10.com"
                                                               (...).children[2].name = "allocated"
                                                   (...).children[1].name = "server"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "243020a6307c7d71"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "ds-432453.ds-10.com"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "c4a1558781ba3382f04294278acf2f80"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-dc44985e456accb8a3df31860c388ae3"
  result.children[2].to_s = " \n"

Inspect Dedicated Server [^Back to contents]

This gives you a small amount of information about a server which has been set up.

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><server:info>
<server:info><server:id> <server:type>
<server:id>(A server allowance ID)
<server:type>"ds"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <info>
      <server:info xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>c155fe2489529d86</server:id>
        <server:type>ds</server:type>
      </server:info>
    </info>
    <clTRID>bbce007d9cd95afa06d8e8a03812dac1</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$server_ns, "info"]);
          $w->dataElement([$server_ns, "id"], "c155fe2489529d86");
          $w->dataElement([$server_ns, "type"], "ds");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "bbce007d9cd95afa06d8e8a03812dac1");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('c155fe2489529d86'));
          $c = $doc->createElementNS($server_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('ds'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('bbce007d9cd95afa06d8e8a03812dac1'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('server:info', {})
          current.add_element('server:id', {}).add_text("c155fe2489529d86")
          current.add_element('server:type', {}).add_text("ds")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("bbce007d9cd95afa06d8e8a03812dac1")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:infData>
<server:infData><server:id> <server:roid> <server:name>? <server:status>? <server:specification>? <server:features>? <server:exDate>
<server:id>(The ID of the allowance)
<server:roid>(text)
<server:name>(The given name of the server)
<server:status>"ok" or "inactive"
<server:specification><server:os> <server:role>
<server:os>"windows", "windows_se" or "linux"
<server:role>"2c", "4c" or "4c_bd"
<server:features><server:cpanel>? <server:backup>?
<server:cpanel>(empty)
<server:backup>"10" or "100"
<server:exDate>(when the server will be due for renewal)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:infData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>916228052105b0ed</server:id>
        <server:roid>916228052105B0ED-HI</server:roid>
        <server:name>ds-324121.ds-10.com</server:name>
        <server:status>ok</server:status>
        <server:specification>
          <server:os>linux</server:os>
          <server:role>4c</server:role>
        </server:specification>
        <server:features>
          <server:cpanel/>
          <server:backup>10</server:backup>
        </server:features>
        <server:exDate>2010-12-31T01:32:44</server:exDate>
      </server:infData>
    </resData>
    <trID>
      <clTRID>bbce007d9cd95afa06d8e8a03812dac1</clTRID>
      <svTRID>test-08cc199612cc355714ead1ff9f35bb80</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'bbce007d9cd95afa06d8e8a03812dac1',
             'svTRID' => 'test-08cc199612cc355714ead1ff9f35bb80'
           },
          'resData' => {
             'server:infData' => {
                    'server:id' => '916228052105b0ed',
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2',
                    'server:exDate' => '2010-12-31T01:32:44',
                    'server:name' => 'ds-324121.ds-10.com',
                    'server:features' => {
                         'server:cpanel' => {},
                         'server:backup' => '10'
                       },
                    'server:specification' => {
                           'server:os' => 'linux',
                           'server:role' => '4c'
                         },
                    'server:status' => 'ok',
                    'server:roid' => '916228052105B0ED-HI'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:infData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:id
              [type] => complete
              [level] => 5
              [value] => 916228052105b0ed
          )
  
      [8] => Array
          (
              [tag] => server:roid
              [type] => complete
              [level] => 5
              [value] => 916228052105B0ED-HI
          )
  
      [9] => Array
          (
              [tag] => server:name
              [type] => complete
              [level] => 5
              [value] => ds-324121.ds-10.com
          )
  
      [10] => Array
          (
              [tag] => server:status
              [type] => complete
              [level] => 5
              [value] => ok
          )
  
      [11] => Array
          (
              [tag] => server:specification
              [type] => open
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => server:os
              [type] => complete
              [level] => 6
              [value] => linux
          )
  
      [13] => Array
          (
              [tag] => server:role
              [type] => complete
              [level] => 6
              [value] => 4c
          )
  
      [14] => Array
          (
              [tag] => server:specification
              [type] => close
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => server:features
              [type] => open
              [level] => 5
          )
  
      [16] => Array
          (
              [tag] => server:cpanel
              [type] => complete
              [level] => 6
          )
  
      [17] => Array
          (
              [tag] => server:backup
              [type] => complete
              [level] => 6
              [value] => 10
          )
  
      [18] => Array
          (
              [tag] => server:features
              [type] => close
              [level] => 5
          )
  
      [19] => Array
          (
              [tag] => server:exDate
              [type] => complete
              [level] => 5
              [value] => 2010-12-31T01:32:44
          )
  
      [20] => Array
          (
              [tag] => server:infData
              [type] => close
              [level] => 4
          )
  
      [21] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [22] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [23] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => bbce007d9cd95afa06d8e8a03812dac1
          )
  
      [24] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-08cc199612cc355714ead1ff9f35bb80
          )
  
      [25] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [26] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [27] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "916228052105b0ed"
                                                   (...).children[1].name = "roid"
                                                               (...).children[0].to_s = "916228052105B0ED-HI"
                                                   (...).children[2].name = "name"
                                                               (...).children[0].to_s = "ds-324121.ds-10.com"
                                                   (...).children[3].name = "status"
                                                               (...).children[0].to_s = "ok"
                                                   (...).children[4].name = "specification"
                                                               (...).children[0].name = "os"
                                                                           (...).children[0].to_s = "linux"
                                                               (...).children[1].name = "role"
                                                                           (...).children[0].to_s = "4c"
                                                   (...).children[5].name = "features"
                                                               (...).children[0].name = "cpanel"
                                                               (...).children[1].name = "backup"
                                                                           (...).children[0].to_s = "10"
                                                   (...).children[6].name = "exDate"
                                                               (...).children[0].to_s = "2010-12-31T01:32:44"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "bbce007d9cd95afa06d8e8a03812dac1"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-08cc199612cc355714ead1ff9f35bb80"
  result.children[2].to_s = " \n"

Inspect VPS [^Back to contents]

This gives you a small amount of information about a server which has been set up.

What to send

Syntax

KeyAttributesContentsNotes
<command><info>
<info><server:info>
<server:info><server:id> <server:type>
<server:id>(A server allowance ID)
<server:type>"vps"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <info>
      <server:info xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>c155fe2489529d86</server:id>
        <server:type>vps</server:type>
      </server:info>
    </info>
    <clTRID>cc248a8dce982c1ef60ea0eff72d85e6</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$server_ns, "info"]);
          $w->dataElement([$server_ns, "id"], "c155fe2489529d86");
          $w->dataElement([$server_ns, "type"], "vps");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "cc248a8dce982c1ef60ea0eff72d85e6");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('c155fe2489529d86'));
          $c = $doc->createElementNS($server_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('vps'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('cc248a8dce982c1ef60ea0eff72d85e6'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('server:info', {})
          current.add_element('server:id', {}).add_text("c155fe2489529d86")
          current.add_element('server:type', {}).add_text("vps")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("cc248a8dce982c1ef60ea0eff72d85e6")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:infData>
<server:infData><server:id> <server:roid> <server:name>? <server:fullStatus>? <server:status>? <server:powerStatus>? <server:specification>? <server:features>? <server:exDate>
<server:id>(The ID of the allowance)
<server:roid>(text)
<server:name>(The given name of the server)
<server:fullStatus>(A two-part textual description of the status, e.g. "active.running")
<server:status>"ok" or "inactive"
<server:powerStatus>"on" or "off"
<server:specification><server:os> <server:addon>? <server:role> <server:hardware>
<server:os>"centos6", "centos7", "ubuntu_lts_1204", "ubuntu_lts_1404", "debian_7_wheezy", "fedora", "suse", "netbsd_512", "freebsd_10_1", "windows2012", "windows_se_64" or "windows_we_64"
<server:addon>"cpanel", "plesk10", "plesk30" or "plesk100"
<server:role>"vps"
<server:hardware><server:cores> <server:ram> <server:hdd>
<server:cores>1 to 12
<server:ram>1 to 32
<server:hdd>50 to 500
<server:features><server:backup>?
<server:backup>10 to 500
<server:exDate>(when the server will be due for renewal)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:infData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>916228052105b0ed</server:id>
        <server:roid>916228052105B0ED-HI</server:roid>
        <server:name>ds-324121.ds-10.com</server:name>
        <server:fullStatus>active.running</server:fullStatus>
        <server:status>ok</server:status>
        <server:powerStatus>on</server:powerStatus>
        <server:specification>
          <server:os>centos6</server:os>
          <server:addon>plesk10</server:addon>
          <server:role>vps</server:role>
          <server:hardware>
            <server:cores>6</server:cores>
            <server:ram>12</server:ram>
            <server:hdd>100</server:hdd>
          </server:hardware>
        </server:specification>
        <server:features>
          <server:backup>10</server:backup>
        </server:features>
        <server:exDate>2012-12-31T01:32:44</server:exDate>
      </server:infData>
    </resData>
    <trID>
      <clTRID>cc248a8dce982c1ef60ea0eff72d85e6</clTRID>
      <svTRID>test-faf6492c45b12079de08224a6238c489</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'cc248a8dce982c1ef60ea0eff72d85e6',
             'svTRID' => 'test-faf6492c45b12079de08224a6238c489'
           },
          'resData' => {
             'server:infData' => {
                    'server:fullStatus' => 'active.running',
                    'server:id' => '916228052105b0ed',
                    'server:powerStatus' => 'on',
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2',
                    'server:name' => 'ds-324121.ds-10.com',
                    'server:status' => 'ok',
                    'server:exDate' => '2012-12-31T01:32:44',
                    'server:features' => {
                         'server:backup' => '10'
                       },
                    'server:roid' => '916228052105B0ED-HI',
                    'server:specification' => {
                           'server:hardware' => {
                                'server:ram' => '12',
                                'server:hdd' => '100',
                                'server:cores' => '6'
                              },
                           'server:os' => 'centos6',
                           'server:role' => 'vps',
                           'server:addon' => 'plesk10'
                         }
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:infData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:id
              [type] => complete
              [level] => 5
              [value] => 916228052105b0ed
          )
  
      [8] => Array
          (
              [tag] => server:roid
              [type] => complete
              [level] => 5
              [value] => 916228052105B0ED-HI
          )
  
      [9] => Array
          (
              [tag] => server:name
              [type] => complete
              [level] => 5
              [value] => ds-324121.ds-10.com
          )
  
      [10] => Array
          (
              [tag] => server:fullStatus
              [type] => complete
              [level] => 5
              [value] => active.running
          )
  
      [11] => Array
          (
              [tag] => server:status
              [type] => complete
              [level] => 5
              [value] => ok
          )
  
      [12] => Array
          (
              [tag] => server:powerStatus
              [type] => complete
              [level] => 5
              [value] => on
          )
  
      [13] => Array
          (
              [tag] => server:specification
              [type] => open
              [level] => 5
          )
  
      [14] => Array
          (
              [tag] => server:os
              [type] => complete
              [level] => 6
              [value] => centos6
          )
  
      [15] => Array
          (
              [tag] => server:addon
              [type] => complete
              [level] => 6
              [value] => plesk10
          )
  
      [16] => Array
          (
              [tag] => server:role
              [type] => complete
              [level] => 6
              [value] => vps
          )
  
      [17] => Array
          (
              [tag] => server:hardware
              [type] => open
              [level] => 6
          )
  
      [18] => Array
          (
              [tag] => server:cores
              [type] => complete
              [level] => 7
              [value] => 6
          )
  
      [19] => Array
          (
              [tag] => server:ram
              [type] => complete
              [level] => 7
              [value] => 12
          )
  
      [20] => Array
          (
              [tag] => server:hdd
              [type] => complete
              [level] => 7
              [value] => 100
          )
  
      [21] => Array
          (
              [tag] => server:hardware
              [type] => close
              [level] => 6
          )
  
      [22] => Array
          (
              [tag] => server:specification
              [type] => close
              [level] => 5
          )
  
      [23] => Array
          (
              [tag] => server:features
              [type] => open
              [level] => 5
          )
  
      [24] => Array
          (
              [tag] => server:backup
              [type] => complete
              [level] => 6
              [value] => 10
          )
  
      [25] => Array
          (
              [tag] => server:features
              [type] => close
              [level] => 5
          )
  
      [26] => Array
          (
              [tag] => server:exDate
              [type] => complete
              [level] => 5
              [value] => 2012-12-31T01:32:44
          )
  
      [27] => Array
          (
              [tag] => server:infData
              [type] => close
              [level] => 4
          )
  
      [28] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [29] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [30] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => cc248a8dce982c1ef60ea0eff72d85e6
          )
  
      [31] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-faf6492c45b12079de08224a6238c489
          )
  
      [32] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [33] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [34] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "infData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "916228052105b0ed"
                                                   (...).children[1].name = "roid"
                                                               (...).children[0].to_s = "916228052105B0ED-HI"
                                                   (...).children[2].name = "name"
                                                               (...).children[0].to_s = "ds-324121.ds-10.com"
                                                   (...).children[3].name = "fullStatus"
                                                               (...).children[0].to_s = "active.running"
                                                   (...).children[4].name = "status"
                                                               (...).children[0].to_s = "ok"
                                                   (...).children[5].name = "powerStatus"
                                                               (...).children[0].to_s = "on"
                                                   (...).children[6].name = "specification"
                                                               (...).children[0].name = "os"
                                                                           (...).children[0].to_s = "centos6"
                                                               (...).children[1].name = "addon"
                                                                           (...).children[0].to_s = "plesk10"
                                                               (...).children[2].name = "role"
                                                                           (...).children[0].to_s = "vps"
                                                               (...).children[3].name = "hardware"
                                                                           (...).children[0].name = "cores"
                                                                                       (...).children[0].to_s = "6"
                                                                           (...).children[1].name = "ram"
                                                                                       (...).children[0].to_s = "12"
                                                                           (...).children[2].name = "hdd"
                                                                                       (...).children[0].to_s = "100"
                                                   (...).children[7].name = "features"
                                                               (...).children[0].name = "backup"
                                                                           (...).children[0].to_s = "10"
                                                   (...).children[8].name = "exDate"
                                                               (...).children[0].to_s = "2012-12-31T01:32:44"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "cc248a8dce982c1ef60ea0eff72d85e6"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-faf6492c45b12079de08224a6238c489"
  result.children[2].to_s = " \n"

Prepare a VPS Upgrade Order [^Back to contents]

This will place the VPS upgrade into your prebasket.

In return this will give you a unique value. This same value will be tagged on your order so that you can find the ID later. See "Examining old dedicated server orders".

To complete the order, you will need to visit https://customer.heartinternet.co.uk/manage/pre-basket-vps.cgi

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<update><server:update>
<server:update>op<server:purchaseMechanism> <server:id> <server:type> <server:add>? <server:rem>? <server:chg>?
op"request"An indication that you want to create a new upgrade order
<server:purchaseMechanism>"basket"
<server:id>(The server ID)
<server:type>"vps"
<server:add><server:status>
<server:status>"on" or "off"
<server:rem><server:status>
<server:status>"on" or "off"
<server:chg><server:status>? <server:specification>? <server:features>? <server:period>?
<server:status>"on" or "off"
<server:specification><server:os> <server:addon>? <server:role> <server:preset>?
<server:os>"centos6", "centos7", "ubuntu_lts_1204", "ubuntu_lts_1404", "debian_7_wheezy", "fedora21", "suse", "netbsd_512", "freebsd_10_1", "windows2012", "windows_se_64" or "windows_we_64"When set but it differs from the current OS, a rebuild is required
<server:addon>"cpanel", "plesk10", "plesk30", "plesk100", "plesk_ul", "plesk10_power_pack", "plesk30_power_pack", "plesk100_power_pack", "plesk_ul_power_pack"
<server:role>"vps"
<server:preset>"vps2015-base-hdd", "vps2015-base-ssd", "vps2015-baseplus-hdd", "vps2015-baseplus-ssd", "vps2015-plus-hdd", "vps2015-plus-ssd", "vps2015-power-hdd", "vps2015-power-ssd", "vps2015-premium-hdd", "vps2015-premium-ssd", "vps2015-pro-hdd" or "vps2015-pro-ssd"Relates to new VPS products. Overrides other hardware specifications.
<server:features><server:backup>?
<server:backup>10 to 500
<server:period>unit1 to 99
unit"y" or "m"Years or months

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <server:update xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2" op="request">
        <server:purchaseMechanism>basket</server:purchaseMechanism>
        <server:id>c155fe2489529d86</server:id>
        <server:type>vps</server:type>
        <server:chg>
          <server:specification>
            <server:os>centos5</server:os>
            <server:addon>plesk10</server:addon>
            <server:role>vps</server:role>
            <server:hardware>
              <server:cores>4</server:cores>
              <server:ram>24</server:ram>
              <server:hdd>200</server:hdd>
            </server:hardware>
          </server:specification>
          <server:features>
            <server:backup>200</server:backup>
          </server:features>
          <server:period unit="y">1</server:period>
        </server:chg>
      </server:update>
    </update>
    <clTRID>ebc92ac3fb4dbbcc88e4dadd20f7fc24</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$server_ns, "update"], 'op' => "request");
          $w->dataElement([$server_ns, "purchaseMechanism"], "basket");
          $w->dataElement([$server_ns, "id"], "c155fe2489529d86");
          $w->dataElement([$server_ns, "type"], "vps");
          $w->startTag([$server_ns, "chg"]);
            $w->startTag([$server_ns, "specification"]);
              $w->dataElement([$server_ns, "os"], "centos5");
              $w->dataElement([$server_ns, "addon"], "plesk10");
              $w->dataElement([$server_ns, "role"], "vps");
              $w->startTag([$server_ns, "hardware"]);
                $w->dataElement([$server_ns, "cores"], "4");
                $w->dataElement([$server_ns, "ram"], "24");
                $w->dataElement([$server_ns, "hdd"], "200");
              $w->endTag();
            $w->endTag();
            $w->startTag([$server_ns, "features"]);
              $w->dataElement([$server_ns, "backup"], "200");
            $w->endTag();
            $w->dataElement([$server_ns, "period"], "1", 'unit' => "y");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "ebc92ac3fb4dbbcc88e4dadd20f7fc24");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "update");$c->setAttribute('op', "request"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "purchaseMechanism");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('basket'));
          $c = $doc->createElementNS($server_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('c155fe2489529d86'));
          $c = $doc->createElementNS($server_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('vps'));
          $c = $doc->createElementNS($server_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "specification");
            $l->appendChild($c); $l = $c;
              $c = $doc->createElementNS($server_ns, "os");
              $l->appendChild($c);
              $c->appendChild($doc->createTextNode('centos5'));
              $c = $doc->createElementNS($server_ns, "addon");
              $l->appendChild($c);
              $c->appendChild($doc->createTextNode('plesk10'));
              $c = $doc->createElementNS($server_ns, "role");
              $l->appendChild($c);
              $c->appendChild($doc->createTextNode('vps'));
              $c = $doc->createElementNS($server_ns, "hardware");
              $l->appendChild($c); $l = $c;
                $c = $doc->createElementNS($server_ns, "cores");
                $l->appendChild($c);
                $c->appendChild($doc->createTextNode('4'));
                $c = $doc->createElementNS($server_ns, "ram");
                $l->appendChild($c);
                $c->appendChild($doc->createTextNode('24'));
                $c = $doc->createElementNS($server_ns, "hdd");
                $l->appendChild($c);
                $c->appendChild($doc->createTextNode('200'));
              $l = $l->parentNode;
            $l = $l->parentNode;
            $c = $doc->createElementNS($server_ns, "features");
            $l->appendChild($c); $l = $c;
              $c = $doc->createElementNS($server_ns, "backup");
              $l->appendChild($c);
              $c->appendChild($doc->createTextNode('200'));
            $l = $l->parentNode;
            $c = $doc->createElementNS($server_ns, "period");$c->setAttribute('unit', "y"); 
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('1'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('ebc92ac3fb4dbbcc88e4dadd20f7fc24'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('server:update', {'op' => "request"})
          current.add_element('server:purchaseMechanism', {}).add_text("basket")
          current.add_element('server:id', {}).add_text("c155fe2489529d86")
          current.add_element('server:type', {}).add_text("vps")
          current = current.add_element('server:chg', {})
            current = current.add_element('server:specification', {})
              current.add_element('server:os', {}).add_text("centos5")
              current.add_element('server:addon', {}).add_text("plesk10")
              current.add_element('server:role', {}).add_text("vps")
              current = current.add_element('server:hardware', {})
                current.add_element('server:cores', {}).add_text("4")
                current.add_element('server:ram', {}).add_text("24")
                current.add_element('server:hdd', {}).add_text("200")
              current = current.parent
            current = current.parent
            current = current.add_element('server:features', {})
              current.add_element('server:backup', {}).add_text("200")
            current = current.parent
            current.add_element('server:period', {'unit' => "y"}).add_text("1")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("ebc92ac3fb4dbbcc88e4dadd20f7fc24")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:updateData>
<server:updateData><server:preBasket>*
<server:preBasket>(text)A basket code

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1001'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:updateData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:preBasket>pre-basket-vps-upgrade:29</server:preBasket>
      </server:updateData>
    </resData>
    <trID>
      <clTRID>ebc92ac3fb4dbbcc88e4dadd20f7fc24</clTRID>
      <svTRID>test-03be0bb8105bcd05cd8ce611986f46b4</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'ebc92ac3fb4dbbcc88e4dadd20f7fc24',
             'svTRID' => 'test-03be0bb8105bcd05cd8ce611986f46b4'
           },
          'resData' => {
             'server:updateData' => {
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2',
                    'server:preBasket' => 'pre-basket-vps-upgrade:29'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1001'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1001
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:updateData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:preBasket
              [type] => complete
              [level] => 5
              [value] => pre-basket-vps-upgrade:29
          )
  
      [8] => Array
          (
              [tag] => server:updateData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => ebc92ac3fb4dbbcc88e4dadd20f7fc24
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-03be0bb8105bcd05cd8ce611986f46b4
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1001"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "updateData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "preBasket"
                                                               (...).children[0].to_s = "pre-basket-vps-upgrade:29"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "ebc92ac3fb4dbbcc88e4dadd20f7fc24"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-03be0bb8105bcd05cd8ce611986f46b4"
  result.children[2].to_s = " \n"

Check Existing VPS Upgrade Order [^Back to contents]

This allows you to check the status of a previous upgrade and find the server ID that was created.

When an upgrade order is placed through the API it goes into your prebasket, waiting for payment. This function will return the existing server ID if the upgrade has been completed (i.e. checked out of prebasket and paid for).

You should pass the existing prebasket identifier to this function and you will get the ID of the item back.

At this time, only the VPS upgrade (pre-basket-vps-upgrade) prebasket identifier is supported.

If the server has not yet been upgraded, you will get an error.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><server:create>
<server:create>op<server:preBasket>
op"query"An indication that you want to check on an order
<server:preBasket>(text)A pre-basket identifier

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <server:update xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2" op="query">
        <server:preBasket>pre-basket-vps-upgrade:17</server:preBasket>
      </server:update>
    </update>
    <clTRID>c67c2652c804969ac2ab340437862a40</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$server_ns, "update"], 'op' => "query");
          $w->dataElement([$server_ns, "preBasket"], "pre-basket-vps-upgrade:17");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "c67c2652c804969ac2ab340437862a40");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "update");$c->setAttribute('op', "query"); 
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "preBasket");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('pre-basket-vps-upgrade:17'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('c67c2652c804969ac2ab340437862a40'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('server:update', {'op' => "query"})
          current.add_element('server:preBasket', {}).add_text("pre-basket-vps-upgrade:17")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("c67c2652c804969ac2ab340437862a40")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:creData>
<server:creData><server:id>
<server:id>(The server ID)Unchanged

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:updateData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>d175fe2329529d86</server:id>
      </server:updateData>
    </resData>
    <trID>
      <clTRID>c67c2652c804969ac2ab340437862a40</clTRID>
      <svTRID>test-8098cd1b7d421873091a4dd3462d6e25</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'c67c2652c804969ac2ab340437862a40',
             'svTRID' => 'test-8098cd1b7d421873091a4dd3462d6e25'
           },
          'resData' => {
             'server:updateData' => {
                    'server:id' => 'd175fe2329529d86',
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:updateData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => server:id
              [type] => complete
              [level] => 5
              [value] => d175fe2329529d86
          )
  
      [8] => Array
          (
              [tag] => server:updateData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => c67c2652c804969ac2ab340437862a40
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-8098cd1b7d421873091a4dd3462d6e25
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "updateData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "d175fe2329529d86"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "c67c2652c804969ac2ab340437862a40"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-8098cd1b7d421873091a4dd3462d6e25"
  result.children[2].to_s = " \n"

Power a VPS on/off, or reboot [^Back to contents]

This will power a VPS on or off, or reboot it.

Changing the VPS's state is done by issuing either add, remove or change commands in a logical manner.

The most straightforward to understand way to change the state is to use change - specifying either "on" or "off".

However, add or remove can be used. For example, removing and then adding the "on" state is equivalent to rebooting the VPS.

Note: currently these commands can only be used with VPS products.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<update><server:update>
<server:update><server:id> <server:type> <server:add>? <server:rem>? <server:chg>?
<server:id>(The server ID)
<server:type>"vps"
<server:add><server:status>
<server:status>"on" or "off"Specifying 'on' turns the server on. Specifying 'off' turns the server off.
<server:rem><server:status>
<server:status>"on" or "off"Specifying 'on' turns the server on. Specifying 'off' turns the server off.
<server:chg><server:status>? <server:specification>? <server:features>?
<server:status>"on" or "off"Specifying 'on' turns the server on. Specifying 'off' turns the server off.

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <server:update xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2">
        <server:id>c155fe2489529d86</server:id>
        <server:type>vps</server:type>
        <server:chg>
          <server:status>off</server:status>
        </server:chg>
      </server:update>
    </update>
    <clTRID>57762091719fb637aa78d4b1fca2c1cd</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $server_ns => "server",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$server_ns, "update"]);
          $w->dataElement([$server_ns, "id"], "c155fe2489529d86");
          $w->dataElement([$server_ns, "type"], "vps");
          $w->startTag([$server_ns, "chg"]);
            $w->dataElement([$server_ns, "status"], "off");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "57762091719fb637aa78d4b1fca2c1cd");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $server_ns = "http://www.heartinternet.co.uk/whapi/server-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($server_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($server_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('c155fe2489529d86'));
          $c = $doc->createElementNS($server_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('vps'));
          $c = $doc->createElementNS($server_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($server_ns, "status");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('off'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('57762091719fb637aa78d4b1fca2c1cd'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  whapi_top.add_namespace("server", "http://www.heartinternet.co.uk/whapi/server-2.2")
  current = current.add_element('epp', {})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('server:update', {})
          current.add_element('server:id', {}).add_text("c155fe2489529d86")
          current.add_element('server:type', {}).add_text("vps")
          current = current.add_element('server:chg', {})
            current.add_element('server:status', {}).add_text("off")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("57762091719fb637aa78d4b1fca2c1cd")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><server:updateData>
<server:updateData>(empty)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1001'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <server:updateData xmlns:server="http://www.heartinternet.co.uk/whapi/server-2.2"/>
    </resData>
    <trID>
      <clTRID>57762091719fb637aa78d4b1fca2c1cd</clTRID>
      <svTRID>test-2781e950f7aba8a624b57df035ac041b</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '57762091719fb637aa78d4b1fca2c1cd',
             'svTRID' => 'test-2781e950f7aba8a624b57df035ac041b'
           },
          'resData' => {
             'server:updateData' => {
                    'xmlns:server' => 'http://www.heartinternet.co.uk/whapi/server-2.2'
                  }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1001'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1001
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => server:updateData
              [type] => complete
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:server] => http://www.heartinternet.co.uk/whapi/server-2.2
                  )
  
          )
  
      [7] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 57762091719fb637aa78d4b1fca2c1cd
          )
  
      [10] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-2781e950f7aba8a624b57df035ac041b
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [13] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1001"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "updateData"
                                                   (...).attributes["server"] = "http://www.heartinternet.co.uk/whapi/server-2.2"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "57762091719fb637aa78d4b1fca2c1cd"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-2781e950f7aba8a624b57df035ac041b"
  result.children[2].to_s = " \n"

BILLING COMMANDS [^Back to contents]

This section provides functions to examine your billing at a coarse level.

Listing Invoices [^Back to contents]

This just returns the IDs, dates and amounts of your invoices.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-billing:listInvoices>
<ext-billing:listInvoices>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-billing="http://www.heartinternet.co.uk/whapi/ext-billing-2.0">
  <extension>
    <ext-billing:listInvoices/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">938d1139bfd358cfa3d6439dc9c64da9</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_billing_ns = "http://www.heartinternet.co.uk/whapi/ext-billing-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_billing_ns => "ext-billing",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_billing_ns, "listInvoices"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "938d1139bfd358cfa3d6439dc9c64da9");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_billing_ns = "http://www.heartinternet.co.uk/whapi/ext-billing-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_billing_ns, "listInvoices");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('938d1139bfd358cfa3d6439dc9c64da9'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-billing' => "http://www.heartinternet.co.uk/whapi/ext-billing-2.0"})
    current = current.add_element('extension', {})
      current.add_element('ext-billing:listInvoices', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("938d1139bfd358cfa3d6439dc9c64da9")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-billing:lstData>
<ext-billing:lstData><ext-billing:invoice>*
<ext-billing:invoice>id dateOrdered<ext-billing:price>
id(number)The invoice identifier
dateOrdered(date)The date when the invoice was raised
<ext-billing:price>incVAT exVAT(empty)
incVAT(number)The amount charged, in GBP
exVAT(number)The amount charged (excluding tax), in GBP

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-billing="http://www.heartinternet.co.uk/whapi/ext-billing-2.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-billing:lstData>
        <ext-billing:invoice id='101230423' dateOrdered='2000-12-31'>
          <ext-billing:price exVAT='100.00' incVAT='117.5'/>
        </ext-billing:invoice>
        <ext-billing:invoice id='101530201' dateOrdered='2009-01-01'>
          <ext-billing:price exVAT='100.00' incVAT='115.0'/>
        </ext-billing:invoice>
      </ext-billing:lstData>
    </resData>
    <trID>
      <clTRID>938d1139bfd358cfa3d6439dc9c64da9</clTRID>
      <svTRID>test-18de054d4a734313bd79f46c7d325881</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'xmlns:ext-billing' => 'http://www.heartinternet.co.uk/whapi/ext-billing-2.0',
      'response' => {
          'trID' => {
             'clTRID' => '938d1139bfd358cfa3d6439dc9c64da9',
             'svTRID' => 'test-18de054d4a734313bd79f46c7d325881'
           },
          'resData' => {
             'ext-billing:lstData' => {
                   'ext-billing:invoice' => {
                            '101230423' => {
                              'ext-billing:price' => {
                                     'incVAT' => '117.5',
                                     'exVAT' => '100.00'
                                      },
                              'dateOrdered' => '2000-12-31'
                               },
                            '101530201' => {
                              'ext-billing:price' => {
                                     'incVAT' => '115.0',
                                     'exVAT' => '100.00'
                                      },
                              'dateOrdered' => '2009-01-01'
                               }
                          }
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-billing] => http://www.heartinternet.co.uk/whapi/ext-billing-2.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-billing:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-billing:invoice
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 101230423
                      [dateOrdered] => 2000-12-31
                  )
  
          )
  
      [8] => Array
          (
              [tag] => ext-billing:price
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [exVAT] => 100.00
                      [incVAT] => 117.5
                  )
  
          )
  
      [9] => Array
          (
              [tag] => ext-billing:invoice
              [type] => close
              [level] => 5
          )
  
      [10] => Array
          (
              [tag] => ext-billing:invoice
              [type] => open
              [level] => 5
              [attributes] => Array
                  (
                      [id] => 101530201
                      [dateOrdered] => 2009-01-01
                  )
  
          )
  
      [11] => Array
          (
              [tag] => ext-billing:price
              [type] => complete
              [level] => 6
              [attributes] => Array
                  (
                      [exVAT] => 100.00
                      [incVAT] => 115.0
                  )
  
          )
  
      [12] => Array
          (
              [tag] => ext-billing:invoice
              [type] => close
              [level] => 5
          )
  
      [13] => Array
          (
              [tag] => ext-billing:lstData
              [type] => close
              [level] => 4
          )
  
      [14] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 938d1139bfd358cfa3d6439dc9c64da9
          )
  
      [17] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-18de054d4a734313bd79f46c7d325881
          )
  
      [18] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [19] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [20] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-billing"] = "http://www.heartinternet.co.uk/whapi/ext-billing-2.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "invoice"
                                                               (...).attributes["id"] = "101230423"
                                                               (...).attributes["dateOrdered"] = "2000-12-31"
                                                               (...).children[0].name = "price"
                                                                           (...).attributes["exVAT"] = "100.00"
                                                                           (...).attributes["incVAT"] = "117.5"
                                                   (...).children[1].name = "invoice"
                                                               (...).attributes["id"] = "101530201"
                                                               (...).attributes["dateOrdered"] = "2009-01-01"
                                                               (...).children[0].name = "price"
                                                                           (...).attributes["exVAT"] = "100.00"
                                                                           (...).attributes["incVAT"] = "115.0"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "938d1139bfd358cfa3d6439dc9c64da9"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-18de054d4a734313bd79f46c7d325881"
  result.children[2].to_s = " \n"

WEB BUILDER PLUS COMMANDS [^Back to contents]

These are commands for Web Builder Plus provision for hosting packages.

List Web Builder Plus [^Back to contents]

This returns a list of all your packages which have Web Builder Plus allowances.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-wbp:list>
<ext-wbp:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-wbp:list xmlns:ext-wbp="http://www.heartinternet.co.uk/whapi/ext-wbp-2.0"/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">e259a499a3d7c23eb9d9ea03499b089a</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_wbp_ns = "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_wbp_ns => "ext-wbp",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_wbp_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "e259a499a3d7c23eb9d9ea03499b089a");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_wbp_ns = "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_wbp_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('e259a499a3d7c23eb9d9ea03499b089a'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current.add_element('ext-wbp:list', {'xmlns:ext-wbp' => "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0"})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("e259a499a3d7c23eb9d9ea03499b089a")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-wbp:lstData>
<ext-wbp:lstData><ext-wbp:packageId>*
<ext-wbp:packageId>(A package ID)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-wbp:lstData xmlns:ext-wbp="http://www.heartinternet.co.uk/whapi/ext-wbp-2.0">
        <ext-wbp:packageId>b58edcd010f136b1</ext-wbp:packageId>
      </ext-wbp:lstData>
    </resData>
    <trID>
      <clTRID>e259a499a3d7c23eb9d9ea03499b089a</clTRID>
      <svTRID>test-4636431991116e27c7a724bce53123bb</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'e259a499a3d7c23eb9d9ea03499b089a',
             'svTRID' => 'test-4636431991116e27c7a724bce53123bb'
           },
          'resData' => {
             'ext-wbp:lstData' => {
                  'ext-wbp:packageId' => 'b58edcd010f136b1',
                  'xmlns:ext-wbp' => 'http://www.heartinternet.co.uk/whapi/ext-wbp-2.0'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-wbp:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-wbp] => http://www.heartinternet.co.uk/whapi/ext-wbp-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-wbp:packageId
              [type] => complete
              [level] => 5
              [value] => b58edcd010f136b1
          )
  
      [8] => Array
          (
              [tag] => ext-wbp:lstData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => e259a499a3d7c23eb9d9ea03499b089a
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-4636431991116e27c7a724bce53123bb
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-wbp"] = "http://www.heartinternet.co.uk/whapi/ext-wbp-2.0"
                                                   (...).children[0].name = "packageId"
                                                               (...).children[0].to_s = "b58edcd010f136b1"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "e259a499a3d7c23eb9d9ea03499b089a"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-4636431991116e27c7a724bce53123bb"
  result.children[2].to_s = " \n"

PERSONALISED SECURE SERVER COMMANDS [^Back to contents]

These are commands for personalised secure server provision on hosting packages or dedicated servers.

List Secure Server Instances [^Back to contents]

This returns a list of all your personalised secure server instances.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-security:list>
<ext-security:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-security:list xmlns:ext-security="http://www.heartinternet.co.uk/whapi/ext-security-2.0"/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">35a2c912c2245137906a1296106750bc</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_security_ns = "http://www.heartinternet.co.uk/whapi/ext-security-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_security_ns => "ext-security",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_security_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "35a2c912c2245137906a1296106750bc");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_security_ns = "http://www.heartinternet.co.uk/whapi/ext-security-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_security_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('35a2c912c2245137906a1296106750bc'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current.add_element('ext-security:list', {'xmlns:ext-security' => "http://www.heartinternet.co.uk/whapi/ext-security-2.0"})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("35a2c912c2245137906a1296106750bc")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-security:lstData>
<ext-security:lstData><ext-security:security>*
<ext-security:security><ext-security:packageId>? <ext-security:serverId>? <ext-security:domainName>
<ext-security:packageId>(A package ID)
<ext-security:serverId>(A dedicated server ID)
<ext-security:domainName>(domain name)The full DNS name of the secured site.

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-security:lstData xmlns:ext-security="http://www.heartinternet.co.uk/whapi/ext-security-2.0">
        <ext-security:security>
          <ext-security:packageId>a3fed2c104493e3b</ext-security:packageId>
          <ext-security:domainName>secure.example.org</ext-security:domainName>
        </ext-security:security>
        <ext-security:security>
          <ext-security:serverId>c155fe2489529d86</ext-security:serverId>
          <ext-security:domainName>www.mysecuresite.com</ext-security:domainName>
        </ext-security:security>
      </ext-security:lstData>
    </resData>
    <trID>
      <clTRID>35a2c912c2245137906a1296106750bc</clTRID>
      <svTRID>test-5697e18efe6eda43b923296d567155bb</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '35a2c912c2245137906a1296106750bc',
             'svTRID' => 'test-5697e18efe6eda43b923296d567155bb'
           },
          'resData' => {
             'ext-security:lstData' => {
                    'ext-security:security' => [
                            {
                           'ext-security:packageId' => 'a3fed2c104493e3b',
                           'ext-security:domainName' => 'secure.example.org'
                            },
                            {
                           'ext-security:domainName' => 'www.mysecuresite.com',
                           'ext-security:serverId' => 'c155fe2489529d86'
                            }
                          ],
                    'xmlns:ext-security' => 'http://www.heartinternet.co.uk/whapi/ext-security-2.0'
                     }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-security:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-security] => http://www.heartinternet.co.uk/whapi/ext-security-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-security:security
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-security:packageId
              [type] => complete
              [level] => 6
              [value] => a3fed2c104493e3b
          )
  
      [9] => Array
          (
              [tag] => ext-security:domainName
              [type] => complete
              [level] => 6
              [value] => secure.example.org
          )
  
      [10] => Array
          (
              [tag] => ext-security:security
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => ext-security:security
              [type] => open
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => ext-security:serverId
              [type] => complete
              [level] => 6
              [value] => c155fe2489529d86
          )
  
      [13] => Array
          (
              [tag] => ext-security:domainName
              [type] => complete
              [level] => 6
              [value] => www.mysecuresite.com
          )
  
      [14] => Array
          (
              [tag] => ext-security:security
              [type] => close
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => ext-security:lstData
              [type] => close
              [level] => 4
          )
  
      [16] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [17] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [18] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 35a2c912c2245137906a1296106750bc
          )
  
      [19] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-5697e18efe6eda43b923296d567155bb
          )
  
      [20] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [21] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [22] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-security"] = "http://www.heartinternet.co.uk/whapi/ext-security-2.0"
                                                   (...).children[0].name = "security"
                                                               (...).children[0].name = "packageId"
                                                                           (...).children[0].to_s = "a3fed2c104493e3b"
                                                               (...).children[1].name = "domainName"
                                                                           (...).children[0].to_s = "secure.example.org"
                                                   (...).children[1].name = "security"
                                                               (...).children[0].name = "serverId"
                                                                           (...).children[0].to_s = "c155fe2489529d86"
                                                               (...).children[1].name = "domainName"
                                                                           (...).children[0].to_s = "www.mysecuresite.com"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "35a2c912c2245137906a1296106750bc"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-5697e18efe6eda43b923296d567155bb"
  result.children[2].to_s = " \n"

EMAIL ANTI-VIRUS COMMANDS [^Back to contents]

These are commands for server-side virus filtering on hosting packages.

List Email Anti-virus Instances [^Back to contents]

This returns a list of all your packages which have email anti-virus support.

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-antivirus:list>
<ext-antivirus:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <extension>
    <ext-antivirus:list xmlns:ext-antivirus="http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0"/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">7f809637a8e17af36a51316e7e1016b8</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_antivirus_ns = "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_antivirus_ns => "ext-antivirus",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_antivirus_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "7f809637a8e17af36a51316e7e1016b8");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_antivirus_ns = "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_antivirus_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('7f809637a8e17af36a51316e7e1016b8'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {})
    current = current.add_element('extension', {})
      current.add_element('ext-antivirus:list', {'xmlns:ext-antivirus' => "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0"})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("7f809637a8e17af36a51316e7e1016b8")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-antivirus:lstData>
<ext-antivirus:lstData><ext-antivirus:packageId>*
<ext-antivirus:packageId>(A package ID)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-antivirus:lstData xmlns:ext-antivirus="http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0">
        <ext-antivirus:packageId>5b90dff13ce0219c</ext-antivirus:packageId>
      </ext-antivirus:lstData>
    </resData>
    <trID>
      <clTRID>7f809637a8e17af36a51316e7e1016b8</clTRID>
      <svTRID>test-50a87517bf4e0b77e0c768a1f66e5b8e</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '7f809637a8e17af36a51316e7e1016b8',
             'svTRID' => 'test-50a87517bf4e0b77e0c768a1f66e5b8e'
           },
          'resData' => {
             'ext-antivirus:lstData' => {
                     'ext-antivirus:packageId' => '5b90dff13ce0219c',
                     'xmlns:ext-antivirus' => 'http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0'
                   }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        }
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-antivirus:lstData
              [type] => open
              [level] => 4
              [attributes] => Array
                  (
                      [xmlns:ext-antivirus] => http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0
                  )
  
          )
  
      [7] => Array
          (
              [tag] => ext-antivirus:packageId
              [type] => complete
              [level] => 5
              [value] => 5b90dff13ce0219c
          )
  
      [8] => Array
          (
              [tag] => ext-antivirus:lstData
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 7f809637a8e17af36a51316e7e1016b8
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-50a87517bf4e0b77e0c768a1f66e5b8e
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).attributes["ext-antivirus"] = "http://www.heartinternet.co.uk/whapi/ext-antivirus-2.0"
                                                   (...).children[0].name = "packageId"
                                                               (...).children[0].to_s = "5b90dff13ce0219c"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "7f809637a8e17af36a51316e7e1016b8"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-50a87517bf4e0b77e0c768a1f66e5b8e"
  result.children[2].to_s = " \n"

SITEDESIGNER COMMANDS [^Back to contents]

These are commands for pre-loading SiteDesigner into your basket, for you to later purchase manually.

Creating SiteDesigner Instances [^Back to contents]

This will place SiteDesigner in your prebasket, either with a pre-existing domain name (no "mustCreate" attribute) or by creating a domain name reference to allow you to register or transfer it later on. If you want to prohibit use of an existing domain name, set mustCreate to 1.

In response, you get the item ID.

To complete the order, you will need to visit https://customer.heartinternet.co.uk/manage/pre-basket-domains.cgi

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><offsite-package:create>
<offsite-package:create><offsite-package:domainName> <offsite-package:type> <offsite-package:subtype>?
<offsite-package:domainName>mustCreate?(domain name)
mustCreate1See description above
<offsite-package:type>"sitedesigner"
<offsite-package:subtype>"standard" or "pro"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <command>
    <create>
      <offsite-package:create>
        <offsite-package:domainName mustCreate='1'>foo.com</offsite-package:domainName>
        <offsite-package:type>sitedesigner</offsite-package:type>
        <offsite-package:subtype>standard</offsite-package:subtype>
      </offsite-package:create>
    </create>
    <clTRID>7dfc41ce538570a93d92a28fe5c10d9c</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $offsite_package_ns => "offsite-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$offsite_package_ns, "create"]);
          $w->dataElement([$offsite_package_ns, "domainName"], "foo.com", 'mustCreate' => "1");
          $w->dataElement([$offsite_package_ns, "type"], "sitedesigner");
          $w->dataElement([$offsite_package_ns, "subtype"], "standard");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "7dfc41ce538570a93d92a28fe5c10d9c");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($offsite_package_ns, "create");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($offsite_package_ns, "domainName");$c->setAttribute('mustCreate', "1"); 
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('foo.com'));
          $c = $doc->createElementNS($offsite_package_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('sitedesigner'));
          $c = $doc->createElementNS($offsite_package_ns, "subtype");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('standard'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('7dfc41ce538570a93d92a28fe5c10d9c'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:offsite-package' => "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('offsite-package:create', {})
          current.add_element('offsite-package:domainName', {'mustCreate' => "1"}).add_text("foo.com")
          current.add_element('offsite-package:type', {}).add_text("sitedesigner")
          current.add_element('offsite-package:subtype', {}).add_text("standard")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("7dfc41ce538570a93d92a28fe5c10d9c")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><offsite-package:creData>
<offsite-package:creData><offsite-package:preBasket>*
<offsite-package:preBasket><offsite-package:id>
<offsite-package:id>(text)A prebasket identifier

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <offsite-package:creData>
        <offsite-package:preBasket>
          <offsite-package:id>e9f3dfe45604e7da</offsite-package:id>
        </offsite-package:preBasket>
      </offsite-package:creData>
    </resData>
    <trID>
      <clTRID>7dfc41ce538570a93d92a28fe5c10d9c</clTRID>
      <svTRID>test-049e4c416f3559e2c68f58679c07d002</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '7dfc41ce538570a93d92a28fe5c10d9c',
             'svTRID' => 'test-049e4c416f3559e2c68f58679c07d002'
           },
          'resData' => {
             'offsite-package:creData' => {
                    'offsite-package:preBasket' => {
                             'offsite-package:id' => 'e9f3dfe45604e7da'
                              }
                     }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:offsite-package' => 'http://www.heartinternet.co.uk/whapi/offsite-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:offsite-package] => http://www.heartinternet.co.uk/whapi/offsite-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => offsite-package:creData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => offsite-package:preBasket
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => offsite-package:id
              [type] => complete
              [level] => 6
              [value] => e9f3dfe45604e7da
          )
  
      [9] => Array
          (
              [tag] => offsite-package:preBasket
              [type] => close
              [level] => 5
          )
  
      [10] => Array
          (
              [tag] => offsite-package:creData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 7dfc41ce538570a93d92a28fe5c10d9c
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-049e4c416f3559e2c68f58679c07d002
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["offsite-package"] = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).children[0].name = "preBasket"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "e9f3dfe45604e7da"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "7dfc41ce538570a93d92a28fe5c10d9c"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-049e4c416f3559e2c68f58679c07d002"
  result.children[2].to_s = " \n"

Creating SiteDesigner Trial Instances [^Back to contents]

This will create a SiteDesigner Trial.

In response, you get the item ID.

What to send

Syntax

KeyAttributesContentsNotes
<command><create>
<create><offsite-package:createTrial>
<offsite-package:createTrial><offsite-package:type> <offsite-package:subtype>?
<offsite-package:type>"sitedesigner"
<offsite-package:subtype>"trial"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <command>
    <create>
      <offsite-package:createTrial>
        <offsite-package:type>sitedesigner</offsite-package:type>
        <offsite-package:subtype>trial</offsite-package:subtype>
      </offsite-package:createTrial>
    </create>
    <clTRID>49c966fdd4c87e8419008f20b4c70329</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $offsite_package_ns => "offsite-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('create');
        $w->startTag([$offsite_package_ns, "createTrial"]);
          $w->dataElement([$offsite_package_ns, "type"], "sitedesigner");
          $w->dataElement([$offsite_package_ns, "subtype"], "trial");
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "49c966fdd4c87e8419008f20b4c70329");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'create');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($offsite_package_ns, "createTrial");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($offsite_package_ns, "type");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('sitedesigner'));
          $c = $doc->createElementNS($offsite_package_ns, "subtype");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('trial'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('49c966fdd4c87e8419008f20b4c70329'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:offsite-package' => "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"})
    current = current.add_element('command', {})
      current = current.add_element('create', {})
        current = current.add_element('offsite-package:createTrial', {})
          current.add_element('offsite-package:type', {}).add_text("sitedesigner")
          current.add_element('offsite-package:subtype', {}).add_text("trial")
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("49c966fdd4c87e8419008f20b4c70329")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><offsite-package:creData>
<offsite-package:creData><offsite-package:instance>*
<offsite-package:instance><offsite-package:id>
<offsite-package:id>(text)An instance identifier

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <offsite-package:creData>
        <offsite-package:instance>
          <offsite-package:id>e9f3dfe45604e7da</offsite-package:id>
        </offsite-package:instance>
      </offsite-package:creData>
    </resData>
    <trID>
      <clTRID>49c966fdd4c87e8419008f20b4c70329</clTRID>
      <svTRID>test-d9497ad23536a47dc6659a81fcc2b007</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '49c966fdd4c87e8419008f20b4c70329',
             'svTRID' => 'test-d9497ad23536a47dc6659a81fcc2b007'
           },
          'resData' => {
             'offsite-package:creData' => {
                    'offsite-package:instance' => {
                            'offsite-package:id' => 'e9f3dfe45604e7da'
                             }
                     }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:offsite-package' => 'http://www.heartinternet.co.uk/whapi/offsite-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:offsite-package] => http://www.heartinternet.co.uk/whapi/offsite-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => offsite-package:creData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => offsite-package:instance
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => offsite-package:id
              [type] => complete
              [level] => 6
              [value] => e9f3dfe45604e7da
          )
  
      [9] => Array
          (
              [tag] => offsite-package:instance
              [type] => close
              [level] => 5
          )
  
      [10] => Array
          (
              [tag] => offsite-package:creData
              [type] => close
              [level] => 4
          )
  
      [11] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [13] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 49c966fdd4c87e8419008f20b4c70329
          )
  
      [14] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-d9497ad23536a47dc6659a81fcc2b007
          )
  
      [15] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [16] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [17] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["offsite-package"] = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "creData"
                                                   (...).children[0].name = "instance"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "e9f3dfe45604e7da"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "49c966fdd4c87e8419008f20b4c70329"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-d9497ad23536a47dc6659a81fcc2b007"
  result.children[2].to_s = " \n"

Listing SiteDesigner Instances [^Back to contents]

This provides a list of SiteDesigner instances with fairly minimal information (temporary url and ID).

What to send

Syntax

KeyAttributesContentsNotes
<extension><ext-offsite-package:list>
<ext-offsite-package:list>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-offsite-package="http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2">
  <extension>
    <ext-offsite-package:list/>
    <ext-whapi:clTRID xmlns:ext-whapi="http://www.heartinternet.co.uk/whapi/ext-whapi-2.0">149040348b83188c6731aa97de7bea9e</ext-whapi:clTRID>
  </extension>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $ext_offsite_package_ns = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2";
  my $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $ext_offsite_package_ns => "ext-offsite-package",
  $ext_whapi_ns => "ext-whapi",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('extension');
      $w->emptyTag([$ext_offsite_package_ns, "list"]);
      $w->dataElement([$ext_whapi_ns, "clTRID"], "149040348b83188c6731aa97de7bea9e");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $ext_offsite_package_ns = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2";
  $ext_whapi_ns = "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'extension');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($ext_offsite_package_ns, "list");
      $l->appendChild($c);
      $c = $doc->createElementNS($ext_whapi_ns, "clTRID");
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('149040348b83188c6731aa97de7bea9e'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:ext-offsite-package' => "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2"})
    current = current.add_element('extension', {})
      current.add_element('ext-offsite-package:list', {})
      current.add_element('ext-whapi:clTRID', {'xmlns:ext-whapi' => "http://www.heartinternet.co.uk/whapi/ext-whapi-2.0"}).add_text("149040348b83188c6731aa97de7bea9e")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-offsite-package:lstData>
<ext-offsite-package:lstData><ext-offsite-package:instance>*
<ext-offsite-package:instance><ext-offsite-package:id> <ext-offsite-package:name>
<ext-offsite-package:id>(number)
<ext-offsite-package:name>(a domain name or temporary url)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-offsite-package="http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-offsite-package:lstData>
        <ext-offsite-package:instance>
          <ext-offsite-package:id>3e50664779a66336</ext-offsite-package:id>
          <ext-offsite-package:name>foo.example.org</ext-offsite-package:name>
        </ext-offsite-package:instance>
        <ext-offsite-package:instance>
          <ext-offsite-package:id>bb00181b84305c57</ext-offsite-package:id>
          <ext-offsite-package:name>bar.example.org</ext-offsite-package:name>
        </ext-offsite-package:instance>
        <ext-offsite-package:instance>
          <ext-offsite-package:id>308142b49153f743</ext-offsite-package:id>
          <ext-offsite-package:name>http://boo.sitedesignpro.net/</ext-offsite-package:name>
        </ext-offsite-package:instance>
      </ext-offsite-package:lstData>
    </resData>
    <trID>
      <clTRID>149040348b83188c6731aa97de7bea9e</clTRID>
      <svTRID>test-7dd7817b2793ebed7ffa552b2511bf3c</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '149040348b83188c6731aa97de7bea9e',
             'svTRID' => 'test-7dd7817b2793ebed7ffa552b2511bf3c'
           },
          'resData' => {
             'ext-offsite-package:lstData' => {
                     'ext-offsite-package:instance' => [
                              {
                                'ext-offsite-package:name' => 'foo.example.org',
                                'ext-offsite-package:id' => '3e50664779a66336'
                              },
                              {
                                'ext-offsite-package:name' => 'bar.example.org',
                                'ext-offsite-package:id' => 'bb00181b84305c57'
                              },
                              {
                                'ext-offsite-package:name' => 'http://boo.sitedesignpro.net/',
                                'ext-offsite-package:id' => '308142b49153f743'
                              }
                               ]
                      }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-offsite-package' => 'http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-offsite-package] => http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-offsite-package:lstData
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => open
              [level] => 5
          )
  
      [8] => Array
          (
              [tag] => ext-offsite-package:id
              [type] => complete
              [level] => 6
              [value] => 3e50664779a66336
          )
  
      [9] => Array
          (
              [tag] => ext-offsite-package:name
              [type] => complete
              [level] => 6
              [value] => foo.example.org
          )
  
      [10] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => close
              [level] => 5
          )
  
      [11] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => open
              [level] => 5
          )
  
      [12] => Array
          (
              [tag] => ext-offsite-package:id
              [type] => complete
              [level] => 6
              [value] => bb00181b84305c57
          )
  
      [13] => Array
          (
              [tag] => ext-offsite-package:name
              [type] => complete
              [level] => 6
              [value] => bar.example.org
          )
  
      [14] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => close
              [level] => 5
          )
  
      [15] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => open
              [level] => 5
          )
  
      [16] => Array
          (
              [tag] => ext-offsite-package:id
              [type] => complete
              [level] => 6
              [value] => 308142b49153f743
          )
  
      [17] => Array
          (
              [tag] => ext-offsite-package:name
              [type] => complete
              [level] => 6
              [value] => http://boo.sitedesignpro.net/
          )
  
      [18] => Array
          (
              [tag] => ext-offsite-package:instance
              [type] => close
              [level] => 5
          )
  
      [19] => Array
          (
              [tag] => ext-offsite-package:lstData
              [type] => close
              [level] => 4
          )
  
      [20] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [21] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [22] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 149040348b83188c6731aa97de7bea9e
          )
  
      [23] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-7dd7817b2793ebed7ffa552b2511bf3c
          )
  
      [24] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [25] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [26] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-offsite-package"] = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "lstData"
                                                   (...).children[0].name = "instance"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "3e50664779a66336"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "foo.example.org"
                                                   (...).children[1].name = "instance"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "bb00181b84305c57"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "bar.example.org"
                                                   (...).children[2].name = "instance"
                                                               (...).children[0].name = "id"
                                                                           (...).children[0].to_s = "308142b49153f743"
                                                               (...).children[1].name = "name"
                                                                           (...).children[0].to_s = "http://boo.sitedesignpro.net/"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "149040348b83188c6731aa97de7bea9e"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-7dd7817b2793ebed7ffa552b2511bf3c"
  result.children[2].to_s = " \n"

Control Panel Pre-Authentication [^Back to contents]

This will provide you with a URL to allow the user to log straight in to the control panel without providing a username and password. The URL expires soon afterwards, so this should be used for immediate redirects only.

What to send

Syntax

KeyAttributesContentsNotes
<command><info> <extension>
<info><offsite-package:info>
<offsite-package:info><offsite-package:id>
<offsite-package:id>(text)
<extension><ext-offsite-package:preAuthenticate>
<ext-offsite-package:preAuthenticate>(empty)

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <command>
    <info>
      <offsite-package:info>
        <offsite-package:id>17824b25c16eecfa</offsite-package:id>
      </offsite-package:info>
    </info>
    <extension>
      <ext-offsite-package:preAuthenticate xmlns:ext-offsite-package="http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2"/>
    </extension>
    <clTRID>af09fb9fb724b3098ae0bc3dc93629d7</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  my $ext_offsite_package_ns = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $offsite_package_ns => "offsite-package",
  $ext_offsite_package_ns => "ext-offsite-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('info');
        $w->startTag([$offsite_package_ns, "info"]);
          $w->dataElement([$offsite_package_ns, "id"], "17824b25c16eecfa");
        $w->endTag();
      $w->endTag();
      $w->startTag('extension');
        $w->emptyTag([$ext_offsite_package_ns, "preAuthenticate"]);
      $w->endTag();
      $w->dataElement('clTRID', "af09fb9fb724b3098ae0bc3dc93629d7");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  $ext_offsite_package_ns = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'info');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($offsite_package_ns, "info");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($offsite_package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('17824b25c16eecfa'));
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'extension');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($ext_offsite_package_ns, "preAuthenticate");
        $l->appendChild($c);
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('af09fb9fb724b3098ae0bc3dc93629d7'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:offsite-package' => "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"})
    current = current.add_element('command', {})
      current = current.add_element('info', {})
        current = current.add_element('offsite-package:info', {})
          current.add_element('offsite-package:id', {}).add_text("17824b25c16eecfa")
        current = current.parent
      current = current.parent
      current = current.add_element('extension', {})
        current.add_element('ext-offsite-package:preAuthenticate', {'xmlns:ext-offsite-package' => "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2"})
      current = current.parent
      current.add_element('clTRID', {}).add_text("af09fb9fb724b3098ae0bc3dc93629d7")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Syntax

KeyAttributesContentsNotes
<resData><ext-offsite-package:redirectURL>
<ext-offsite-package:redirectURL>(a URL)

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:ext-offsite-package="http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <ext-offsite-package:redirectURL>http://example.sitedesignpro.net/?hash=LUB9UNbw6jTW</ext-offsite-package:redirectURL>
    </resData>
    <trID>
      <clTRID>af09fb9fb724b3098ae0bc3dc93629d7</clTRID>
      <svTRID>test-59bea93b47bb7dd09c85f81bd9232f9f</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => 'af09fb9fb724b3098ae0bc3dc93629d7',
             'svTRID' => 'test-59bea93b47bb7dd09c85f81bd9232f9f'
           },
          'resData' => {
             'ext-offsite-package:redirectURL' => 'http://example.sitedesignpro.net/?hash=LUB9UNbw6jTW'
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:ext-offsite-package' => 'http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:ext-offsite-package] => http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => ext-offsite-package:redirectURL
              [type] => complete
              [level] => 4
              [value] => http://example.sitedesignpro.net/?hash=LUB9UNbw6jTW
          )
  
      [7] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [8] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [9] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => af09fb9fb724b3098ae0bc3dc93629d7
          )
  
      [10] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-59bea93b47bb7dd09c85f81bd9232f9f
          )
  
      [11] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [12] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [13] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).attributes["ext-offsite-package"] = "http://www.heartinternet.co.uk/whapi/ext-offsite-package-2.2"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "redirectURL"
                                                   (...).children[0].to_s = "http://example.sitedesignpro.net/?hash=LUB9UNbw6jTW"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "af09fb9fb724b3098ae0bc3dc93629d7"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-59bea93b47bb7dd09c85f81bd9232f9f"
  result.children[2].to_s = " \n"

Changing SiteDesigner Types [^Back to contents]

This allows you to upgrade a standard SiteDesigner instance to SiteDesigner Pro.

To complete the order, you will need to visit https://customer.heartinternet.co.uk/manage/pre-basket-domains.cgi

What to send

Syntax

KeyAttributesContentsNotes
<command><update>
<update><offsite-package:update>
<offsite-package:update><offsite-package:id> <offsite-package:chg>
<offsite-package:id>(text)
<offsite-package:chg><offsite-package:subtype>
<offsite-package:subtype>"pro"

Examples

XML
<?xml version="1.0"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <command>
    <update>
      <offsite-package:update>
        <offsite-package:id>d14fc1b01e9ce334</offsite-package:id>
        <offsite-package:chg>
          <offsite-package:subtype>pro</offsite-package:subtype>
        </offsite-package:chg>
      </offsite-package:update>
    </update>
    <clTRID>52bed8e0dd10b309c4a1a0ad67747b10</clTRID>
  </command>
</epp> 

Perl
[Show]
  use strict;
  use warnings;
  use XML::Writer;
  my $output="";
  my $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  my $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  my $w = new XML::Writer(
    OUTPUT=>\$output, 
    NAMESPACES=>1, 
    PREFIX_MAP=>{$namespace=>"",
  $offsite_package_ns => "offsite-package",
    },
    FORCED_NS_DECLS=>[$namespace],
  );
  $w->xmlDecl();
  $w->startTag('epp');
    $w->startTag('command');
      $w->startTag('update');
        $w->startTag([$offsite_package_ns, "update"]);
          $w->dataElement([$offsite_package_ns, "id"], "d14fc1b01e9ce334");
          $w->startTag([$offsite_package_ns, "chg"]);
            $w->dataElement([$offsite_package_ns, "subtype"], "pro");
          $w->endTag();
        $w->endTag();
      $w->endTag();
      $w->dataElement('clTRID', "52bed8e0dd10b309c4a1a0ad67747b10");
    $w->endTag();
  $w->endTag(); 
  $w->end();
PHP
[Show]
  $namespace = "urn:ietf:params:xml:ns:epp-1.0";
  $offsite_package_ns = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2";
  $doc = new DOMDocument(); $l = $doc;
  $c = $doc->createElementNS($namespace, 'epp');
  $l->appendChild($c); $l = $c;
    $c = $doc->createElementNS($namespace, 'command');
    $l->appendChild($c); $l = $c;
      $c = $doc->createElementNS($namespace, 'update');
      $l->appendChild($c); $l = $c;
        $c = $doc->createElementNS($offsite_package_ns, "update");
        $l->appendChild($c); $l = $c;
          $c = $doc->createElementNS($offsite_package_ns, "id");
          $l->appendChild($c);
          $c->appendChild($doc->createTextNode('d14fc1b01e9ce334'));
          $c = $doc->createElementNS($offsite_package_ns, "chg");
          $l->appendChild($c); $l = $c;
            $c = $doc->createElementNS($offsite_package_ns, "subtype");
            $l->appendChild($c);
            $c->appendChild($doc->createTextNode('pro'));
          $l = $l->parentNode;
        $l = $l->parentNode;
      $l = $l->parentNode;
      $c = $doc->createElementNS($namespace, 'clTRID');
      $l->appendChild($c);
      $c->appendChild($doc->createTextNode('52bed8e0dd10b309c4a1a0ad67747b10'));
    $l = $l->parentNode;
  $l = $l->parentNode; 
  $output = $doc->saveXML();
Ruby
[Show]
  output = ""
  require 'rexml/document'
  doc = REXML::Document.new
  output << '<?xml version="1.0"?>'
  whapi_top = doc.add_element("whapi")
  current = whapi_top
  whapi_top.add_namespace("urn:ietf:params:xml:ns:epp-1.0")
  current = current.add_element('epp', {'xmlns:offsite-package' => "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"})
    current = current.add_element('command', {})
      current = current.add_element('update', {})
        current = current.add_element('offsite-package:update', {})
          current.add_element('offsite-package:id', {}).add_text("d14fc1b01e9ce334")
          current = current.add_element('offsite-package:chg', {})
            current.add_element('offsite-package:subtype', {}).add_text("pro")
          current = current.parent
        current = current.parent
      current = current.parent
      current.add_element('clTRID', {}).add_text("52bed8e0dd10b309c4a1a0ad67747b10")
    current = current.parent
  current = current.parent 
  doc.write(output)

Response

Examples

XML
<?xml version='1.0'?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:offsite-package="http://www.heartinternet.co.uk/whapi/offsite-package-2.2">
  <response>
    <result code='1000'>
      <msg>Command completed successfully</msg>
    </result>
    <resData>
      <offsite-package:preBasket>
        <offsite-package:id>2dfdafdf43532</offsite-package:id>
      </offsite-package:preBasket>
    </resData>
    <trID>
      <clTRID>52bed8e0dd10b309c4a1a0ad67747b10</clTRID>
      <svTRID>test-8eee714111b6795bb26bc7ba6bd78a02</svTRID>
    </trID>
  </response>
</epp> 

Perl
[Show]
  $VAR1 = {
      'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
      'response' => {
          'trID' => {
             'clTRID' => '52bed8e0dd10b309c4a1a0ad67747b10',
             'svTRID' => 'test-8eee714111b6795bb26bc7ba6bd78a02'
           },
          'resData' => {
             'offsite-package:preBasket' => {
                      'offsite-package:id' => '2dfdafdf43532'
                    }
              },
          'result' => {
            'msg' => 'Command completed successfully',
            'code' => '1000'
             }
        },
      'xmlns:offsite-package' => 'http://www.heartinternet.co.uk/whapi/offsite-package-2.2'
    };
PHP
[Show]
  Array
  (
      [0] => Array
          (
              [tag] => epp
              [type] => open
              [level] => 1
              [attributes] => Array
                  (
                      [xmlns] => urn:ietf:params:xml:ns:epp-1.0
                      [xmlns:offsite-package] => http://www.heartinternet.co.uk/whapi/offsite-package-2.2
                  )
  
          )
  
      [1] => Array
          (
              [tag] => response
              [type] => open
              [level] => 2
          )
  
      [2] => Array
          (
              [tag] => result
              [type] => open
              [level] => 3
              [attributes] => Array
                  (
                      [code] => 1000
                  )
  
          )
  
      [3] => Array
          (
              [tag] => msg
              [type] => complete
              [level] => 4
              [value] => Command completed successfully
          )
  
      [4] => Array
          (
              [tag] => result
              [type] => close
              [level] => 3
          )
  
      [5] => Array
          (
              [tag] => resData
              [type] => open
              [level] => 3
          )
  
      [6] => Array
          (
              [tag] => offsite-package:preBasket
              [type] => open
              [level] => 4
          )
  
      [7] => Array
          (
              [tag] => offsite-package:id
              [type] => complete
              [level] => 5
              [value] => 2dfdafdf43532
          )
  
      [8] => Array
          (
              [tag] => offsite-package:preBasket
              [type] => close
              [level] => 4
          )
  
      [9] => Array
          (
              [tag] => resData
              [type] => close
              [level] => 3
          )
  
      [10] => Array
          (
              [tag] => trID
              [type] => open
              [level] => 3
          )
  
      [11] => Array
          (
              [tag] => clTRID
              [type] => complete
              [level] => 4
              [value] => 52bed8e0dd10b309c4a1a0ad67747b10
          )
  
      [12] => Array
          (
              [tag] => svTRID
              [type] => complete
              [level] => 4
              [value] => test-8eee714111b6795bb26bc7ba6bd78a02
          )
  
      [13] => Array
          (
              [tag] => trID
              [type] => close
              [level] => 3
          )
  
      [14] => Array
          (
              [tag] => response
              [type] => close
              [level] => 2
          )
  
      [15] => Array
          (
              [tag] => epp
              [type] => close
              [level] => 1
          )
  
  )
Ruby
[Show]
  # This is just a quick overview. Please see the documentation for REXML to find the best methods to access the data
  result.children[0].to_s = "<?xml version='1.0'?>"
  result.children[1].name = "epp"
               (...).attributes["offsite-package"] = "http://www.heartinternet.co.uk/whapi/offsite-package-2.2"
               (...).attributes["xmlns"] = "urn:ietf:params:xml:ns:epp-1.0"
               (...).children[0].name = "response"
                           (...).children[0].name = "result"
                                       (...).attributes["code"] = "1000"
                                       (...).children[0].name = "msg"
                                                   (...).children[0].to_s = "Command completed successfully"
                           (...).children[1].name = "resData"
                                       (...).children[0].name = "preBasket"
                                                   (...).children[0].name = "id"
                                                               (...).children[0].to_s = "2dfdafdf43532"
                           (...).children[2].name = "trID"
                                       (...).children[0].name = "clTRID"
                                                   (...).children[0].to_s = "52bed8e0dd10b309c4a1a0ad67747b10"
                                       (...).children[1].name = "svTRID"
                                                   (...).children[0].to_s = "test-8eee714111b6795bb26bc7ba6bd78a02"
  result.children[2].to_s = " \n"

SCHEMAS [^Back to contents]

In addition to the schemas described in api2.html, the following schema files are also available in this location:

Filenames [^Back to contents]

database-2.0.xsd
mailbox-2.0.xsd
offsite-package-2.2.xsd
package-2.2.xsd
server-2.2.xsd
support-2.0.xsd
ext-antivirus-2.0.xsd
ext-billing-2.0.xsd
ext-database-2.0.xsd
ext-dns-2.0.xsd
ext-mailbox-2.0.xsd
ext-offsite-package-2.2.xsd
ext-package-2.2.xsd
ext-security-2.0.xsd
ext-server-2.2.xsd
ext-support-2.0.xsd
ext-wbp-2.0.xsd

NOTES [^Back to contents]

WHAPI Error codes [^Back to contents]

In addition to the codes described in api2.html, there are the following:

Prefixes

1xxx

A hosting-package-related error

3xxx

A support database error

4xxx

A Microsoft SQL Server database provision error

5xxx

A mailbox provision error

6xxx

A dedicated server provision error

Specific error codes

The following error codes may be included in the response from the server:

1400

Hosting package does not exist

1401

There is no package type as specified

1402

The domain name is not valid

1403

The domain name is primary for the package

1404

The domain name is not attached to the package

1405

The password provided does not meet complexity requirements

1406

The welcome email specified does not exist

1420

The domain name is not available for setup

1421

The specified package type is not supported

1422

A name is required

1423

The number of MySQL databases entered is in excess of the number allowed for the server type

3404

No such question.

4401

Hosting package does not exist

4402

Database does not exist

5401

No mailbox with that address

5402

Mailbox already exists

5410

You must add the domain name first

6401

Basket not yet purchased

6410

No such server

Loading Multiple Versions of One Object or Extension [^Back to contents]

Prior to version 2.0 of all modules, it was possible to request multiple versions of an object, but only one would actually be loaded, resulting in unexpected behaviour if you tried to use a version other than the loaded one. Version 2.0 and later is designed to support loading multiple versions with no problems, and you will always get the version you request. For example, if you were to try to load:

package-1.0
package-1.2
package-2.1

...you could reliably use package-2.1 later, but if you try to use package-1.0 or package-1.2 you might get either version.

Please note that the intent is that you only load modules which your code will use, as in the example <login> frame above.

Changelog [^Back to contents]

2015-11-24 Documentation: server-2.2 [^Back to contents]

VPS purchase <preset> is preferred to <hardware> for forward compatibility.

2014-09-01 package-2.2 ext-package-2.2 [^Back to contents]

Support for setting up sites on your own fully managed server.

2014-01-28 ext-server-2.2 server-2.2 [^Back to contents]

Add support for passing a <period> during VPS upgrade (may be ignored)

2014-01-27 package-2.1 ext-package-2.1 offsite-package-2.2 ext-offsite-package-2.2 [^Back to contents]

Separate SiteGuard and StopTheHacker in <package:update>, including significant syntax changes for adding StopTheHacker.

Add support for upgrading SiteDesigner to SiteDesigner Pro

2013-05-08 offsite-package-2.1 ext-offsite-package-2.1 [^Back to contents]

Added support for creating SiteDesigner trials, listing SiteDesigner instances, and pre authenticating SiteDesigner

2012-10-30 ext-antivirus-2.0.xsd ext-billing-2.0.xsd ext-database-2.0.xsd database-2.0.xsd ext-dns-2.0.xsd ext-mailbox-2.0.xsd mailbox-2.0.xsd offsite-package-2.0.xsd ext-package-2.0.xsd package-2.0.xsd ext-security-2.0.xsd ext-server-2.0.xsd server-2.0.xsd ext-support-2.0.xsd support-2.0.xsd ext-wbp-2.0.xsd [^Back to contents]

Updates to nominally support using multiple different versions of objects/extensions during the same session.

Added a note about version conflicts and ambiguity.

2012-08-22 ext-package-1.3 [^Back to contents]

Improved error handling for pre-authenticating against disabled packages.

2012-07-12 package-1.5 ext-package-1.2 [^Back to contents]

Add support for disabling/enabling STH (for STH resellers).

2012-04-27 offsite-package-1.0 [^Back to contents]

Added support for setting up offsite packages

2012-01-12 ext-support-1.1 [^Back to contents]

<ext-support:statusPage> changed to include resolution messages.

2011-12-14 server-1.3 ext-server-1.3 [^Back to contents]

Initial VPS support added under server namespace. Various create and list calls have been updated.

Added support for VPS inspection/listing.

Added support for VPS orders and upgrades.

2011-10-26 mailbox-1.2 ext-mailbox-1.1 [^Back to contents]

Add support for purchasing and adding Blackberry services with Exchange mailboxes.

Change of request syntax for the <mailbox:update> and <mailbox:create> operations and response syntax for the <mailbox:list> operation.

2011-07-11 ext-package-1.1 [^Back to contents]

<package:info> updated to support listing mailboxes.

2011-05-31 ext-dns-1.0 [^Back to contents]

DNS management functionality added

2011-03-31 [^Back to contents]

Non-domain-related functions moved to a separate document, api2f.html

2010-11-30 database-1.1 ext-antivirus-1.0 ext-billing-1.0 ext-contact-1.0 ext-database-1.0 ext-domain-1.0 ext-mailbox-1.0 ext-host-1.0 ext-null-1.0 ext-package-1.0 ext-security-1.0 ext-server-1.0 ext-support-1.0 ext-wbp-1.0 ext-whapi-1.0 mailbox-1.1 null-1.1 package-1.4 server-1.1 support-1.3 whapi-common-1.0 [^Back to contents]

Rewritten to operate as a true EPP service. Virtually all syntax has changed, several schemas have been split or renamed.

Added <domain:info> for inspecting domains.

Added non-premium standalone mailboxes to <ext-mailbox:list> and <mailbox:info>

Added initial support for Web Builder Plus (ext-wbp)

Added initial support for personalised secure server (ext-security)

Added initial support for email anti-virus services (ext-antivirus)

Added initial support for virtual nameservers (ext-host)

Added client transaction ID (<clTRID>) support.

Added an indication of domain privacy to <domain:info>

2010-11-26 billing-1.2 [^Back to contents]

Added simple read-only billing support.

2010-11-08 [^Back to contents]

Fixed an issue with correctly specifying DS features under some circumstances.

2010-09-02 server-1.0 [^Back to contents]

Support for ordering dedicated servers via the prebasket only.

2010-08-11 database-1.0 mailbox-1.0 [^Back to contents]

Support for chargeable ordering of Microsoft SQL Server databases, premium mailboxes, and exchange mailboxes.

2010-08-11 whapi-1.1 null-1.0 package-1.3 contact-1.1 domain-1.2 support-1.2 [^Back to contents]

Changes to allow slightly more EPP-style calls, with a null object for testing/example purposes. Other minor corrections included.

Please note that this now runs on a different port by default, with a different protocol.

2010-03-26 package-1.2 [^Back to contents]

Added support for names with email addresses in <package:create> and <package:resend-welcome-email>

2009-10-30 [^Back to contents]

Added the option to update existing packages in <package:set-type>.

2009-10-08 [^Back to contents]

Added server-type to the <package:list-types> response.

2009-10-07 [^Back to contents]

Added status page retrieval support.

2009-09-29 [^Back to contents]

Added timestamps to server responses, and documentation links, to ease debugging.

2009-09-25 package-1.1 [^Back to contents]

Added <package:inspect-status>, for getting status information.

2009-09-23 support-1.1 [^Back to contents]

Added a support database interface. This includes general support for browsing by category, search, and returning the actual question/answer pairs.

2009-09-22 domain-1.1 [^Back to contents]

Added <domain:list> to list your domain names

2009-09-09 [^Back to contents]

Dropped the requirement for a <type-name> while updating web hosting package types. This was intended to be required for adding web hosting package types only.

Added clarification for instances where a request is rejected because it fails schema validation.

Added an explicit error message for when more than 2 MySQL databases are requested for a Windows package type.

2009-07-21 [^Back to contents]

Dropped the requirement for an <email-address> during web hosting package creation. This is to support resellers who have no welcome emails at all.

2009-07-13 whapi-1.0 package-1.0 contact-1.0 domain-1.0 [^Back to contents]

End of beta