create subreseller

Creates a new sub-reseller account.

Request parameters for create subreseller

Standard parameters

  • action = create
  • object = subreseller attributes

Attributes

Parameters within the attributes associative array are described below.

Parameter nameParameter nameDefinition/Value
ccp_enabledRequiredIndicates whether credit card payments are allowed for the subreseller.

N—No

Y—Yes
contact_setRequiredSubreseller’s contact information.

The admin contact for a subreseller is the Emergency Contact, which is not the same as a domain admin contact. The following values are required for the subreseller admin contact: first_name, last_name, org_name, phone, and email.

For tech contact, you can include any of the fields explained in the contact_set section;
however, you must include first_name,
last_name, org_name, address1, city, phone, and email. If country is Canada or U.S, you must also include the state and postal code parameters.
low_balance_emailRequiredThe email address to which notices are sent when the subreseller's account balance falls to a predefined level.
nameserversOptionalList of default nameservers for the subreseller.
passwordRequiredPassword for the new subreseller account.
payment_emailOptionalThe email address to which payment notices are sent.
pricing_planRequiredThe pricing plan assigned to the subreseller.
statusRequiredSet the status of the account.

Allowed values are active, onhold, locked,
canceled
, and paid_only.
system_status_emailRequiredThe email address that will receive system
status messages.
urlOptionalThe web address of the account.
usernameRequiredUsername for the new subreseller.

Response parameters for create subreseller

Standard parameters

  • action = reply
  • is_success = a Boolean is returned, indicating success or failure of the request
  • response_code = response code indicating outcome of the request
  • response_text = message describing the outcome of the request

Attributes

If the request is successful, the attributes associative array may include the
following:

Parameter nameObligationDefinition/Value
reseller_idReturned if is_success = 1The ID of the newly created subreseller.

Examples for create subreseller

Request

<?xml version=’1.0’ encoding=’UTF-8’ standalone=’no’ ?>
<!DOCTYPE OPS_envelope SYSTEM ’ops.dtd’>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key='protocol'>XCP</item>
                <item key='action'>CREATE</item>
                <item key='object'>SUBRESELLER</item>
                <item key='attributes'>
                    <dt_assoc>
                        <item key='url'>testurl.com</item>
                        <item key='nameservers'>
                            <dt_assoc>
                                <item key='fqdn1'>ns1.systemdns.com</item>
                                <item key='fqdn2'>ns2.systemdns.com</item>
                            </dt_assoc>
                        </item>
                        <item key='payment_email'>[email protected]</item>
                        <item key='pricing_plan'>gold</item>
                        <item key='status'>active</item>
                        <item key='username'>sub1240929148892</item>
                        <item key='contact_set'>
                            <dt_assoc>
                                <item key="admin">
                                    <dt_assoc>
                                        <item
                                            key="email">[email protected]</item>
                                        <item key="phone">+1.4165551123x333</item>
                                        <item key="phone2"></item>
                                        <item key="first_name">John</item>
                                        <item key="last_name">Doe</item>
                                    </dt_assoc>
                                </item>
                                <item key="tech">
                                    <dt_assoc>
                                        <item key="org_name">Sub Reseller Company Inc.</item>
                                        <item key="first_name">John</item>
                                        <item key="last_name">Doe</item>
                                        <item key="title">CEO</item>
                                        <item key="phone">+1.4165551122x333</item>
                                        <item key="fax"></item>
                                        <item key="email">[email protected]</item>
                                        <item key="address1">55 Reseller Ave</item>
                                        <item key="address2">Suite 99</item>
                                        <item key="address3"></item>
                                        <item key="city">New York</item>
                                        <item key="state">NY</item>
                                        <item key="postal_code">70218</item>
                                        <item key="country">US</item>
                                    </dt_assoc>
                                </item>
                            </dt_assoc>
                        </item>
                        <item key='ccp_enabled'>n</item>
                        <item key='low_balance_email'>[email protected]</item>
                        <item key='password'>changeit</item>
                        <item key='system_status_email'>[email protected]</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Response

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">SUBRESELLER</item>
                <item key="response_text">Sub-Reseller sub1240929148892 successfully created</item>
                <item key="response_code">200</item>
                <item key="is_success">1</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="reseller_id">9782</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>