ResourcesAPI documentation

mailkit.mailinglist.import

Function mailkit.mailinglist.import is used to import recipients to the mailing list.

API call example:

XML

<?xml version="1.0"?>
<methodCall>
  <methodName>mailkit.mailinglist.import</methodName>
  <params>
    <param>
      <value>
        <int>client_id</int>
      </value>
    </param>
    <param>
      <value>
        <string>client_md5</string>
      </value>
    </param>
    <param>
      <value>
        <int>mailinglist_id</int>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <struct>
                <member>
                  <name>first_name</name>
                  <value>
                    <string>first name</string>
                  </value>
                </member>
                <member>
                  <name>last_name</name>
                  <value>
                    <string>last name</string>
                  </value>
                </member>
                <member>
                  <name>email</name>
                  <value>
                    <string>example@example.cz</string>
                  </value>
                </member>
                <member>
                  <name>status</name>
                  <value>
                    <string>enabled</string>
                  </value>
                </member>
                <member>
                  <name>company</name>
                  <value>
                    <string>company</string>
                  </value>
                </member>
                <member>
                  <name>prefix</name>
                  <value>
                    <string>title</string>
                  </value>
                </member>
                <member>
                  <name>vocative</name>
                  <value>
                    <string>salutation</string>
                  </value>
                </member>
                <member>
                  <name>reply_to</name>
                  <value>
                    <string>example@example.cz</string>
                  </value>
                </member>
                <member>
                  <name>nick_name</name>
                  <value>
                    <string>nick</string>
                  </value>
                </member>
                <member>
                  <name>gender</name>
                  <value>
                    <string>gender</string>
                  </value>
                </member>
                <member>
                  <name>phone</name>
                  <value>
                    <string>12345</string>
                  </value>
                </member>
                <member>
                  <name>mobile</name>
                  <value>
                    <string>12345</string>
                  </value>
                </member>
                <member>
                  <name>fax</name>
                  <value>
                    <string>12345</string>
                  </value>
                </member>
                <member>
                  <name>street</name>
                  <value>
                    <string>address</string>
                  </value>
                </member>
                <member>
                  <name>city</name>
                  <value>
                    <string>city</string>
                  </value>
                </member>
                <member>
                  <name>state</name>
                  <value>
                    <string>state</string>
                  </value>
                </member>
                <member>
                  <name>country</name>
                  <value>
                    <string>country</string>
                  </value>
                </member>
                <member>
                  <name>zip</name>
                  <value>
                    <string>zip</string>
                  </value>
                </member>
                <member>
                  <name>custom1</name>
                  <value>
                    <string>custom field n.1</string>
                  </value>
                </member>
                <member>
                  <name>customX</name>
                  <value>
                    <string>custom field n.X</string>
                  </value>
                </member>
              </struct>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodCall>
		

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.

mailinglist_id * = ID of mailing list

first_name = first name of recipient

last_name = last name of recipient

email * = e-mail address of recipient

status = status of recipient

company = company of recipient

prefix = title of recipient

vocative = salutation of recipient

reply_to = e-mail address of recipient for reply-to

nick_name = nick of recipient

gender = gender of recipient. Possible values: male/female; m/f; muz/zena; M/F

phone = phone of recipient

mobile = mobile of recipient

fax = fax of recipient

street = address of recipient

city = city of recipient

state = state of recipient

country = country of recipient

zip = ZIP of recipient

custom1 = custom field of recipient n. 1. Total number of custom fields is 25.

* required value

Successful call response:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
    <params>
        <param>
            <value>
                <string>x/y/z</string>
            </value>
        </param>
    </params>
</methodResponse>
		

Values

  • x = total number of imported records
  • y = number of newly records
  • z = number of updated records

Unsuccessful call response:

XML

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

Values

Wrong ID_mailing_list = wrong ID of mailing list / or ID of mailing list does not exist