Add Contact

addcontact

Purpose

This command is used to create a new contact under an account.

Attributes

Optional Attributes

  • firstname
  • lastname
  • companyname
  • email - must be unique if creating a sub-account
  • address1
  • address2
  • city
  • state
  • postcode
  • country - two letter ISO country code
  • phonenumber
  • password2 - if creating a sub-account
  • permissions - can specify sub-account permissions eg manageproducts,managedomains
  • generalemails - set true to receive general email types
  • productemails - set true to receive product related emails
  • domainemails - set true to receive domain related emails
  • invoiceemails - set true to receive billing related emails
  • supportemails - set true to receive support ticket related emails

Example Command

$postfields = array();
$postfields["responsetype"] = "json";

$postfields["action"] = "addcontact";
$postfields["firstname"] = "Test";
$postfields["lastname"] = "User";
$postfields["email"] = "demo@whmcs.com";
$postfields["address1"] = "123 Demo Street";
$postfields["city"] = "Demo";
$postfields["state"] = "Florida";
$postfields["postcode"] = "AB123";
$postfields["country"] = "US";
$postfields["phonenumber"] = "123456789";

$result = mikrovps_SendCommand( $postfields );

Successful Response

result = success 
contactid =  xxx - the id of the new contact

Error Response

result=error
message= Client ID not found

Given Client ID is not found in the database.

result=error
message= Duplicate Email Address
Email address already exists in the database (when creating a sub-account)
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Add Cancel Request

addcancelrequest Purpose This command is used to Add Cancellation Request for a specific...

Delete Contact

deletecontact Purpose This command is used to delete a contact in the system. Attributes...

Get Clients Details

getclientsdetails Purpose This command is used to retrieve all the data held about your...

Get Clients Addons

getclientsaddons Purpose This command is used to obtain the addons associated with a client...

Get Clients Domains

getclientsdomains Purpose This command is used to get the details of all the domains a client...