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

revoke (domain)

Removes the domain at the registry. Use this command to request a refund for a domain purchase. This call can refund/revoke only one domain at the time.

Note:

A refund can be issued for only those domains which fall within the specified grace period as defined by each registry.

Request parameters for revoke (domain)

Standard parameters

  • action = revoke
  • object = domain attributes

Attributes

Parameters within the attributes associative array are described below.

Parameter name
Obligation
Definition/Value

domain

Required

Domain to be revoked.

notes

Optional

Information relevant to action. Notes are saved to domain notes.

Response parameters for revoke (domain)

Standard parameters

  • action = reply
  • 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

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

Parameter name
Obligation
 Definition/Value

charge

Optional

Value indicating whether the reseller has been charged:

  • 0—No charge
  • 1—Indicates a Value

price

Optional

The sum of money of that the reseller is charged.

Examples for revoke (domain)

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">REVOKE</item>
                <item key="object">DOMAIN</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">example.com</item>
                        <item key="notes">this is a test</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">DOMAIN</item>
                <item key="is_success">1</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="charge">0</item>
                        <item key="price">undef</item>
                    </dt_assoc>
                </item>
                <item key="response_text">Domain example.com revoked successfully.</item>
                <item key="response_code">200</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="is_success">0</item>
                <item key="response_text">Domain not found.</item>
                <item key="response_code">461</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

revoke (domain)

Removes the domain at the registry. Use this command to request a refund for a domain purchase. This call can refund/revoke only one domain at the time.