belongs_to_rsp

Determines whether domain belongs to the RSP who issued the command.

Request parameters

Standard request parameters

  • action = belongs_to_rsp
  • object = domain

Request attributes

Parameters within the attributes associative array are described below:

ParameterObligationDefinition/Value
domainRequiredThe domain to be checked.

Response parameters

Standard response parameters

  • action = reply
  • object = domain
  • is_success = Boolean 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.

Response attributes

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

ParameterObligationDefinition/Value
belongs_to_rspAlways returnedWhether the domain belongs to the RSP who issued the command.

Allowed Values:
0—Does not belong to the RSP
1—Belongs to the RSP
domain_expdateReturned when: belongs_to_rsp=1The domain's expiry date.

📘

Note

Domains not managed by OpenSRS and expired domains without grace period may cause belongs_to_rsp to report 0 and error "Unknown Domain". This means the domain will not show active in your account, however, you may still run queries on the domain and process redemption when supported.


Example

<?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="object">DOMAIN</item>
        <item key="action">BELONGS_TO_RSP</item>
        <item key="attributes">
          <dt_assoc>
            <item key="domain">example.com</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="object">DOMAIN</item>
        <item key="action">REPLY</item>
        <item key="is_success">1</item>
        <item key="attributes">
          <dt_assoc>
            <item key="belongs_to_rsp">1</item>
            <item key="domain_expdate">2023-11-01 00:49:10</item>
          </dt_assoc>
        </item>
        <item key="response_code">200</item>
        <item key="response_text">Query successful</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="object">DOMAIN</item>
        <item key="action">REPLY</item>
        <item key="is_success">1</item>
        <item key="attributes">
          <dt_assoc>
            <item key="belongs_to_rsp">0</item>
          </dt_assoc>
        </item>
        <item key="response_code">200</item>
        <item key="response_text">Query successful</item>
      </dt_assoc>
    </data_block>
  </body>
</OPS_envelope>