Description
Changing contact data
Query
contact/update
List Variable
| Name | Data Type | Required/Optional | Description |
|---|---|---|---|
| contactid | Integer(11) | One Of | ID given when contact was generated; |
| nickhandle | Varchar(255) | One Of | Nickhandle given when contact was generated; |
| fname | String(32) | Optional | First name |
| lname | String(32) | Optional | Last name |
| String(63) | Optional | Email address | |
| company | String(32) | Optional | Company name, or type "personal" |
| address | String(255) | Optional | Address |
| address2 | String(255) | Optional | Address 2 |
| address3 | String(255) | Optional | Address3 |
| city | String(32) | Optional | City name |
| province | String(32) | Optional | Province/State |
| phone | String(14) | Optional | Phone number with country code, without "+" |
| fax | String(14) | Optional | Fax number with country code, without "+" |
| country | String(3) | Optional | Country code, ie: ID, MY, SG, AU |
| postal_code | String(8) | Optional | Zip code |
Example
$post["username"] = 'apiusername';
$post["password"] = hash('sha256','apipassword');
$post["contactid"] = '13422'
$post["fname"] = 'Jhon'
$url = 'http://[reseller url ]/api/contact/update';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);
Example Response
Succeed:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <epp> <result> <resultCode>1000</resultCode> <resultMsg>Command completed successfully</resultMsg> </result> </epp>
Failed:
<?xml version="1.0" encoding="UTF-8"?> <epp> <result> <resultCode>1001</resultCode> <resultMsg>Respon Failed</resultMsg> </result> </epp>