API: OpenSRS

OpenSRS API Guide: Domains and SSL

Welcome to the OpenSRS API guide. Here you will find comprehensive documentation regarding our domain and SSL services. We hope this guide will help you start working with OpenSRS as quickly as possible. If you have any questions or concerns, please do not hesitate to contact help@opensrs.com

Get Started

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 name
Parameter name
Definition/Value

ccp_enabled

Required

Indicates whether credit card payments are allowed for the subreseller.

  • N—No

  • Y—Yes

contact_set

Required

Subreseller’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_email

Required

The email address to which notices are sent when the subreseller's account balance falls to a predefined level.

nameservers

Optional

List of default nameservers for the subreseller.

password

Required

Password for the new subreseller account.

payment_email

Optional

The email address to which payment notices are sent.

pricing_plan

Required

The pricing plan assigned to the subreseller.

status

Required

Set the status of the account.

Allowed values are active, onhold, locked,
canceled
, and paid_only.

system_status_email

Required

The email address that will receive system
status messages.

url

Optional

The web address of the account.

username

Required

Username 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 name
Obligation
Definition/Value

reseller_id

Returned if is_success = 1

The 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'>tstewart@example.com</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">EmergencyContact@example.com</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">jdoe@example.com</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'>mbrown@example.com</item>
                        <item key='password'>changeit</item>
                        <item key='system_status_email'>rory@example.com</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>

create subreseller

Creates a new sub-reseller account.