Acting on behalf of subresellers
You can execute any of the API commands on behalf of one of your subresellers simply by adding the parameter as_subreseller to the request.
Attributes
Parameters within the attributes associative array are described below.
Parameter name | Obligation | Definition/Value |
---|---|---|
as_subreseller | Optional | The username of the subreseller on whose behalf you are submitting the command. |
Example
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">SW_REGISTER</item>
<item key="object">DOMAIN</item>
<item key="attributes">
<dt_assoc>
<item key="custom_tech_contact">0</item>
<item key="as_subreseller">subtest</item>
<item key="auto_renew">0</item>
<item key="reg_type">new</item>
<item key="reg_username">user123</item>
<item key="reg_password">changeit123</item>
<item key="domain">example.com</item>
<item key="handle">process</item>
<item key="contact_set">
<dt_assoc>
<item key="owner">
<dt_assoc>
<item key="country">US</item>
<item key="address3">Owner</item>
<item key="org_name">Example Inc.</item>
<item key="phone">+1.4165550123</item>
<item key="last_name">Ottway</item>
<item key="address2">Suite 500</item>
<item key="state">CA</item>
<item key="email">[email protected]</item>
<item key="city">SomeCity</item>
<item key="postal_code">90210</item>
<item key="fax">+1.4165550124</item>
<item key="address1">32 Oak Street</item>
<item key="first_name">Owen</item>
</dt_assoc>
</item>
<item key="admin">
<dt_assoc>
<item key="country">US</item>
<item key="address3">Admin</item>
<item key="org_name">Example Inc.</item>
<item key="phone">+1.4165550123</item>
<item key="last_name">Adams</item>
<item key="address2">Suite 100</item>
<item key="state">CA</item>
<item key="email">[email protected]</item>
<item key="city">Santa Clara</item>
<item key="postal_code">90210</item>
<item key="fax">+1.4165550125</item>
<item key="address1">32 Oak Street</item>
<item key="first_name">Adler</item>
</dt_assoc>
</item>
<item key="billing">
<dt_assoc>
<item key="country">US</item>
<item key="address3">Billing</item>
<item key="org_name">Example Inc.</item>
<item key="phone">+1.4165550123</item>
<item key="last_name">Burton</item>
<item key="address2">Suite 200</item>
<item key="state">CA</item>
<item key="email">[email protected]</item>
<item key="city">Santa Clara</item>
<item key="postal_code">90210</item>
<item key="fax">+1.4165550136</item>
<item key="address1">32 Oak Street</item>
<item key="first_name">Bill</item>
</dt_assoc>
</item>
</dt_assoc>
</item>
</dt_assoc>
</item>
<item key="custom_nameservers">1</item>
<item key="nameserver_list">
<dt_array>
<item key="0">
<dt_assoc>
<item key="sortorder">1</item>
<item key="name">ns1.systemdns.com</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="sortorder">2</item>
<item key="name">ns2.systemdns.com</item>
</dt_assoc>
</item>
<item key="2">
<dt_assoc>
<item key="sortorder">3</item>
<item key="name">ns3.systemdns.com</item>
</dt_assoc>
</item>
</dt_array>
</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="response_code">200</item>
<item key="is_success">1</item>
<item key="response_text">Domain registration successfully completed</item>
<item key="attributes">
<dt_assoc>
<item key="registration_text">Domain registration successfully completed</item>
<item key="admin_email">[email protected]</item>
<item key="registration_code">200</item>
<item key="id">281405</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated about 2 years ago