Overview
Skill Level: Any
Prerequisites
The Watson Campaign Automation user account that calls the API must have Organization Administration rights.
Step-by-step
-
Syntax of the request and response XML for GetSentMailingsForList
This interface allows specification of a database or Query ID in addition to a flag to include “children”.
Operation
<GetSentMailingsForList>
Elements LIST_ID
Required ID of the database or Query for which to retrieve mailings.
 INCLUDE_CHILDREN
Optional parameter to retrieve mailings for queries based on the specified database ID.
 DATE_START
Required Starting Date in the format “mm/dd/yyyy hh:mm:ss”
 DATE_END
Required Ending Date in the format “mm/dd/yyyy hh:mm:ss”
 PRIVATE
Optional parameter to retrieve private mailings. If the API does not receive private or shared designation, the Acoustic Campaign returns both private and shared mailings.
 SHARED
Optional parameter to retrieve shared mailings.
 SCHEDULED
Optional mailing type parameter to retrieve scheduled mailings. If you do not specify a mailing type in the API, the Acoustic Campaign returns mailings of all types; the various mailing type parameters are used to limit the list to only the specified types.
 SENT
Optional Mailing Type parameter to retrieve sent mailings.
 SENDING
Optional Mailing Type parameter to retrieve mailings while sending.
 OPTIN_CONFIRMATION
Optional Mailing Type parameter to retrieve Opt-in Autoresponder mailings.
 PROFILE_CONFIRMATION
Optional Mailing Type parameter to retrieve Edit Profile Autoresponder mailings.
 AUTOMATED
Optional Mailing Type parameter to retrieve Custom Autoresponder mailings.
 CAMPAIGN_ACTIVE
Optional Mailing Type parameter to retrieve active Groups of Automated Messages.
 CAMPAIGN_COMPLETED
Optional Mailing Type parameter to retrieve completed Groups of Automated Messages.
 CAMPAIGN_CANCELLED
Optional Mailing Type parameter to retrieve canceled Groups of Automated Messages.
 CAMPAIGN_SCRAPE_TEMPLATE
Optional Mailing Type parameter to retrieve Campaign Scrape Template mailings.
 INCLUDE_TAGS
Optional parameter to return all Tags that are associated with the Sent mailing.
 EXCLUDE_ZERO_SENT
Optional parameter to exclude mailings with no contacts.
 MAILING_COUNT_ONLY
Optional parameter to return only the count of sent mailings for a specific date range.
 EXCLUDE_TEST_MAILINGS
Optional parameter that request to exclude Test Mailings. If you do not provide this element, the Acoustic Campaign includes all Test Mailings.
Example <Envelope> <Body> <GetSentMailingsForList> <DATE_START>07/25/2011 00:00:00</DATE_START> <DATE_END>09/30/201123:59:59</DATE_END> <LIST_ID>27546</LIST_ID > <INCLUDE_CHILDREN/> </GetSentMailingsForList> </Body> </Envelope>
Response
<RESULT>
Elements
SUCCESS True if successful.
 Mailing XML nodes that define the instances of the sent mailing.  ChildElement MailingId Returns the Mailing ID.   ParentTemplateId Returns the parent mailing ID for the mailing   ReportId
Returns the report ID for an instance of an automated mailing. Â Â ScheduledTS
Returns the scheduled date and time in the following format:
“mm/dd/yy hh:mm AMPM”  MailingName
Returns the mailing name. Â Â ListName
Returns the database name. Â Â ListId
Returns the database ID. Â Â UserName
Returns the user name for the mailing owner. Â Â SentTS
Returns the date/time when Acoustic Campaign sent the mailing. Â Â NumSent
Returns the number of contacts to whom Acoustic Campaign> sent the mailing. Â Â SentMailingsCount
Returns the number of sent mailings. Â Â Subject
Returns the mailing subject. Â Â Visibility
Returns visibility information about the mailing. Values are Private or Shared. Â Â QueryId
Returns the query ID if the mailing was sent to a query. Â Â QueryName
Returns the query name if the mailing was sent to a query. Â Â Tags
Returns any tags that are associated with the Sent mailing if you specified INCLUDE_TAGS in the request. Â Â Â Tag XML nodes that contain the Tags that are associated with the Sent mailing. Example 1 with standard usage <Envelope> <Body> <RESULT> <SUCCESS>TRUE</SUCCESS> <Mailing> <MailingId>5758</MailingId> <ReportId>109118</ReportId> <ScheduledTS>2011-06-14 10:54:06.0</ScheduledTS> <MailingName> <![CDATA[This is the mailingname]]> </MailingName> <ListId>27546</ListId> <QueryId>4185</QueryId> <ListName> <![CDATA[This is the databasename]]> </ListName> <QueryName> <![CDATA[This is the queryname]]> </QueryName> <UserName> John Doe</UserName> <SentTS/> <NumSent>0</NumSent> <Subject> <![CDATA[SummerSale]]> </Subject> <Visibility>Private</Visibility> </Mailing> <Mailing> <MailingId>5758</MailingId> <ReportId>109118</ReportId> <ScheduledTS>2011-06-14 10:54:06.0</ScheduledTS> <MailingName> <![CDATA[My Mailing 2]]> </MailingName> <ListName> <![CDATA[This is the databasename 2]]> </ListName> <ListId>4616</ListId> <userName>John Doe</UserName> <SentTS/> <NumSent>0</NumSent> <Subject> <![CDATA[SummerSale]]> </Subject> <Visibility>Private</Visibility> </Mailing> </RESULT> </Body> </Envelope>
Example 2 when MAILING_COUNT_ONLY parameter is used. <Envelope> <Body> <RESULT> <SUCCESS>TRUE</SUCCESS> <Mailing> <SentMailingsCount>5758</SentMailingsCount> </Mailing> </RESULT> </Body> </Envelope>