WS_MailUpSend.GetMessages
Allows to retrieve all non-cloned messages for each list.
Method parameters
- string GetMessages(string accessKey, intlistID)
- accessKey: access key obtained using the LoginFromId method
- listId: list identifier
Â
There is only a slight difference between GetMessages and GetNewsletter methods: GetMessages returns a response that does not include cloned messages
Â
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:GetMessages> <!--Use accessKey value that is returned by LoginFromId method--> <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9</ws:accessKey> <ws:listID>1</ws:listID> </ws:GetMessages> </soap:Body> </soap:Envelope>
The output format is exactly the same as the WS_MailUpSend.GetNewsletters, including most outer tag, which is GetNewsletterResult also for GetMessages method (not "GetMessagesResult")
SOAP response
<?xml version="1.0" encoding="utf-8"?> <GetNewslettersResult> <errorCode>0</errorCode> <errorDescription /> <list> <listID>1</listID> <listName>News</listName> <newsletters> <!-- see format of SOAP response returned by GetNewsletter method --> </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>"