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)

$clientSOAP = new SoapClient('https://URL.wsdl');

$structContact = array(
    'firstName' => 'firstName',
    'lastName' => 'lastName',
    'bodyForm' => 'IND',
    'bodyName' => '',
    'address1' => 'number and street',
    'address2' => '',
    'zipCode' => 'zipCode',
    'area' => 'area',
    'city' => 'city',
    'country' => 'country',
    'phone' => 'phone',
    'fax' => 'fax',
    'email' => 'email',
    'language' => 'EN',
    'isOwner' => 0,
    'tmName' => '',
    'tmNumber' => '',
    'tmType' => '',
    'tmDate' => '',
    'companyNumber' => '',
    'vatNumber' => '',
    'birthDate' => '',
    'birthZipCode' => '',
    'birthCity' => '',
    'birthCountry' => '',
    'idNumber' => '',
    'additional' => array()
);

try {
    $idSession = $clientSOAP->sessionOpen('XX000', 'xxxxxxxx');
    $idContact = $clientSOAP->contactCreate($idSession, $structContact);
    print_r($idContact);

} catch (SoapFault $fault) {
    echo 'Exception : ' . $fault->getMessage() . "\n";
}

if (isset($idSession)) {
    $clientSOAP->sessionClose($idSession);
}