DomainSetPreference
From NETIM
Release | Runtime |
---|---|
API >= 2.0 | Synchronous |
Description
Updates the settings of a domain name
StructOperationResponse domainSetPreference(string idSession, string domain, string codePref, string value)
Parameters
Format | Variable | Description | Notes |
---|---|---|---|
string (32) | idSession | Session ID | |
string (255) | domain | Domain name | |
string (50) | codePref | Setting to be modified | whois_privacy / registrar_lock / auto_renew / to_be_renewed / tag / note |
string | enable | New value of the Setting | string (1) for whois_privacy / registrar_lock / auto_renew / to_be_renewed - string (16) for tag - string (256) for note |
Return
A structure StructOperationResponse
Notes
Settings whois_privacy / registrar_lock / auto_renew are available according to the extension See Category:Tld HasWhoisPrivacy <-> whois_privacy HasRegistrarLock <-> registrar_lock HasAutorenew <-> auto_renew
Examples
PHP
<?php $clientSOAP = new SoapClient("http://URL.wsdl"); try { $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); $clientSOAP->domainSetPreference($idSession, "netim.com", "registrar_lock", "1"); $clientSOAP->domainSetPreference($idSession, "netim.com", "auto_renew", "1"); $clientSOAP->domainSetPreference($idSession, "netim.com", "to_be_renewed", "1"); $clientSOAP->domainSetPreference($idSession, "netim.com", "tag", "CUSTOMER1"); $clientSOAP->domainSetPreference($idSession, "netim.com", "note", "to be renewed"); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if(isset($idSession)) { $clientSOAP->sessionClose($idSession); } ?>
Release | Runtime |
---|---|
API > 1.0 | Asynchronous |
Description
Updates the settings of a domain name
int domainSetPreference(string idSession, string domain, string codePref, string value)
Parameters
Format | Variable | Description | Notes |
---|---|---|---|
string (32) | idSession | Session ID | |
string (255) | domain | Domain name | |
string (50) | codePref | Setting to be modified | masked_whois / registrar_lock / auto_renew / tag / note |
string | enable | New value of the Setting | string (1) for masked_whois / registrar_lock / auto_renew - string (16) for tag - string (256) for note |
Return
A tracking ID
Notes
Settings masked_whois / registrar_lock / auto_renew are available according to the extension See Category:Tld: HasWhoisPrivacy <-> masked_whois HasRegistrarLock <-> registrar_lock HasAutorenew <-> auto_renew
Examples
PHP
<?php $clientSOAP = new SoapClient("http://URL.wsdl"); try { $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); echo $clientSOAP->domainSetPreference($idSession, "netim.com", "registrar_lock", "1"); echo $clientSOAP->domainSetPreference($idSession, "netim.com", "auto_renew", "1"); echo $clientSOAP->domainSetPreference($idSession, "netim.com", "tag", "CUSTOMER1"); echo $clientSOAP->domainSetPreference($idSession, "netim.com", "note", "to be renewed"); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if(isset($idSession)) { $clientSOAP->logout($idSession); } ?>
JAVA
DRSServiceLocator service = new DRSServiceLocator(); String idSession; int trackingID; try { DRSPortType port = service.getDRSPort(); idSession = port.login("XXXX", "XXXX", "EN"); trackingID = port.domainSetPreference(idSession, "netim.com", "registrar_lock", "1"); System.out.println(trackingID); trackingID = port.domainSetPreference(idSession, "netim.com", "auto_renew", "1"); System.out.println(trackingID); trackingID = port.domainSetPreference(idSession, "netim.com", "tag", "CUSTOMER1"); System.out.println(trackingID); trackingID = port.domainSetPreference(idSession, "netim.com", "note", "to be renewed"); System.out.println(trackingID); port.logout(idSession); } catch (RemoteException re) { System.out.println(re.getMessage()); } catch (ServiceException se) { se.printStackTrace(); }