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

Renew (domain)

Renews a domain and allows you to set the auto-renewal flag on a domain.

Helpful Links

Request parameters for renew (domain)

Standard parameters

  • action = renew
  • object = domain
  • registrant_ip = valid IP address of the registrant (optional)

Attributes

Parameters within the attributes associative array are described below.

Parameter name
Obligation
Definition/Value

affiliate_id

Optional

ID that allows RSP's to track orders coming through various affiliates.

auto_renew

Optional

A flag indicating whether the domain should be set to auto-renew.

  • 0—Not set to auto-renew

  • 1—Set to auto-renew

Please note: Registry premium domains cannot be set to auto-renew.

currentexpirationyear

Required

The domain's current expiration year in the format YYYY; must match the data in the registry.

domain

Required

The name of the domain to be renewed. Domain must be registered, and must exist in both OpenSRS and the appropriate registry.

f_parkp

Optional

Enables the Parked Pages Program. When the Parked Pages Program is enabled, a customized page containing contextual ads is displayed. The ads generate revenue whenever a visitor clicks on one of the links, and that revenue is shared with you, the reseller.

Important: Enabling Parked Pages changes the nameservers of that domain, and any existing website will not display.

Parked Pages functionality is available for these TLDs: .COM, .NET, .ORG, .INFO, .BIZ, .MOBI, .NAME, .ASIA, .BE, .BZ, .CA, .CC, .CO, .EU, .IN, .ME, .NL, .TV, .UK, .US, .WS and .XXX.

  • Y—Enable Parked Pages for the domain

  • N—Do not enable Parked Pages for the domain

If a reseller has opted out of Parked Pages, the default value (N) is used, even if Y is submitted.

handle

Required

Instructions for the processing of the order. (Overrides the RSP's 'process immediately' settings.).

  • save—Pend the order for the RSP's later approval

  • process—Process the order immediately

period

Required

The renewal period, from 1 to 10 years. (May not exceed 10 years.)

premium_price_to_verify

Required for registry premium domain renewals.

Submits the premium domain price and verifies that it is the same as the list price. If the submitted price does not match the Tucows list price, the command will fail.

Allowed value is the price for the premium domain, in the format nnn.nn.

Response parameters for renew (domain)

Standard parameters

  • action = renew
  • object = domain
  • 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

Parameters within the attributes associative array are described below.

Parameter name
Obligation
Definition/Value

admin_email

Returned if
is_success = true

The email address of the administrative contact for the domain.

auto_renew

Returned if
is_success = true

A flag indicating whether the domain is set to auto-renew.

  • 0—Not set to auto-renew

  • 1—Set to auto-renew

id

Returned if
is_success = true and order is not queued

The domain ID. If queue_request_id is returned, id is not returned.

order_id

Returned if
is_success = true

The order ID of the renewal.

queue_request_id

Returned if
is_success = true and order is queued

The ID of the request as it occurs within the queue. Later, if you want to renew the order from the queue, you'll need this ID.

If queue_request_id is returned, id is not returned.

registration expiration date

Returned if
is_success = true

The domain's current expiration year.

Response codes

Response code
Response Text
Explanation

200

Command completed successfully

Success response.

480

Renew capability is not enabled for domain.tv

Renewals are not yet supported for this TLD.

465

Domain already renewed

Domain has already been successfully renewed, with the current expiration year matching the year provided by the user.

541

Invalid attribute value

Domain's current expiration year in registry doesn't match the year provided by user.

Note:

When a renew operation fails, the reseller receives a message indicating which domain failed to be renewed. This message is only sent once in 24 hours, regardless of how many renewals failed within this period.

Examples for renew (domain)

Standard domain renewal:

<?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">renew</item>
                <item key="object">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="auto_renew">1</item>
                        <item key="f_parkp">Y</item>
                        <item key="handle">process</item>
                        <item key="domain">example.com</item>
                        <item key="currentexpirationyear">2015</item>
                        <item key="period">1</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
<?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">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="registration expiration date">2015-01-08
 15:35:00</item>
                        <item key="auto_renew">1</item>
                        <item key="admin_email">admin1@example.com</item>
                        <item key="id">3212624</item>
                        <item key="order_id">3511417</item>
                    </dt_assoc>
                </item>
                <item key="response_text">Command completed successfully</item>
                <item key="is_success">1</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Registry premium domain renewal:

<?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">renew</item>
                <item key="object">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="f_parkp">Y</item>
                        <item key="handle">process</item>
                        <item key="domain">example.com</item>
                        <item key="currentexpirationyear">2018</item>
                        <item key="premium_price_to_verify">5500.18</item>
                        <item key="period">1</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
<?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">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="registration expiration date">2018-01-08
 15:35:00</item>
                        <item key="auto_renew">0</item>
                        <item key="admin_email">admin1@example.com</item>
                        <item key="id">3212624</item>
                        <item key="order_id">3511417</item>
                    </dt_assoc>
                </item>
                <item key="response_text">Command completed successfully</item>
                <item key="is_success">1</item>
                <item key="response_code">200</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Renew (domain)


Renews a domain and allows you to set the auto-renewal flag on a domain.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.