API Commands
[All Commands]

Command: Create_Contact



command Create_Contact

Create contact in Subreg DB

Input Parameters ($data):

string ssid Token from Login
array contact Data about contact
string name First name of contact
string surname Second name of contact
string org Organization name (optionally)
string street Address of contact
string city City of contact
string pc ZIP code of contact
string sp State of contact (optionally)
string cc ISO Country Code of contact
string phone Phone of contact in format +1.234567890
string fax Faxsimile of contact in format +1.234567890 (optionally)
string email Email of contact
array params Details for fred contacts (.CZ, .EE) (optionally)
string regid NIC ID
string notify_email Email for NIC notify
string vat VAT Number
string ident_type (op,passport,mpsv,ico,birthday)
string ident_number
array disclose (voice,fax,email,vat,ident,notify_email)
int force 0/1 whether to create new contact (duplicate) even if this contact already exists (optionally)

Output Responses:

string status ok | error
array data Details about your request
 
string contactid ID of new created contact

Sample:


<?php
$client 
= new SoapClient(
        
null
        array(
            
"location" => "https://PRODUCTION/soap/cmd.php",
            
"uri" => "http://PRODUCTION/soap"
            
)
        );

$params = array ( 
    
"data" => array (
        
"login" => "demo",
        
"password" => "password",
    )
);

$response $client->__call("Login",$params);

$token $response["data"]["ssid"];

unset(
$params);

$con["name"] = "Pepa";
$con["surname"] = "Novák";
$con["org"] = "domena s.r.o.";
$con["street"] = "Bořivojova 35";
$con["city"] = "Prague";
$con["cc"] = "CZ";
$con["pc"] = "130 00";
$con["phone"] = "+1.234567890";
$con["email"] = "info@domena.tld";

$params = array (
    
"data" => array (
    
"ssid" => $token,
        
"contact" => $con
    
)
);

$response $client->__call("Create_Contact",$params);

?>
INPUT: [data] => Array ( [ssid] => abcdef123 [contact] => Array ( [name] => Pepa [surname] => Novák [org] => Firma s.r.o. [street] => Bořivojova 35 [city] => Prague [cc] => CZ [pc] => 130 00 [phone] => +1.234567890 [email] => info@domena.tld ) ) OUTPUT: [status] => ok [data] => Array ( [contactid] => G-000008 )

API Manual - version from 2023-05-12 12:15:50