Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method parameters

NewProcessImportNewImportProcess(int idList, int listGUID, idGroup, string xmlDoc, string idGroups, int importType,
int mobileInputType, bool asPending, bool ConfirmEmail, bool asOptOut, bool forceOptIn,
bool replaceGroups, int idConfirmNL)


Creates a new import process for the contacts listed in the xmlFeed. 

  • idList: list identifier
  • listGuid: GUID of the list
  • xmlDoc: an XML string containing the contacts to be imported (see paragraph "XML feed" below)
  • idGroups: group identifiers separated by comma (more than a group for each list is possible)
  • importType: import type (default value=3)
  • mobileInputType: mobile number input type ((see paragraph "XML feed" below)
    • 1= include international code
    • 2= international code and phone number in two different fields
  • asPending: subscribes users as pending, if true (default value=false)
  • ConfirmEmail: sends confirmation request email (default value=false)
  • asOptOut: imports users as unsubscribed (default value=false)
  • forceOptIn: forces subscription of users (default value=false)
  • replaceGroups: replaces groups (default value=false)
  • idConfirmNL: confirmation newsletter ID (default value=0, confirmation request created automatically)

...

The XML structure for importing subscribers is shown below:

Code Block
languagehtml/xml
linenumberstrue
<subscribers>
<subscriber email="user@myprovider.com" Prefix="+001" Number="8889624587" Name="">
<campo1>first name</campo1>
<campo2>last name</campo2>
<campo3>Nweb SRL</campo3>
</subscriber>
</subscribers>

Phone numbers can be specified in two ways:

  • Single field
Code Block
languagehtml/xml
linenumberstrue
<subscriber email="user@myprovider.com" Prefix="" Number="+0018889624587" Name="">
  • Two fields
Code Block
languagehtml/xml
linenumberstrue
<subscriber email="user@myprovider.com" Prefix="+001" Number="8889624587" Name="">

Ruby Example

Code Block
languageruby
# Refer to https://mailup.atlassian.net/wiki/display/mailupapi/MailUp+RubyGem for gem information.
require 'mailup'
m = MailUp::Import.new('username', 'password', 'console_url')
m.new_import_process(:listID => 123456, :listGuid => 123456, :xmlDoc => "XML_STRING", ...)
# => <?xml version=\"1.0\" encoding=\"windows-1252\" ?><mailupMessage><mailupBody><ReturnCode>17</ReturnCode></mailupBody></mailupMessage>