Last Update: 2024-03-21

Get Newsletter Activity

Get all newsletter activity (sent, bounced, viewed, clicked) of addresses within a desired time frame.

Proposal for implementation:

  • A request every 5 minutes to get all current activtiy (sent=all, bounced=all, views=first, clicks=first).
  • Another periodical request (once an hour or a day may be enough) to get all delayed bounced of the last 3 days. Reason is, that we only store the sent-datetime and a delayed bounced will be stored with that.

Info: All activity of all customers is returend! Currently there is no way of getting the activity of just one customer.

Request:

<?xml version="1.0" encoding="utf-8"?>
<getnewsletteractivity id="">
  
  <from>2020-11-30 00:00:00</from>
  <till>2020-11-30 08:00:00</till>
  
  <sent>all</sent>
  <bounced>all</bounced>
  <views>first</views>
  <clicks>first</clicks>
  
  <addressfields>
    <field>email</field>
    <field>attribute1</field>
    ...
  </addressfields>
  
  <newsletterfields>
    <field>customerid</field>
    <field>templateid</field>
    <field>subject</field>
    ...
  </newsletterfields>
  
  <jobfields>
    <field>started</field>
    <field>finished</field>
    <field with="list-externalid,list-name">recipients</field>
    <field>planned</field>
    <field>created</field>
    <field>createdby</field>
  </jobfields>
  
  <page>1</page>
  <pagesize>1000</pagesize>
  
</getnewsletteractivity>
Description of XML-Tags:
Element Format Description
getnewsletteractivity
↳ @idintOptional ID of newsletter to get activity for just that newsletter
↳ fromYYYY-mm-dd HH:ii:ssDate/Time from which activities are to be delivered
↳ tillYYYY-mm-dd HH:ii:ssDate/Time till which activities are to be delivered
↳ sentall|noneInclude sent activities in response. default=none
↳ bouncedall|noneInclude bounced activities in response. default=none
↳ viewsall|first|last|noneInclude view activities in response. default=none
↳ clicksall|first|last|noneInclude click activities in response. default=none
↳ addressfieldsAdd address fields to response data
  ↳ fieldvarcharaddress field. Possible fields see here
↳ newsletterfieldsAdd newsletter fields to response data
  ↳ fieldvarcharPossible fields: externalid, customerid, templateid, snipplets, language, fromemail, fromname, replyto, subject, title, titleinternal, preheader, header, footer, custom1, custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9, custom10
↳ jobfieldsAdd job fields to response data
  ↳ fieldvarcharPossible fields: started, finished, recipients, planned, created, createdby

Response:

<?xml version="1.0" encoding="utf-8"?>
<response>
  <code>2000</code>
  <description><![CDATA[OK]]></description>
  <data>
  
    <!-- If activity is sent //-->
    <sent id="12345">
      <datetime>2020-12-01 12:00:00</datetime>
      <previewurl>https://...</previewurl>            
      <address id="12345">
        <email><![CDATA[demo@eyepin.com]]></email>
        <attribute1><![CDATA[abcd1234]]></attribute12>
      </address>
      <newsletter id="12345">
        <customerid>12345</customerid>
        <templateid>12345</templateid>
        <subject><![CDATA[Subject of newsletter]]></subject>
      </newsletter>
      <job id="12345">
        <started>2020-12-09 09:00:00</started>
        <finished>2020-12-09 09:10:00</finished>
        <recipients type="filter"> <!-- type "all", "filter" (=static or dynamic lists), "addresses" (single adresses) //-->
          <recipient id="12345">
            <name>Name of list</name>
            <externalid>1234</externalid> <!-- external ID of list //-->
          </recipient>
        </recipients>
        <planned>1000</planned>
        <created>2020-12-09 09:00:00</created>
        <createdby></createdby>
      </job>
    </sent>
    
    <!-- If activity is a bounce //-->
    <bounced id="12345">
      <datetime>2020-12-01 12:00:00</datetime>
      <code>550</code>
      <address id="12345">...</address>
      <newsletter id="12345">...</newsletter>
      <job id="12345">...</job>
    </bounced>
    
    <!-- If activity is a view //-->
    <view id="12345">
      <datetime>2020-12-01 12:01:00</datetime>
      <address id="12345">...</address>
      <newsletter id="12345">...</newsletter>
      <job id="12345">...</job>
    </view>
    
    <!-- If activity is a click //-->
    <click id="12345">
      <datetime>2020-12-01 12:01:00</datetime>
      <address id="12345">...</address>
      <newsletter id="12345">...</newsletter>
      <job id="12345">...</job>
    </click>
    
    ...
    
  </data>
  <pagination>
    <page>1</page>
    <pagesize>1000</pagesize>
    <prev/>
    <next>2</next>
    <last>2</last>
    <numrecords>1500</numrecords>
  </pagination>
</response>
Für Rückfragen stehen wir Ihnen jederzeit gerne unter support@eyepin.com zur Verfügung.