Create new contact

				
					string contactCreate(string idSession, StructContact datas)
				
			

Create a new contact to be used with domain names or any other service.

REQUIRED


  • idSession string (32)
    Session ID.

  • datas object (StructContact)
    Contact information as StructContact object

The ID of the new contact – String (12)

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl"); 
$structContact = array(); 
$structContact["firstName"] = "firstName"; 
$structContact["lastName"] = "lastName"; 
$structContact["bodyForm"] = "IND"; 
$structContact["bodyName"] = ""; 
$structContact["address1"] = "number and street"; 
$structContact["address2"] = ""; 
$structContact["zipCode"] = "zipCode"; 
$structContact["area"] = "area"; 
$structContact["city"] = "city"; 
$structContact["country"] = "country";       
$structContact["phone"] = "phone"; 
$structContact["fax"] = "fax"; 
$structContact["email"] = "email"; 
$structContact["language"] = "EN"; 
$structContact["isOwner"] = 0; 
$structContact["tmName"] = ""; 
$structContact["tmNumber"] = ""; 
$structContact["tmType"] = ""; 
$structContact["tmDate"] = ""; 
$structContact["companyNumber"] = ""; 
$structContact["vatNumber"] = ""; 
$structContact["birthDate"] = ""; 
$structContact["birthZipCode"] = ""; 
$structContact["birthCity"] = ""; 
$structContact["birthCountry"] = ""; 
$structContact["idNumber"] = ""; 
$structContact["additional"] = array(); 
 
try 
{ 
      $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); 
      $idContact = $clientSOAP->contactCreate($idSession, $structContact);
 
      echo($idContact); 
} 
catch(SoapFault $fault) 
{ 
      echo "Exception : " .$fault->getMessage(). "\n"; 
} 
 
if (isset($idSession)) 
{ 
      $clientSOAP->sessionClose($idSession); 
} 
?>