ResourcesAPI documentation

mailkit.mailinglist.edituser

Function mailkit.mailinglist.edituser is used to edit recipient in mailing list.

XML-RPC request must be sent in the format displayed below.

NOTICE: Data must be Base64 encoded. Parameters are split into several branches order of which MUST be preserved.

API call example:

XML

<?xml version="1.0"?>
<methodCall>
  <methodName>mailkit.mailinglist.edituser</methodName>
  <params>
    <param>
      <value>
        <int>client_id</int>
      </value>
    </param>
    <param>
      <value>
        <string>client_md5</string>
      </value>
    </param>
    <param>
      <value>
        <int>ID_user_list</int>
      </value>
    </param>
    <param>
      <value>
        <string>email_id</string>
      </value>
    </param>
    <param>
      <value>
        <boolean>keep_values</boolean>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>vocative</name>
            <value>
              <string>T3Nsb3ZlbsOt</string>
            </value>
          </member>
          <member>
            <name>prefix</name>
            <value>
              <string>VGl0dWw=</string>
            </value>
          </member>
          <member>
            <name>first_name</name>
            <value>
              <string>Sm3DqW5v</string>
            </value>
          </member>
          <member>
            <name>last_name</name>
            <value>
              <string>UMWZw61qbWVuw60=</string>
            </value>
          </member>
          <member>
            <name>status</name>
            <value>
              <string>ZW5hYmxlZA==</string>
            </value>
          </member>
          <member>
            <name>reply_to</name>
            <value>
              <string>ZXhhbXBsZUBleGFtcGxlLmN6</string>
            </value>
          </member>
          <member>
            <name>company</name>
            <value>
              <string>U3BvbGXEjW5vc3Q=</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>nick_name</name>
            <value>
              <string>UMWZZXpkw612a2E=</string>
            </value>
          </member>
          <member>
            <name>country</name>
            <value>
              <string>S3Jhag==</string>
            </value>
          </member>
          <member>
            <name>street</name>
            <value>
              <string>VWxpY2U=</string>
            </value>
          </member>
          <member>
            <name>state</name>
            <value>
              <string>WmVtxJs=</string>
            </value>
          </member>
          <member>
            <name>zip</name>
            <value>
              <string>UFPEjA==</string>
            </value>
          </member>
          <member>
            <name>city</name>
            <value>
              <string>TcSbc3Rv</string>
            </value>
          </member>
          <member>
            <name>mobile</name>
            <value>
              <string>bW9iaWw=</string>
            </value>
          </member>
          <member>
            <name>phone</name>
            <value>
              <string>VGVsZWZvbg==</string>
            </value>
          </member>
          <member>
            <name>fax</name>
            <value>
              <string>ZmF4</string>
            </value>
          </member>
          <member>
            <name>gender</name>
            <value>
              <string>Rg==</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>custom1</name>
            <value>
              <string>dmxhc3Ruw60gxI0uMQ==</string>
            </value>
          </member>
          <member>
            <name>custom25</name>
            <value>
              <string>dmxhc3Ruw60gxI0uMjU=</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

JSON

{
	"function": "mailkit.mailinglist.edituser",
	"id": "client_id",
	"md5": "client_md5",
	"parameters": {
		"ID_user_list": "123456",
		"ID_email": "123456789",
		"personal": {
			"first_name": "Sm3DqW5v",
            "last_name": "UMWZw61qbWVuw60=",
            "vocative": "T3Nsb3ZlbsOt",
            "prefix": "VGl0dWw=",
            "status": "ZW5hYmxlZA==",
			"reply_to": "ZXhhbXBsZUBleGFtcGxlLmN6",
			"company": "U3BvbGXEjW5vc3Q="
		},
		"address": {
            "zip": "UFPEjA==",
            "mobile": "bW9iaWw=",
            "fax": "ZmF4",
            "nick_name": "UMWZZXpkw612a2E=",
            "country": "S3Jhag==",
            "street": "VWxpY2U=",
            "state": "WmVtxJs=",
            "city": "TcSbc3Rv",
            "phone": "VGVsZWZvbg==",
            "gender": "Rg=="
        },
		"custom": {
			"custom1": "dmxhc3Ruw60gxI0uMQ==",
			"custom25": "dmxhc3Ruw60gxI0uMjU="
		}
	}
}

Values

client_id * = client ID can be found in your Mailkit account's menu Profile / Integration / API settings.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile / Integration / API settings.
ID_user_list * = ID of mailing list
email_id * = may contain ID of e-mail address, or e-mail address
keep_values * = (XML-RPC only) in case of updating values, it is possible to keep original values or reset them. For JSON format use an empty value to reset existing values or skip parameter to preserve current value. Supported values:

  • TRUE = preserve existing values
  • FALSE = reset current values

Branch "personal"

first_name (v Base 64) = first name of recipient
last_name (v Base 64) = last name of recipient
company (v Base 64) = company of recipient
prefix (v Base 64) = title of recipient
vocative (v Base 64) = salutation of recipient
reply_to (v Base 64) = e-mail address of recipient for reply to
status (v Base 64) = status of recipient. Possible values:

  • enabled
  • disabled
  • unknown
  • temporary
  • permanent
  • unsubscribe

Branch "address"

nick_name (v Base 64) = nick of recipient
gender (v Base 64) = gender of recipient. Possible values: male/female; m/f; muz/zena; M/F
phone (v Base 64) = phone of recipient
mobile (v Base 64) = mobile of recipient
fax (v Base 64) = fax of recipient
street (v Base 64) = address of recipient
city (v Base 64) = city of recipient
state (v Base 64) = state of recipient
country (v Base 64) = country of recipient
zip (v Base 64) = ZIP of recipient

Branch "custom"

custom1 (v Base 64) = custom field of recipient n. 1 Total nuber of custom fields is 25.

* required parameter

Successful call response:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>data</name>
            <value>
              <string>OK</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>
		

JSON

{
    "error_status": 0,
    "error": "OK",
    "ID_email": 1234567890
}

Values

data = OK = recipient data succesfully updated

Unsuccessful call response:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <string>Wrong ID_email</string>
      </value>
    </param>
  </params>
</methodResponse>
		

JSON

{
    "error": "Missing ID_mailing_list",
    "error_status": 1
}

Values

Missing ID_email = missing email ID / email address
Invalid_ID_email = invalid email ID / email address
Missing ID_mailing_list = missing or invalid mailing list ID (XML-RPC)
Invalid ID_user_list = invalid mailing list ID (JSON)
Missing ID_user_list = missing mailing list ID (JSON)