Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Method parameters

Returns all the newsletters created within a list

  • string GetNewsletters(string accessKey, intlistID)
    • accessKey: access key obtained using the LoginFromId method
    • listID: Id of the list in which the desired newsletters are contained. Lists and corresponding IDs can be obtained calling the GetLists Method

If error code=0, the message will contain the IDs of all the newsletters in the list.

SOAP Examples

SOAP request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS">
   <soap:Header/>
   <soap:Body>
      <ws:GetNewsletters>
          <!--Use accessKey value that is returned by LoginFromId method-->
          <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey>
         <ws:listID>1</ws:listID>
      </ws:GetNewsletters>
   </soap:Body>
</soap:Envelope>
SOAP response
<?xml version="1.0" encoding="utf-8"?>
<GetNewslettersResult>
<errorCode>0</errorCode>
<errorDescription />
<list>
<listID>1</listID>
<listName>News</listName>
<newsletters>
<newsletter>
  <newsletterID>1</newsletterID>
  <subject>Sample Message (Read Me)</subject>
  <note>Review this test message for important information on how to create messages in MailUp</note>
  <creationdate>03/08/2011 12:32:31</creationdate>
</newsletter>
<newsletter>
  <newsletterID>2</newsletterID>
  <subject>Sample Message created from a Template</subject>
  <note>This message was created using one of the 400 built-in templates</note>
  <creationdate>04/08/2011 12:32:31</creationdate>
</newsletter>
<newsletter>
  <newsletterID>3</newsletterID>
  <subject>Bonnie &amp; Clyde</subject>
  <note>Bonnie &amp; Clyde</note>
  <creationdate>04/08/2011 16:36:32</creationdate>
</newsletter>
<newsletter>
  <newsletterID>4</newsletterID>
  <subject>Confirm your subscription</subject>
  <note />
  <creationdate>05/08/2011 12:32:31</creationdate>
</newsletter>
<newsletter>
  <newsletterID>5</newsletterID>
  <subject>Sample Message created from a Template(Copy)</subject>
  <note>This message was created using one of the 400 built-in templates</note>
  <creationdate>06/08/2011 12:32:31</creationdate>
</newsletter>
<newsletter>
  <newsletterID>6</newsletterID>
  <subject>Pro+va</subject>
  <note />
  <creationdate>07/11/2011 17:13:18</creationdate>
</newsletter>
</newsletters>
</list>
</GetNewslettersResult>

Code Examples

Ruby 

# Refer to https://mailup.atlassian.net/wiki/display/mailupapi/MailUp+RubyGem for gem information.
require 'mailup'
m = MailUp::Send.new('username', 'password')
m.get_newsletters
# => <GetNewslettersResult><errorCode>0</errorCode><errorDescription></errorDescription><list><listID>0</listID><listName></listName><newsletters></newsletters></list></GetNewslettersResult>"
  • No labels