Last Update: 2024-03-21
Get all newsletter activity (sent, bounced, viewed, clicked) of addresses within a desired time frame.
Proposal for implementation:
<?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>
Element | Format | Description |
---|---|---|
getnewsletteractivity | ||
↳ @id | int | Optional ID of newsletter to get activity for just that newsletter |
↳ from | YYYY-mm-dd HH:ii:ss | Date/Time from which activities are to be delivered |
↳ till | YYYY-mm-dd HH:ii:ss | Date/Time till which activities are to be delivered |
↳ sent | all|none | Include sent activities in response. default=none |
↳ bounced | all|none | Include bounced activities in response. default=none |
↳ views | all|first|last|none | Include view activities in response. default=none |
↳ clicks | all|first|last|none | Include click activities in response. default=none |
↳ addressfields | Add address fields to response data | |
↳ field | varchar | address field. Possible fields see here |
↳ newsletterfields | Add newsletter fields to response data | |
↳ field | varchar | Possible 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 |
↳ jobfields | Add job fields to response data | |
↳ field | varchar | Possible fields: started, finished, recipients, planned, created, createdby |
<?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>