get_domains_contacts

Queries the contact information for the specified domains.

Request parameters

Standard request parameters

  • action = get_domains_contacts
  • object = domain

Request attributes

Parameters within the attributes associative array are described below:

ParameterObligationDefinition/Value
domain_listRequiredAn array which lists the domain names for which to query contact information. The maximum number of domains that can be specified in a single request is 100.
active_contacts_onlyOptionalRetrieves the currently active contact information for owner, admin, billing and tech, as they are currently set on the domain. This info will be returned regardless of whether there is a pending trade in progress.
0—Returns pending contacts when a trade has been initiated.
1—Returns active contacts.

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

The attributes array includes an array of associative arrays, one for each domain queried. The associative array for each domain includes the contact set for that domain.

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

ParameterObligationDefinition/Value
contact_setAlways returnedAn associative array containing the contact information for the domain.
statusAlways returnedThe status of the contact. Possible values are:
active
pending_current_registrant
pending_new_registrant

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">GET_DOMAINS_CONTACTS</item>
        <item key="attributes">
          <dt_assoc>
            <item key="active_contacts_only">1</item>
            <item key="domain_list">
              <dt_array>
                <item key="0">example.com</item>
              </dt_array>
            </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="example.com">
              <dt_assoc>
                <item key="contact_set">
                  <dt_assoc>
                    <item key="admin">
                      <dt_assoc>
                        <item key="status">active</item>
                        <item key="first_name">Firstname</item>
                        <item key="last_name">Lastname</item>
                        <item key="org_name">OpenSRS</item>
                        <item key="address1">96 Mowat Ave</item>
                        <item key="address2"/>
                        <item key="address3"/>
                        <item key="city">Toronto</item>
                        <item key="state">ON</item>
                        <item key="country">CA</item>
                        <item key="postal_code">M6K 3M1</item>
                        <item key="email">[email protected]</item>
                        <item key="phone">+1.4165350123</item>
                        <item key="fax"/>
                      </dt_assoc>
                    </item>
                    <item key="billing">
                      <dt_assoc>
                        <item key="status">active</item>
                        <item key="first_name">Firstname</item>
                        <item key="last_name">Lastname</item>
                        <item key="org_name">OpenSRS</item>
                        <item key="address1">96 Mowat Ave</item>
                        <item key="address2"/>
                        <item key="address3"/>
                        <item key="city">Toronto</item>
                        <item key="state">ON</item>
                        <item key="country">CA</item>
                        <item key="postal_code">M6K 3M1</item>
                        <item key="email">[email protected]</item>
                        <item key="phone">+1.4165350123</item>
                        <item key="fax"/>
                      </dt_assoc>
                    </item>
                    <item key="owner">
                      <dt_assoc>
                        <item key="status">active</item>
                        <item key="first_name">Firstname</item>
                        <item key="last_name">Lastname</item>
                        <item key="org_name">OpenSRS</item>
                        <item key="address1">96 Mowat Ave</item>
                        <item key="address2"/>
                        <item key="address3"/>
                        <item key="city">Toronto</item>
                        <item key="state">ON</item>
                        <item key="country">CA</item>
                        <item key="postal_code">M6K 3M1</item>
                        <item key="email">[email protected]</item>
                        <item key="phone">+1.4165350123</item>
                        <item key="fax"/>
                      </dt_assoc>
                    </item>
                    <item key="tech">
                      <dt_assoc>
                        <item key="status">active</item>
                        <item key="first_name">Firstname</item>
                        <item key="last_name">Lastname</item>
                        <item key="org_name">OpenSRS</item>
                        <item key="address1">96 Mowat Ave</item>
                        <item key="address2"/>
                        <item key="address3"/>
                        <item key="city">Toronto</item>
                        <item key="state">ON</item>
                        <item key="country">CA</item>
                        <item key="postal_code">M6K 3M1</item>
                        <item key="email">[email protected]</item>
                        <item key="phone">+1.4165350123</item>
                        <item key="fax"/>
                      </dt_assoc>
                    </item>
                  </dt_assoc>
                </item>
              </dt_assoc>
            </item>
          </dt_assoc>
        </item>
        <item key="response_code">200</item>
        <item key="response_text">Command successful</item>
      </dt_assoc>
    </data_block>
  </body>
</OPS_envelope>