ResourcesAPI documentation

mailkit.mailinglist.edituser

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

NOTICE: The data must be Base64 encoded. Parameters are split into several branches order and existence of which MUST be preserved. There is an empty parameter after email_id which must be preserved for backwards compatibility!

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>
      </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

Branch "personal"

first_name (Base 64 encoded) = first name of recipient
last_name (Base 64 encoded) = last name of recipient
company (Base 64 encoded) = company of recipient
prefix (Base 64 encoded) = title of recipient
vocative (Base 64 encoded) = salutation of recipient
reply_to (Base 64 encoded) = e-mail address of recipient for reply to
status (Base 64 encoded) = status of recipient. Acceptable values follow, any other values will be ignored:

  • enabled
  • unknown
  • temporary
  • permanent

Branch "address"

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

Branch "custom"

custom1 (Base 64 encoded) = 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)