Update Contact Print

  • 0

updatecontact

Purpose

 

Attributes

  • contactid - The ID of the contact

Optional Attributes

  • generalemails - set to true to receive general emails
  • productemails - set to true to receive product emails
  • domainemails - set to true to receive domain emails
  • invoiceemails - set to true to receive invoice emails
  • supportemails - set to true to receive support emails
  • firstname - change the firstname
  • lastname - change the lastname
  • companyname - change the companyname
  • email - change the email address
  • address1 - change address1
  • address2 - change address2
  • city - change city
  • state - change state
  • postcode - change postcode
  • country - change country
  • phonenumber - change phonenumber
  • subaccount - enable subaccount
  • password2 - change the password
  • permissions - set permissions eg manageproducts,managedomains

Example Command

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

$postfields["action"] = "updatecontact";
$postfields["contactid"] = "1";
$postfields["generalemails"] = true;
$postfields["firstname"] = "Michael";
$postfields["phonenumber"] = "4435238375";
$postfields["subaccount"] = true;
$postfields["password2"] = "Password@124!";
$postfields["permissions"] = "manageproducts,managedomains,domains,affiliates";

$result = mikrovps_SendCommand( $postfields );

Successful Response

result=success
contactid=xxx # returned on success

Error Response

result=error
message=Contact ID not found

Given Contact ID is not found in the database.

result=error
message=Duplicate Email Address

Email address already exists in the database.


Was this answer helpful?

« Back