The Publishing APIs allow you to create and share a newsletter via email. Newsletter content may originate from previously saved searches, stories added to folders, text and content marked up with HTML, or any combination of the three. Upload and add images to brand your newsletter with Art APIs. Then publish the newsletter by request or configure a schedule to deliver the newsletter to a list of email addresses.
The list of available APIs is established for each user by the Acquire Media Administrator. (Some documented API may not be available for your use.)
The basic steps to create the newsletter and set up its elements are:
The newsletter/create API request includes the required parameters name and title. The name is for reference only, whereas the title appears at the beginning of your newsletter and is shown in the email subject line.
https://secure.newsedge.com/opensapi/20/newsletter/create?session=935DA0B364E9E130F0EC3827FC3CCC9C&name=Industry+Update&title=Pharmaceutical+Industry+Update
<opens-api>
<status>OK</status>
<newsletter>2104</newsletter>
</opens-api>
When the newsletter is published, the current date is shown in the email. A number of different options are available to customize the newsletter date, from where the date is displayed, to how the date is formatted.
By default, the date appears on the same line as the newsletter title, aligned at the right margin, and formatted as YYYYMMDD, e.g. 20190208. In this example, by using the optional parameter dateLocation with the newsletter/update API, the date is set to appear on the line following the title. Appending a second optional parameter dateFormat, set the date format value with necessary punctuation, e.g. forward slash (/), pipe-delimiter (|), hyphen (-), or comma (,), to modify the format of the date. In this example, the date will be changed to display as February 8, 2019.
<%a> - Day of the week written in short form, e.g. Mon, Tue, Wed, etc.
<%A> - Day of the week written in long form, e.g. Monday, Tuesday, Wednesday, etc.
<%_m> - Month expressed in single digit numeric form, e.g. 1 for January, 2 for February, ..., through to 12 for December.
<%m> - Month expressed in double digit numeric form, e.g. 01 for January, 02 for February, ..., through to 12 for December.
<%b> - Month written in short form, e.g. Jan, Feb, Mar, etc.
<%B> - Month written in long form, e.g. January, February, March, etc.
<%e> - Day of month expressed in single digit numeric form, e.g. 1, 2, 3, ..., 30, 31.
<%d> - Day of month expressed in double digits numeric form, e.g. 01, 02, 03, ..., 30, 31.
<%ord> - Include ordinal after the day of month, e.g. st after the 1st, nd after the 2nd, etc.
<%y> - Year in double digit numeric form, e.g. 18 for 2018, 19 for 2019, etc.
<%Y> - Year in four digit numeric form, e.g. 2018, 2019, etc.
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&dateLocation=FOLLOW&dateFormat=<%B>%20<%e>,%20<%Y>
<opens-api> <status>OK</status> <newsletter>2104</newsletter> </opens-api>
At any time, use the newsletter/info request, with the newsletter parameter and the newsletter identifier returned from the newsletter/create request, to review the set up of your newsletter.
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>OK</status>
<newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="HEADLINE" storyFormat="BRIEF" level="USER" permission="WRITE">
<topArt id="" name="" link=""/>
<title>Pharmaceutical Industry Update</title>
<dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
<includePagetop>TRUE</includePagetop>
<dateSubject>TRUE</dateSubject>
<introduction/>
<tocComment/>
<lastExecTime/>
<sections count="0"></sections>
<schedules count="0"></schedules>
<bottomArt id="" name="" link=""/>
<footer/>
</newsletter>
</opens-api>
A brief introduction at the beginning of the newsletter can be used to highlight important articles, add an announcement, or provide your contact information to readers. The introduction text may be up to 2,500 characters long and should be URL encoded.
In this example, use the newsletter/update with the optional parameter introduction to add the introductory text.
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827F&newsletter=2104&introduction=%3Cp%3EIn+the+newsletter+today+are+some+top+stories+about+our+competitors+and+their+new+products+at+this+year%27s+annual+trade+show.+%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3EIf+you+have+any+news+to+share+with+the+rest+of+the+company%2C+please+forward+your+items+to+Jane+Doe%2C+%3Ca+href%3D%22mailto%3Ajdoe%40mycompany.com%3Fsubject%3DPharmaceutical%2520News%2520Update%22%3Ejdoe%40mycompany.com%3C%2Fa%3E.%3C%2Fp%3E
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827F&newsletter=2104&tocFormat=SECTION&storyFormat=HEADLINE
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api> <status>OK</status> <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"> <topArt id="" name="" link=""/> <title>Pharmaceutical Industry Update</title> <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat> <includePagetop>TRUE</includePagetop> <dateSubject>TRUE</dateSubject> <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p> <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction> <tocComment/> <lastExecTime/> <sections count="0"></sections> <schedules count="0"></schedules> <bottomArt id="" name="" link=""/> <footer/> </newsletter> </opens-api>
Each section of the newsletter can be populated by any one of these three different source types:
The first two source types populates a newsletter section with headline contents. The HTML option allows you to add informational content, such as an announcement, information and links to industry resources that may be of interest to your readers, etc.
In the following examples, three newsletter sections will be added. The first section will link to stories resulting from a saved search. The second section will link to stories saved to a folder. Finally, in the last section, the section will be used to display a message for the newsletter readers.
Submit a request with the savedsearch/list API to retrieve available saved searches.
https://secure.newsedge.com/opensapi/20/savedsearch/list?session=935DA0B364E9E130F0EC3827FC3CCC9C
<opens-api>
<status>OK</status>
<savedsearches>
<savedsearch ss="13819" owner="API User" level="PERSONAL" name="Drug Trials" permission="WRITE"/>
<savedsearch ss="13821" owner="API User" level="PERSONAL" name="Patent and Market News" permission="WRITE"/>
<savedsearch ss="13822" owner="API User" level="PERSONAL" name="Weekly Pfizer Report" permission="WRITE"/>
. . .
</savedsearches>
</opens-api>
To add a newsletter section, use the newsletter/addsection along with parameters to name the section, define the dataSourceType as one of the three content options, and the requisite optional parameter based on the data type. In this example, the first section in our newsletter will get its content from a saved search.
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&name=Recent%20Patent%20News&dataSourceType=SEARCH&search=13821
<opens-api>
<status>OK</status>
<sectionID>3455</sectionID>
</opens-api>
Once the section is created and content linked, consider other section configurations, e.g. the number of headlines to display defaults to 10, should there be more or fewer headlines? When there are no results from the search, the newsletter omits the section, should the section be included even when no results are found? Do you want to add a section comment. Review the optional parameters for newsletter/updatesection to determine whether to customize further.
In this example, the number of headlines will be changed to 15 by using the newsletter/updatesection API and the optional parameter storyLimit.
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3455&storyLimit=15
<opens-api> <status>OK</status> </opens-api>
Use the newsletter/getsection API to review the section details.
https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3455
<opens-api> <status>OK</status> <section id="3455" order="1" name="Recent Patent News" storyLimit="15" dataSourceType="SEARCH" storyfolder="" savedsearch="13821" sectionHtml="" comment="" storeOnSend="FALSE" dataSourceName="Patent and Market News" sendEmptySection="FALSE" emptySectionMessage=""/> </opens-api>
For the next section of the newsletter, the content will come from a story folder. Use the storyfolder/list API to retrieve the list of folders.
https://secure.newsedge.com/opensapi/20/storyfolder/list?session=935DA0B364E9E130F0EC3827FC3CCC9C
<opens-api>
<status>OK</status>
<storyfolders count="4">
<storyfolder id="17786" order="3" count="0" sharing="" name="Industry News" description="Industry News" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="RANK"/>
<storyfolder id="17791" order="2" count="0" sharing="" name="My Stories" description="Stories for my homepage" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="PUBDATE"/>
<storyfolder id="17785" order="1" count="0" sharing="" name="My Stories manual fill TEST" description="" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="DATEADDED"/>
</storyfolders>
</opens-api>
From the folder results above, the new section will be linked to the Industry News folder contents, ID 17786. Using the newsletter/addsection API, include parameters dataSourceType with value FOLDER and this time, add the optional parameter folder with the ID value.
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=9E10D3DB0DE88EB80530C8578EF261AF&newsletter=2104&name=Industry%20News&dataSourceType=FOLDER&folder=17786
<opens-api> <status>OK</status> <sectionID>3456</sectionID> </opens-api>
Folders contain selected stories and only the stories with a status of ACTIVE will be published in the newsletter. To avoid publishing the same folder articles in the next edition, use the optional parameter storeOnSend with the newsletter/updatesection API to change the story status to STORED after publication.
To learn more about story status, see the storyfolder/updatestory API optional parameter status.
In this example, the section will display up to 15 ACTIVE stories from the folder and after the newsletter is published, the status for published stories will be changed to STORED.
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3456&storeOnSend=TRUE&storyLimit=15
<opens-api> <status>OK</status> </opens-api>
Use the newsletter/getsection API to review the section details.
https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3456
<opens-api> <status>OK</status> <section id="3456" order="2" name="Industry News" storyLimit="15" dataSourceType="FOLDER" storyfolder="17778" savedsearch="" sectionHtml="" comment="" storeOnSend="TRUE" dataSourceName="Industry News" sendEmptySection="FALSE" emptySectionMessage=""/> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3456&order=1
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api> <status>OK</status> <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"> <topArt id="" name="" link=""/> <title>Pharmaceutical Industry Update</title> <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat> <includePagetop>TRUE</includePagetop> <dateSubject>TRUE</dateSubject> <introduction> <p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p> <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p> </introduction> <tocComment/> <lastExecTime/> <sections count="2"> <section id="3456"/> <section id="3455"/> </sections> <schedules count="0"></schedules> <bottomArt id="" name="" link=""/> <footer/> </newsletter> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&name=What's%20New%20at%20Our%20Company&dataSourceType=HTML
<opens-api> <status>OK</status> <sectionID>3467</sectionID> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3467&dataSourceType=html&html=%3Ctable%20width%3D%22100%25%22%20bgcolor%3D%22%23cccccc%22%20style%3D%22font-family%3Aarial%3B%20font-size%3A12px%22%3E%3Ctr%3E%3Ctd%20colspan%3D%222%22%3E%3Cb%3EJoin%20us%20at%20the%20following%20trade%20shows%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3Ctr%3E%3Ctd%20width%3D%2225%25%22%3EMay%201%2C%202019%2C%20Miami%2C%20FL%3C%2Ftd%3E%3Ctd%20width%3D%2275%25%22%3E%3Cb%3EBiotech%20Industry%20Show%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3Ctr%3E%3Ctd%20width%3D%2225%25%22%3EMay%2015%2C%202019%2C%20London%2C%20UK%3C%2Ftd%3E%3Ctd%20width%3D%2275%25%22%3E%3Cb%3EPharma%20CI%20Show%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3C%2Ftable%3E
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3467
<opens-api> <status>OK</status> <section id="3467" order="4" name="What's New at Our Company" storyLimit="10" dataSourceType="HTML" storyfolder="" savedsearch="" sectionHtml="<table width="100%" bgcolor="#cccccc" style="font-family:arial; font-size:12px"><tr><td colspan="2"><b>Join us at the following trade shows</b></td></tr> <tr><td width="25%">May 1, 2019, Miami, FL</td><td width="75%"><b>Biotech Industry Show</b></td></tr> <tr><td width="25%">May 15, 2019, London, UK</td><td width="75%"><b>Pharma CI Show</b></td></tr> </table>" comment="" storeOnSend="FALSE" dataSourceName="" sendEmptySection="FALSE" emptySectionMessage=""/> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3467&order=2
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api> <status>OK</status> <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"> <topArt id="" name="" link=""/> <title>Pharmaceutical Industry Update</title> <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat> <includePagetop>TRUE</includePagetop> <dateSubject>TRUE</dateSubject> <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p> <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction> <tocComment/> <lastExecTime/> <sections count="4"> <section id="3456"/> <section id="3467"/> <section id="3455"/> <section id="3458"/> </sections> <schedules count="0"></schedules> <bottomArt id="" name="" link=""/> <footer/> </newsletter> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/deletesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104§ion=3458
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/preview?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>PENDING</status>
<key>32966_20190501154206</key>
</opens-api>
Use the newsletter/checkpreview API with the key from the previous response to obtain a URL. The URL returns an HTML preview of your newsletter as it would look when emailed to your newsletter recipients.
After previewing the newsletter, you may decide to modify the newsletter using newsletter/update or newsletter/updatesection. If you wish to add some images to the top of the newsletter, or at the end, you will want to continue to the next set of examples for adding artwork. If you do not wish to add any artwork, skip to the example further down to learn how to add newsletter recipients.
https://secure.newsedge.com/opensapi/20/newsletter/checkpreview?session=935DA0B364E9E130F0EC3827FC3CCC9C&key=32966_20190501154206
<opens-api>
<status>OK</status>
<url>https://secure.newsedge.com/newsletterpreview/newsletter_32966_20190501154206.html</url>
</opens-api>
Add visual interest to your newsletter by including an image at the beginning or end of the newsletter, as part of the introduction or footer, or include an image with the HTML-defined sections. The Art APIs allow you to upload, manage and delete images. Once the art is uploaded, use the newsletter/addtopart or newsletter/addbottomart to include images as the newsletter masthead or at the end of your newsletter. Or use the optional parameters with the newsletter/update and newsletter/updatesection APIs to link the images with the introduction, footer or section(s).
Use the art/upload API with the parameter name to create a named image and to upload the image for use with your newsletter. You will want to use an HTTP Post command to upload the image.
The returned results is a unique identifier artId that is to be used with other newsletter API calls link the image to the newsletter. The artLink URL can be used to preview the image and is embedded in the newsletter as the image source.
https://secure.newsedge.com/opensapi/20/art/upload?session=935DA0B364E9E130F0EC3827FC3CCC9C&name=Globe%20with%20dotted%20overlay
<?xml version="1.0" encoding="UTF-8"?>
<opens-api>
<status>OK</status>
<artId>868</artId>
<artLink>https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg</artLink>
</opens-api>
https://secure.newsedge.com/opensapi/20/art/list?session=935DA0B364E9E130F0EC3827FC3CCC9C
<opens-api> <status>OK</status> <artList> <art id="868" name="Globe with dotted overlay" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg" desc="Sample" createdBy="API User" modifiedBy="API User" modifiedOn="20190506T114013-0400"/> <art id="867" name="Newscycle" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091310642.png" desc="Logo with keyboard image" createdBy="API User" modifiedBy="API User" modifiedOn="20190129T091058-0500"/> <art id="876" name="NewsEdge light" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png" desc="midnight NewsEdge cream" createdBy="API User" modifiedBy="API User" modifiedOn="20190520T134301-0400"/> </artList> </opens-api>
With the art id value returned from the art/upload or art/list response, make a request to delete the image.
https://secure.newsedge.com/opensapi/20/art/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&art=867
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/art/list?session=935DA0B364E9E130F0EC3827FC3CCC9C
<opens-api>
<status>OK</status>
<artList>
<art id="868" name="Globe with dotted overlay" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg" desc="Sample" createdBy="API User" modifiedBy="API User" modifiedOn="20190506T114013-0400"/>
<art id="876" name="NewsEdge light" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png" desc="midnight NewsEdge cream" createdBy="API User" modifiedBy="API User" modifiedOn="20190520T134301-0400"/>
</artList>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/addtopart?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&art=868
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/addbottomart?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&art=876
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/preview?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>PENDING</status>
<key>32966_20190520135840</key>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/checkpreview?session=935DA0B364E9E130F0EC3827FC3CCC9C&key=32966_20190520135840
<opens-api>
<status>OK</status>
<url>https://secure.newsedge.com/newsletterpreview/newsletter_32966_20190520135840.html</url>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api> <status>OK</status> <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"> <topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/> <title>Pharmaceutical Industry Update</title> <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat> <includePagetop>TRUE</includePagetop> <dateSubject>TRUE</dateSubject> <introduction> <p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p> <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction> <tocComment/> <lastExecTime/> <sections count="3"> <section id="3456"/> <section id="3467"/> <section id="3455"/> </sections> <schedules count="0"></schedules> <bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/> <footer/> </newsletter> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/addemail?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&emailAddress=msmith@mycompany.com
<opens-api> <status>OK</status> </opens-api>
Use the newsletter/getemaillist API to request all email addresses configured as recipients for the newsletter.
<opens-api>
<status>ERROR</status>
<error>INVALID DISTLISTID</error>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/getemaillist?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api> <status>OK</status> <emailList name="Destination list for Industry Update (2104)" desc=""> <email firstName="" lastName="" email="msmith@mycompany.com" status="ACTIVE"/> <email firstName="" lastName="" email="alee@mcompany.com" status="ACTIVE"/> </emailList> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/deleteemail?session=F807924B89CBEA15C12589D14A9E263D&newsletter=2104&emailAddress=alee@mcompany.com
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/send?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>PENDING</status>
<key>32966_20190520151155</key>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/checksend?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&key=32966_20190520151155
<opens-api> <status>OK</status> <email-status>OK</email-status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/cancelsend?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&key=32966_20190520155534
<opens-api> <status>OK</status> </opens-api>
As an alternative to sending a newsletter by issuing the newsletter/send request, the OPENS API offers the option for a newsletter to be scheduled and automatically published on a predetermined day(s) of the week at a set time(s) of day or at intervals throughout the day.
In this example, the newsletter will be configured to automatically publish on Monday and Thursdays at 8:00 AM.
With the newsletter/addschedule API, use the following required parameters:
For the days values, each day can be represented by a numeric value, e.g. 1 for Monday, 2 for Tuesday, through to 7 for Sunday, or alternatively, spell out the day(s) of the week in full. Use a comma to separate values when setting the schedule to publish on multiple days of the week. Use weekdays as a value if setting the newsletter to auto-publish from Monday through to Friday. And use all as the value if the newsletter is to publish every day of the week.
The returned result is a schedule ID used to retrieve the schedule details with the newsletter/getschedule API.
https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&days=1,4&type=settime&setTime=080000
<opens-api>
<status>OK</status>
<scheduleID>400</scheduleID>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>OK</status>
<newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
<topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
<title>Pharmaceutical Industry Update</title>
<dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
<includePagetop>TRUE</includePagetop>
<dateSubject>TRUE</dateSubject>
<introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
<tocComment/>
<lastExecTime>20190520T160927-0400</lastExecTime>
<sections count="3">
<section id="3456"/>
<section id="3467"/>
<section id="3455"/>
</sections>
<schedules count="1">
<schedule id="400"/>
</schedules>
<bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
<footer/>
</newsletter>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/getschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=400
<opens-api> <status>OK</status> <schedule id="400 "> <dayOfWeek number="1,4"> <setTime>T080000-0500</setTime> </dayOfWeek> </schedule> </opens-api>
Once the newsletter schedule is configured, you may begin the delivery by using the newsletter/update API with the parameter enableAutoPublish set to TRUE.
At the designated time, the system will gather the stories for each newsletter section, depending on the section configurations, it will check for new search results since the last time the newsletter was published or look for ACTIVE stories in the story folders, and send the newsletter to the associated email recipients.
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=TRUE
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>OK</status>
<newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="TRUE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
<topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
<title>Pharmaceutical Industry Update</title>
<dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
<includePagetop>TRUE</includePagetop>
<dateSubject>TRUE</dateSubject>
<introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
<tocComment/>
<lastExecTime>20190520T160927-0400</lastExecTime>
<sections count="3">
<section id="3456"/>
<section id="3467"/>
<section id="3455"/>
</sections>
<schedules count="1">
<schedule id="400"/>
</schedules>
<bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
<footer/>
</newsletter>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=FALSE
<opens-api> <status>OK</status> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/deleteschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=400
<opens-api> <status>OK</status> </opens-api>
In contrast to the newsletter/addschedule example above, the newsletter/addschedule request here uses the following required parameters:
In this example, the newsletter will be configured to automatically publish on Mondays and Thursdays, every 30 minutes beginning at 8:00 AM and ending at 5:00PM. Remember, the default timezone is Eastern Time. Please contact the Acquire Media Administrator for assistance to modify the default timezone.
The returned result is a schedule ID used to retrieve the schedule details with the newsletter/getschedule API.
https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&days=1,4&type=periodic&startTime=080000&endTime=170000&periodInSeconds=1800
<opens-api>
<status>OK</status>
<scheduleID>402</scheduleID>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104
<opens-api>
<status>OK</status>
<newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"><topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
<title>Pharmaceutical Industry Update</title>
<dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
<includePagetop>TRUE</includePagetop>
<dateSubject>TRUE</dateSubject>
<introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
<tocComment/>
<lastExecTime>20190520T160927-0400</lastExecTime>
<sections count="3"><section id="3456"/>
<section id="3467"/>
<section id="3455"/>
</sections>
<schedules count="1">
<schedule id="402"/>
</schedules>
<bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
<footer/>
</newsletter>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/getschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=402
<opens-api> <status>OK</status> <schedule id="402 "> <dayOfWeek number="1,4"> <startTime>T080000-0500</startTime> <endTime>T170000-0500</endTime> <period>PT30M</period> </dayOfWeek> </schedule> </opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=TRUE
<opens-api> <status>OK</status> </opens-api>
To review the newsletters owned or shared with your OPENS API account use the newsletter/list API. From the returned results, the newsletter ID can be used with the other newsletter APIs to update and manage a particular newsletter, e.g. use the newsletter/info API to retrieve more details about the selected newsletter.
https://secure.newsedge.com/opensapi/20/newsletter/list?session=935DA0B364E9E130F0EC3827FC3CCC9C
<opens-api>
<status>OK</status>
<newsletters type="ALL">
<newsletter id="2106" name="Market Update for Sales Group" owner="API Group" level="GROUP" permission="READ" schedule="NONE" enableAutoPublish="FALSE" enableHighlighting="" desc="" createdBy="API User" modifiedBy="Publishing Manager" modifiedOn="20190114T153416-0500"/>
<newsletter id="2104" name="Industry Update" owner="OPENS API Trial User" level="USER" permission="WRITE" schedule="ACTIVE" enableAutoPublish="FALSE" enableHighlighting="TRUE" desc="" createdBy="API User" modifiedBy="API User" modifiedOn="20190521T135656-0400"/>
<newsletter id="2115" name="Newsletter for Sales" owner="OPENS API Trial User" level="USER" permission="WRITE" schedule="ACTIVE" enableAutoPublish="FALSE" enableHighlighting="TRUE" desc="" createdBy="API User" modifiedBy="API User" modifiedOn="20190213T131136-0500"/>
</newsletters>
</opens-api>
https://secure.newsedge.com/opensapi/20/newsletter/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2115
<opens-api> <status>OK</status> </opens-api>
In this example, use the newsletter/delete API to delete the group level newsletter with ID 2106. An error is returned when the OPENS API user does not have the rights to delete a shared template.
https://secure.newsedge.com/opensapi/20/newsletter/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2106
<opens-api> <status>ERROR</status> <error>INVALID PUBLISHER LEVEL</error> </opens-api>