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>
Use the newsletter/create API to add a new newsletter. Additional Publishing APIs are available to configure the newsletter. See also api/info where noun=newsletter and verb=create.
https://secure.newsedge.com/opensapi/20/newsletter/create?session=<<user-token>>&name=<<newsletter-name>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
name | url encoded string of length 50 or less | The name for this newsletter. |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. | |
title | url encoded string of length 50 or less | The newsletter title appearing at the top of the newsletter. This text is also presented as the email subject line. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
dateFormat | Default:<%Y><%m><%d> | Defines how the date is presented at the top of the newsletter. Define the date format by using the following elements along with any necessary punctuation, e.g. forward slash (/), pipe-delimiter (|), hyphen (-), or comma (,). <%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. |
dateLocation | Default:APPEND APPEND, FOLLOW | Determines the placement of the newsletter date. APPEND - Show the date on the same line as the newsletter title. FOLLOW - Show the date on the line following the newsletter title. |
dateSubject | Default:TRUE TRUE, FALSE | Determines if the date will be included in the newsletter's email subject line. TRUE - Include the date in the email subject, following the newsletter title text. FALSE - Do not include the date in the email subject. |
description | url encoded string of length 200 or less | A description of the newsletter. |
enableAutoPublish | Default:FALSE TRUE, FALSE | Determines if the newsletter is to be sent automatically based on a defined schedule. TRUE - the newsletter will be automatically sent using the defined schedule. The schedule parameter is required. FALSE - the newsletter is not automatically sent. To publish the newsletter, use the newsletter/send API. |
enableHighlighting | Default:TRUE TRUE, FALSE | Determines whether search terms will be highlighted for newsletter stories. Note: highlighting is only available when the section dataSourceType is Search. true - highlight terms matching the search query. false - do not highlight terms. |
footer | url encoded string of length 2,500 or less | Include footer text at the end of the newsletter, after the last story and before the art at the end of the newsletter. The footer text can include HTML markup. |
includePagetop | Default:FALSE TRUE, FALSE | Determines if a link to return to the Table of Contents will be inserted for each newsletter item. Not applicable if tocFormat is set to NONE. |
introduction | url encoded string of length 2,500 or less | Include introductory text at the beginning of the newsletter, after the newsletter title and date, and before the table of contents and newsletter sections. The introduction text can include HTML markup. |
storyFormat | Default:BRIEF HEADLINE, BRIEF, FULL | Set the story format used for each item in newsletter sections. HEADLINE - show story headline only. BRIEF - show the story headline and a story summary. FULL - show the story headline and full text of the story. Note: full text is displayed for Licensed content only. |
tocComment | url encoded string of length 2,500 or less | Text to show above the table of contents. The tocComment is not displayed when the tocFormat is set to NONE. The table of contents text can include HTML markup. |
tocFormat | Default:HEADLINE NONE, SECTION, HEADLINE, BRIEF | Determines the format of the table of contents. NONE - do not include a table of contents. SECTION - include a table of contents with only the section names. HEADLINE - include a table of contents with section names and headlines within each section. BRIEF - include a table of contents with section names, headlines and story summaries. |
The returned results from newsletter/create include an opens-api element that contains status and newsletter child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
newsletter | The numerical identifier for the newly created newsletter. |
Use newsletter/list api to display a list of newsletter templates sorted alphabetically by name. Each newsletter will have an id attribute representing the newsletter template ID, along with additional attributes. Use this ID value with newsletter/info to see specific configuration details. See also api/info where noun=newsletter and verb=list and newsletter/info.
https://secure.newsedge.com/opensapi/20/newsletter/list?session=<<user-token>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/list include an opens-api element that contains status child element and newsletters child element representing a list of newsletters. The newsletters element holds one or more newsletter child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
newsletters | The newsletters element represents the list of newsletters where each newsletter is represented by a newsletter child element. The newsletters element includes a type attribute with value ALL, meaning the list includes all newsletters available to the API user. |
The newsletters element contains zero or more newsletter child elements.
Name | Values | Description |
---|---|---|
newsletter | The newsletter element represents a newsletter template and has the following attributes: id - The numerical identifier representing the newsletter, for use with other API requests. name - The newsletter template name. owner - The owner of the newsletter. For USER level newsletter templates, the owner is the current user. For GROUP level templates, the owner is the group name. For account level templates, the owner is the account name. level - The level of the newsletter is calculated by OPENS and indicates who owns the newsletter template. Valid values are USER (current user), GROUP (current user and others in the same group), ACCOUNT (current user and others in the same organization). The default value is USER. permission - The newsletter permission settings for the current user. The valid values for permission are: READ means you can view details of the newsletter but cannot make changes. WRITE means you can define and modify the newsletter settings. schedule - A calculated value indicating whether the newsletter is scheduled or not. Valid values are NONE or ACTIVE. Use newsletter/addschedule to configure the schedule, newsletter/getschedule to review the schedule or newsletter/deleteschedule to remove the schedule. Successfully adding a schedule will result in an ACTIVE value for this attribute. enableAutoPublish - Indicates if the newsletter is set to automatically send the newsletter based on the defined schedule. Valid values are: TRUE meaning the newsletter is set to publish automatically, and FALSE which means the newsletter does not publish automatically. Before setting the value to TRUE, the schedule must have value ACTIVE. enableHighlighting - Indicates if the search results will include highlighted search terms. desc - A description for this newsletter. createdBy - The newsletter creator. modifiedBy - The last user to modify the newsletter template. modifiedOn - The date and time the newsletter template was last modified. |
Use newsletter/info api to get details and configuration settings of a newsletter. See also api/info where noun=newsletter and verb=info and newsletter/list API.
https://secure.newsedge.com/opensapi/20/newsletter/info?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/info include an opens-api element that contains status and a newsletter child element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
newsletter | The newsletter element describes the newsletter template details with child elements to further describe its configuration. Newsletter attributes include: id - The unique identifier for a newsletter. name - The newsletter template name. desc - The newsletter template description. enableAutoPublish - Indicates if the newsletter is set to automatically send the newsletter based on the defined schedule. Valid values are: TRUE meaning the newsletter is set to publish automatically, and FALSE which means the newsletter does not publish automatically. enableHighlighting - Indicates if the search results will include highlighted search terms. tocFormat - Indicates if the newsletter will include a Table of Contents. Allowed values are: NONE, SECTION, HEADLINE, and BRIEF. See newsletter/create optional parameter tocFormat for more details. storyFormat - Indicates the story format applied to items in the newsletter. Allowed values are: HEADLINE, BRIEF, and STORY. See newsletter/create optional parameter storyFormat for more details. level - The level of the newsletter is calculated by OPENS and indicates who owns the newsletter template. Valid values are USER (current user), GROUP (current user and others in the same group), ACCOUNT (current user and others in the same organization). The default value is USER. permission - The newsletter permission settings for the current user. The valid values for permission are: READ means you can view details of the newsletter. WRITE means you can define and modify the newsletter settings. | |
topArt | The topArt element indicates the image to insert at the beginning of the newsletter. It includes the following attributes: id - The image identifier. name - The name assigned to the image. link - The image link. | |
title | The title element is the text inserted at the top of the newsletter, after the top art image, if available. The title text is also used as the email subject line. | |
dateFormat | The dateFormat element describes the way the newsletter date is presented and its location attribute indicates where the newsletter date is inserted. The date format is a formula written with the following codes, along with any necessary punctuation, e.g. forward slash (/), pipe-delimiter (|), hyphen (-), or comma (,). <%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. The location attribute has two valid values: APPEND - Display date on same line as the title. FOLLOW - Display date on line after title. | |
includePagetop | TRUE, FALSE | Describes whether there will be a link to return to the Table of Contents for each newsletter item. TRUE - Do show page top link. FALSE - Do not show page top link. |
dateSubject | TRUE, FALSE | Describes whether the date is included in the newsletter's email subject line. TRUE - include the date in the email subject, following the newsletter title text. FALSE - do not include the date in the email subject. |
introduction | Include introductory text at the beginning of the newsletter, after the newsletter title and date, and before the table of contents and newsletter sections. | |
tocComment | Text to show above the table of contents. The comment does not appear when the tocFormat is set to none. | |
lastExecTime | YYYYMMDDTHHMMSS-ZZZZ | The last date and time the newsletter was published. |
sections | The sections element represents the newsletter categories, with the count attribute indicating the number of categories. If the count is higher than one, then one or more additional section sub-elements are listed. The section sub-element has the id attribute representing the unique section identifier. Use the newsletter/getsection to see the section details. | |
schedules | The schedules element attribute count indicates if there is zero, one or more schedules associated to the newsletter. If the count is zero, the newsletter is not scheduled and will not be published automatically by OPENS. Where the count is one or higher, the schedule sub-element identifies the schedule ID. | |
schedule | The schedule element is available when a schedule is defined using the newsletter/addschedule API. The id attribute is a unique identifier used with the newsletter/getschedule to retrieve the appointed day(s) of week and time(s) of day when the newsletter will be automatically published. If | |
bottomArt | The bottomArt element indicates the image to insert at the end of the newsletter, following the footer text, if available. It includes the following attributes: id - The image identifier. name - The name assigned to the image. link - The image link. | |
footer | The text to display at the end of the newsletter, after the last story and before the art at the end of the newsletter. |
Use the newsletter/update API to modify and configure the newsletter. Additional Publishing APIs are available to configure the newsletter. See also api/info where noun=newsletter and verb=update.
https://secure.newsedge.com/opensapi/20/newsletter/update?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
newsletter | The identifier for this newsletter. The identifier is obtained from the value of the newsletter element resulting from the newsletter/list or the newsletter/create request. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
dateFormat | Default:<%Y><%m><%d> | Defines how the date is presented at the top of the newsletter. Define the date format by using the following elements along with any necessary punctuation, e.g. forward slash (/), pipe-delimiter (|), hyphen (-), or comma (,). <%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. |
dateLocation | Default:APPEND APPEND, FOLLOW | Determines the placement of the newsletter date. APPEND - Show the date on the same line as the newsletter title. FOLLOW - Show the date on the line following the newsletter title. |
dateSubject | Default:TRUE TRUE, FALSE | Determines if the date will be included in the newsletter's email subject line. TRUE - Include the date in the email subject, following the newsletter title text. FALSE - Do not include the date in the email subject. |
description | url encoded string of length 200 or less | A description of the newsletter. |
enableAutoPublish | Default:FALSE TRUE, FALSE | Determines if the newsletter is to be sent automatically based on a defined schedule. TRUE - the newsletter will be automatically sent using the defined schedule. See the newsletter/addschedule API to set up the schedule. FALSE - the newsletter is not automatically sent. To publish the newsletter, use the newsletter/send API. |
enableHighlighting | Default:TRUE TRUE, FALSE | Determines whether search terms will be highlighted for newsletter stories. Note: highlighting is only available when the section dataSourceType is Search. true - highlight terms matching the search query. false - do not highlight terms. |
footer | url encoded string of length 2,500 or less | Include footer text at the end of the newsletter, after the last story and before the art at the end of the newsletter. The footer text can include HTML markup. |
includePagetop | Default:FALSE TRUE, FALSE | Determines if a link to return to the Table of Contents will be inserted for each newsletter item. Not applicable if tocFormat is set to NONE. |
introduction | url encoded string of length 2,500 or less | Include introductory text at the beginning of the newsletter, after the newsletter title and date, and before the table of contents and newsletter sections. The introduction text can include HTML markup. |
name | url encoded string of length 50 or less | The name for this newsletter. |
storyFormat | Default:BRIEF HEADLINE, BRIEF, FULL | Set the story format used for each item in newsletter sections. HEADLINE - show story headline only. BRIEF - show the story headline and a story summary. FULL - show the story headline and full text of the story. Note: full text is displayed for Licensed content only. |
title | url encoded string of length 50 or less | The newsletter title appearing at the top of the newsletter. This text is also presented as the email subject line. |
tocComment | url encoded string of length 2,500 or less | Text to show above the table of contents. The tocComment is not displayed when the tocFormat is set to NONE. The table of contents text can include HTML markup. |
tocFormat | Default:HEADLINE NONE, SECTION, HEADLINE, BRIEF | Determines the format of the table of contents. NONE - do not include a table of contents. SECTION - include a table of contents with only the section names. HEADLINE - include a table of contents with section names and headlines within each section. BRIEF - include a table of contents with section names, headlines and story summaries. |
The returned results from newsletter/update include an opens-api element that contains status and newsletter child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
newsletter | The numerical identifier for the newly created newsletter. |
Use newsletter/addsection to add a newsletter section displaying stories (from a saved search or a story folder) or displaying other content marked up as HTML. Then use the newsletter/updatesection to configure the specifics for the section and newsletter/getsection to review the details for the section. A newsletter may have one or more sections. See also api/info where noun=newsletter and verb=addsection.
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=<<user-token>>&newsletter=<<newsletter-id>>&name=<<section-name>>&dataSourceType=SEARCH&search=<<search-id>>[¶meter=value][& . . .]
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=<<user-token>>&newsletter=<<newsletter-id>>&name=<<section-name>>&dataSourceType=FOLDER&folder=<<folder-id>>[¶meter=value][& . . .]
https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=<<user-token>>&newsletter=<<newsletter-id>>&name=<<section-name>>&dataSourceType=HTML[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
dataSourceType | FOLDER, SEARCH, HTML | The dataSourceType represents the type of content used to populate the newsletter section. The allowed values are: FOLDER - use the contents of a story folder to populate the newsletter section. When the data type is FOLDER, the folder parameter is required. SEARCH - use the results of a search to populate the newsletter section. When data type is SEARCH, the search parameter is required. HTML - use HTML mark-up to add content to the section. An HTML based section can be left empty, or use the optional parameter html to define the HTML mark-up. |
name | url encoded string of length 50 or less | The name for the newsletter section. |
newsletter | The newsletter identifier. Use the value of the newsletter element from the newsletter/list request. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
comment | url encoded string of length 2,500 or less | A comment describing the section for the newsletter reader. This text is displayed in the newsletter beneath the section name and can be formatted using HTML markup. |
emptySectionMessage | url encoded string of length 50 or less | Define the message text to display when a section contains no results. This is required when the optional parameter includeEmptySection is set to TRUE. |
folder | The story folder identifier. A number of stories from the folder, where the story status as "ACTIVE", will be used to populate this section. The number of stories is set by the value of the storyLimit parameter. This parameter is required when dataSourceType value is FOLDER. | |
html | url encoded string | When the dataSourceType is HTML, use html parameter to define the content for this section. |
includeEmptySection | Default:FALSE TRUE, FALSE | Sets whether the section appears in the newsletter if there are no stories to be displayed. TRUE - show the section heading even when no stories are found. When this value is true, the parameter emptySectionMessage is required and its text is displayed beneath the section heading text. FALSE - do not show the section heading when no stories are found in the linked story folder or saved search. |
search | The saved search identifier. A number of results from the search will be used to populate this section. The number of stories is set by the value of the storyLimit parameter. This parameter is required when dataSourceType value is SEARCH. | |
storeOnSend | TRUE, FALSE | Indicates if the stories in the folder will be changed from ACTIVE to STORED once the newsletter is sent. See also status parameter for storyfolder/updatestory. |
storyLimit | Default:10 1,2,3,...100 | The number of stories to display in the section. |
The returned results from newsletter/addsection include an opens-api element that contains status and sectionID sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
sectionID | The numeric identifier for the section to be used with other API requests. |
Use newsletter/getsection to retrieve the details of a newsletter section created or updated with the newsletter/addsection or newsletter/updatesection APIs, respectively. See also newsletter/addsection, newsletter/updatesection, and api/info where noun=newsletter and verb=getsection.
https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=<<user-token>>&newsletter=<<newsletter-id>>§ion=<<section-id>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
newsletter | The newsletter identifier. Use the value of the newsletter element from the newsletter/list request. | |
section | The section identifier. Use the value of the sectionID element from the newsletter/addsection or newsletter/info request. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/getsection include an opens-api element that contains status and section sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
section | Represents a newsletter category and includes the following attributes: id - The numeric identifier for the section to be used with other API requests. order - The numeric position of the section as it appears in the newsletter. A value of 1 means this is the first section in the newsletter. The higher the number the further down it appears in the newsletter. name - The section name. storyLimit - The number of articles to display in this section. dataSourceType - The type of content displayed in this section. storyfolder - The story folder identifier. savedsearch - The saved search identifier. sectionHtml - The HTML markup to show in the section. comment - Text to display as a comment for this section. dataSourceName - The name of the story folder or saved search linked to the section. sendEmptySection - Indicates if the section will be included in the newsletter even when there are no stories to display. emptySectionMessage - When sendEmptySection is TRUE, this text is displayed in the section. storeOnSend - When dataSourceType is FOLDER, this element indicates if the stories in the folder will be changed from ACTIVE to STORED once the newsletter is sent. |
Use newsletter/updatesection to define different elements of the section, such as what content to display, how many results to display, whether to include an introductory comment for this section, set the position of section within the newsletter, etc. Use the newsletter/getsection request to review and confirm your section changes. See also api/info where noun=newsletter and verb=updatesection.
https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=<<user-token>>&newsletter=<<newsletter-id>>§ion=<<section-id>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
newsletter | The newsletter identifier. Use the value of the newsletter element from the newsletter/list request. | |
section | The section identifier. Use the value of the sectionID element from the newsletter/addsection or newsletter/info request. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
comment | url encoded string of length 2,500 or less | A comment describing the section for the newsletter reader. This text is displayed in the newsletter beneath the section name and can be formatted using HTML markup. |
dataSourceType | FOLDER, SEARCH, HTML | The dataSourceType represents the type of content used to populate the newsletter section. The allowed values are: FOLDER - use the contents of a story folder to populate the newsletter section. When the data type is FOLDER, the folder parameter is required. SEARCH - use the results of a search to populate the newsletter section. When data type is SEARCH, the search parameter is required. HTML - use HTML mark-up to add content to the section. An HTML based section can be left empty, or use the optional parameter html to define the HTML mark-up. |
emptySectionMessage | url encoded string of length 50 or less | Define or modify the message text to display when a section contains no results. This is required when the optional parameter includeEmptySection is set to TRUE. |
folder | The story folder identifier. A number of stories from the folder, where the story status as "ACTIVE", will be used to populate this section. The number of stories is set by the value of the storyLimit parameter. This parameter is required when dataSourceType value is FOLDER. | |
html | url encoded string | When the dataSourceType is HTML, use html parameter to define the content for this section. |
includeEmptySection | Default:FALSE TRUE, FALSE | Sets whether the section appears in the newsletter if there are no stories to be displayed. TRUE - show the section heading even when no stories are found. When this value is true, the parameter emptySectionMessage is required and its text is displayed beneath the section heading text. FALSE - do not show the section heading when no stories are found in the linked story folder or saved search. |
name | url encoded string of length 50 or less | The name for the newsletter section. |
order | 1,2,3,... | The numeric position of the section as it appears in the newsletter. A value of 1 means this is the first section in the newsletter. The higher the number the further down it appears in the newsletter. |
search | The saved search identifier. A number of results from the search will be used to populate this section. The number of stories is set by the value of the storyLimit parameter. This parameter is required when dataSourceType value is SEARCH. | |
storeOnSend | TRUE, FALSE | Indicates if the stories in the folder will be changed from ACTIVE to STORED once the newsletter is sent. See also status parameter for storyfolder/updatestory. |
storyLimit | Default:10 1,2,3,...100 | The number of stories to display in the section. |
The returned results from newsletter/updatesection include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use the newsletter/deletesection to permanently remove a newsletter category. See also api/info where noun=newsletter and verb=deletesection.
https://secure.newsedge.com/opensapi/20/newsletter/deletesection?session=<<user-token>>&newsletter=<<newsletter-id>>§ion=<<section-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | The newsletter identifier. Use the value of the newsletter element from the newsletter/list request. | |
section | The section identifier. Use the value of the sectionID element from the newsletter/addsection or newsletter/info request. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/deletesection include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
The newsletter/preview api generates a unique key value for the newsletter which is submitted with the newsletter/checkpreview request to obtain a URL. This URL returns the newsletter formatted with the stories as defined either by the section details or as submitted with the storyxml parameter.
See also newsletter/checkpreview and api/info where noun=newsletter and verb=preview.
https://secure.newsedge.com/opensapi/20/newsletter/preview?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
storyxml | The storyxml parameter is used to submit encoded XML content for display within the indicated newsletter section(s). Note, you will want to use an HTTP Post command to submit the story due to the typical 2,000 character limit for HTTP urls. The following example show the storyXML format to send 3 stories in the newsletter section with id=5345. Sample storyxml:<?xml version="1.0" encoding="UTF-8"?> newsletter-stories - A list of sections and stories to include in the newsletter. Newsletter-stories may contain one or more section id elements. section - Defines the section where the list of one or more stories are to appear. When the newsletter section has predefined folder, search or HTML contents, the content submitted with the storyxml parameter overrides the stories from the folder, search or HTML. Each story element requires a storyURL. If storyURL is not provided then these other story elements are required: publication-date - The publication-date specifies the date when the news story was officially published (which may not correspond to the actual release time). This published-date is formatted according to ISO 8601 basic standard, e.g. YYYYMMDDTHHMMSS-ZZZZ source - The source name. wordcount - The count of the words in the story body excluding any markup. Wordcount may be empty. headline - The headline text for the story. summary - The summary as a short, free-form text summary of a story. storyType - Specifies the general type of information in the story. The code values are defined by Acquire Media as:
image - Optionally, include an image with the story using the artlink URL returned by the art/upload API. comment - Optionally, include a comment to display with newsletter story. |
The returned results from newsletter/preview include an opens-api element that contains status and key sub-elements.
Name | Values | Description |
---|---|---|
status | PENDING, ERROR | The status of the request.
|
key | Key element is an identifier for the newsletter with its story contents. The value is to be used with the newsletter/checkpreview to obtain a URL to preview the newsletter. |
Use the newsletter/checkpreview API with the key value from the newsletter/preview to obtain a URL to preview the newsletter. The preview displays the newsletter formatted in HTML and populated with stories in each section. See also newsletter/preview and api/info where noun=newsletter and verb=checkpreview.
https://secure.newsedge.com/opensapi/20/newsletter/checkpreview?session=<<user-token>>&key=<<key>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
key | An identifier for the newsletter and its contents. Obtain the key value from the newsletter/preview API results. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/checkpreview include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, PENDING, ERROR | The status of the request.
|
url | A hyperlink to view the newsletter in HTML. The newsletter will be displayed with stories as defined by the section settings. |
Use newsletter/addemail API to add an email address as a recipient for your newsletter. See also api/info where noun=newsletter and verb=addemail.
https://secure.newsedge.com/opensapi/20/newsletter/addemail?session=<<user-token>>&newsletter=<<newsletter-id>>&emailAddress=<<email-address>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
emailAddress | url encoded string as a valid email format | The newsletter recipient's email address. |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
firstName | The recipient's first name. | |
lastName | The recipient's last name. |
The returned results from newsletter/addemail include an opens-api element that contains the status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
The newsletter/getemaillist API returns the list of email addresses registered to receive the newsletter. See also api/info where noun=newsletter and verb=getemaillist.
https://secure.newsedge.com/opensapi/20/newsletter/getemaillist?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/getemaillist include an opens-api element that contains status and emailList sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
emailList | The emailList is a list of email addresses to receive this newsletter. The emailList element includes the following attributes: The emailList element also contains one or more email sub-elements whose attributes define the email settings. |
Name | Values | Description |
---|---|---|
email is one newsletter recipient. Attributes of email include the following: firstName - the recipient's first name. This value is optional. lastName - the recipient's last name. This value is optional. email - the recipient's email address. status - the status of the email address. The default value is normally ACTIVE meaning the recipient is set to receive the newsletter. |
Use newsletter/deleteemail to permanently remove an email address from the newsletter distribution. See also api/info where noun=newsletter and verb=deleteemail.
https://secure.newsedge.com/opensapi/20/newsletter/deleteemail?session=<<user-token>>&newsletter=<<newsletter-id>>&emailAddress=<<email-address>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
emailAddress | url encoded string as a valid email format | The newsletter recipient's email address. |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/deleteemail include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use the newsletter/send API to assemble the newsletter elements (artwork, title, date, formatting, sections, stories, footer etc.) and to publish the entire newsletter to the associated email addresses. The returned result is a key element which may be used with newsletter/checksend to confirm if the newsletter has been sent. If the status of the newsletter/checksend is PENDING, and you wish to cancel this action, use the newsletter/cancelsend API. See also newsletter/checksend and newsletter/cancelsend APIs and api/info where noun=newsletter and verb=send.
https://secure.newsedge.com/opensapi/20/newsletter/send?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
storyxml | The storyxml parameter is used to submit encoded XML content for display within the indicated newsletter section(s). Note, you will want to use an HTTP Post command to submit the story due to the typical 2,000 character limit for HTTP urls. The following example show the story XML format to send 3 stories in the newsletter section with id=5345. Sample storyxml:<?xml version="1.0" encoding="UTF-8"?> newsletter-stories - A list of sections and stories to include in the newsletter. Newsletter-stories may contain one or more section id elements. section - Defines the section where the list of one or more stories are to appear. When the newsletter section has predefined folder, search or HTML contents, the content submitted with the storyxml parameter overrides the stories from the folder, search or HTML. Each story element requires a storyURL. If storyURL is not provided then these other story elements are required: publication-date - The publication-date specifies the date when the news story was officially published (which may not correspond to the actual release time). This published-date is formatted according to ISO 8601 basic standard, e.g. YYYYMMDDTHHMMSS-ZZZZ source - The source name. wordcount - The count of the words in the story body excluding any markup. Wordcount may be empty. headline - The headline text for the story. summary - The summary as a short, free-form text summary of a story. storyType - Specifies the general type of information in the story. The code values are defined by Acquire Media as:
image - Optionally, include an image with the story using the artlink URL returned by the art/upload API. comment - Optionally, include a comment to display with newsletter story. |
The returned results from newsletter/send include an opens-api element that contains status and key sub-elements.
Name | Values | Description |
---|---|---|
status | PENDING, ERROR | The status of the request.
|
key | Key element is an identifier for the assembled newsletter. The value is to be used with the newsletter/checksend to confirm if the newsletter has been published. |
Use the newsletter/checksend with the key value from the newsletter/send returned results to confirm if the newsletter was published. If the response of this newsletter/checksend is PENDING, and you wish to cancel this action, use the newsletter/cancelsend with the key parameter and the same key value. See also newsletter/send and newsletter/cancelsend APIs, and the api/info where noun=newsletter and verb=checksend.
https://secure.newsedge.com/opensapi/20/newsletter/checksend?session=<<user-token>>&key=<<key>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
key | An identifier for the newsletter and its contents. Obtain the key value from the newsletter/send API results. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/checksend include an opens-api element that contains status and email-status sub-elements.
Name | Values | Description |
---|---|---|
status | OK, PENDING, ERROR | The status of the request.
|
email-status | OK, PENDING, ERROR | The status of the request.
|
See also newsletter/send and api/info where noun=newsletter and verb=cancelsend.
https://secure.newsedge.com/opensapi/20/newsletter/cancelsend?session=<<user-token>>&key=<<key>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/cancelsend include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use the art/upload API to upload images for use with your newsletters. After uploading an image, use the newsletter/addtopart API to define the image as the newsletter masthead/banner or use the newsletter/addbottomart API to set the image at the end of the newsletter. Note you will want to use an HTTP Post method with the art/upload API. Supported image formats are .png, .jpg, .gif, and .bmp.
See also api/info where noun=art and verb=upload.
https://secure.newsedge.com/opensapi/20/art/upload?session=<<user-token>>&name=<<image-name>>[¶meter=value][& . . .]
Parameter | Values | Description |
---|---|---|
name | url encoded string of length 50 or less | The name for the graphic image. |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
description | An optional description for the graphic image. |
The returned results from art/upload include an opens-api element that contains status and related art child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
artId | The unique identifier value for the uploaded image. The value of this element will be used in subsequent newsletter/addtopart and newsletter/addbottomart requests. | |
artLink | The URL to access the uploaded image hosted by OPENS. |
Use the art/list API to retrieve a list of the uploaded images available for use as artwork at the top or the end of the newsletter. See also art/upload and api/info where noun=art and verb=list.
https://secure.newsedge.com/opensapi/20/art/list?session=<<user-token>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from art/list include an opens-api element that contains status and artlist child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
artlist | A list of the uploaded images. |
Name | Values | Description |
---|---|---|
art | The art element is an image available for use with newsletters. This element has the following attributes: id - The numerical identifier representing the image, for use with other newsletter and art API requests. name - The name given to the image. level - The level of the art is calculated by OPENS and indicates who owns the image. Valid values are USER (current user), GROUP (current user and others in the same group), ACCOUNT (current user and others in the same organization). The default value is USER. permission - The art permission settings for the current user. The valid values for permission are: READ means you can view the image only. WRITE means you can define and modify the image attributes. link - The URL to access the uploaded image hosted by OPENS. desc - A description for this image. createdBy - The user who uploaded the image. modifiedBy - The last user to modify the image. modifiedOn - The date and time the image was last modified. |
Use the art/delete API to delete an uploaded image. See also api/info where noun=art and verb=delete.
https://secure.newsedge.com/opensapi/20/art/delete?session=<<user-token>>&art=<<art-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. | |
art | The art image identifier. Use the value of the artId returned result element from the initial art/upload request or the id attribute of the art element returned by the art/list request. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from art/delete include an opens-api element that contains status and art child elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use newsletter/addtopart to include artwork at the top of your newsletter. Your artwork would be uploaded using the art/upload API or if already uploaded, use the art/list API to identify the image you wish to use. See also art/upload and art/list APIs and api/info where noun=newsletter and verb=addtopart.
https://secure.newsedge.com/opensapi/20/newsletter/addtopart?session=<<user-token>>&newsletter=<<newsletter-id>>&art=<<art-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
art | The art image identifier. Use the value of the artId returned result element from the initial art/upload request or the id attribute of the art element returned by the art/list request. | |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/addtopart include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use newsletter/deletetopart to remove the artwork included at the top of the newsletter. Note, this request does not delete the artwork from the system; to permanently delete an image, use the art/delete API. See also api/info where noun=newsletter and verb=deletetopart.
https://secure.newsedge.com/opensapi/20/newsletter/deletetopart?session=<<user-token>>&newsletter=<<newsletter-id>>&art=<<art-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
art | The art image identifier. Use the value of the artId returned result element from the initial art/upload request or the id attribute of the art element returned by the art/list request. | |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/deletetopart include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use newsletter/addbottomart to include artwork at the end of your newsletter. Your artwork would be uploaded using the art/upload API or if already uploaded, use the art/list API to identify the image you wish to use. See also art/upload and art/list APIs and api/info where noun=newsletter and verb=addbottomart.
https://secure.newsedge.com/opensapi/20/newsletter/addbottomart?session=<<user-token>>&newsletter=<<newsletter-id>>&art=<<art-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
art | The art image identifier. Use the value of the artId returned result element from the initial art/upload request or the id attribute of the art element returned by the art/list request. | |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/addbottomart include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use newsletter/deletebottomart to remove the artwork included at the end of the newsletter. Note, this request does not delete the artwork from the system; to permanently delete an image, use the art/delete API. See also api/info where noun=newsletter and verb=deletebottomart.
https://secure.newsedge.com/opensapi/20/newsletter/deletebottomart?session=<<user-token>>&newsletter=<<newsletter-id>>&art=<<art-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
art | The art image identifier. Use the value of the artId returned result element from the initial art/upload request or the id attribute of the art element returned by the art/list request. | |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/deletebottomart include an opens-api element that contains status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use newsletter/addschedule to set the days and times when a newsletter is to be automatically published. See also api/info where noun=newsletter and verb=addschedule. Newsletters are scheduled for one or more days of the week using the days parameter, then the time of day can be scheduled in two ways:
https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=<<user-token>>&newsletter=<<newsletter-id>>&days=<<day-list>>&type=settime&setTime=<<hhmmss>>[¶meter=value][&...]
https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=<<user-token>>&newsletter=<<newsletter-id>>&days=<<day-list>>&type=period&startTime=<<hhmmss>>&endTime=<<hhmmss>>&periodInSeconds=<<seconds>>[¶meter=value][&...]
Parameter | Values | Description |
---|---|---|
days | 1,2,3,4,5,6,7 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday all weekdays | Specifies the days of the week to send the newsletter, where each number represents a different day. Specify more than one day by separating the numbers with commas.
For example: 1,3,5 specifies a newsletter is to be published on Monday, Wednesday and Friday. For Monday through Friday, set value as weekdays. For seven days per week, set value as all. |
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the user-token value returned from the session/login request. | |
type | period, settime | The type of schedule used to send the newsletter.
|
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
endTime | hhmmss | Required only if parameter type=period. Sets the time when periodic newsletters end for the day. For example, if endTime=170000, no newsletters would be sent past 5:00:00 PM. The first newsletter for the day begins at the time set by the startTime parameter. Newsletter are then published periodically based on the value of the periodInSeconds parameter until the time set in the endTime parameter occurs. |
periodInSeconds | 900, . . . | Required only if parameter type=period. Sets the amount of time in seconds between periodic newsletters. Lowest value is 900. For example, if periodInSeconds=900 and startTime=080000, then the newsletter would first be sent at 8:00:00 AM and every 15 minutes (900 seconds) thereafter until the endTime occurs. |
setTime | hhmmss | Required only if parameter type=settime. Sets a specific time of day for a newsletter to be published. For example, if setTime=164500, then the newsletter is sent at 4:45:00 PM. |
startTime | hhmmss | Required only if parameter type=period. Sets the time when periodic newsletters start for the day. The first periodic newsletter is sent at the startTime. Thereafter, newsletters are sent periodically based on the value of the periodInSeconds parameter until the time set in the endTime parameter occurs. |
The returned results include an opens-api element with a status and scheduleID sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
scheduleID | The numeric identifier for the newsletter schedule. |
Use newsletter/getschedule to retrieve the newsletter schedule. See also api/info where noun=newsletter and verb=getschedule.
https://secure.newsedge.com/opensapi/20/newsletter/getschedule?session=<<user-token>>&newsletter=<<newsletter-id>>&schedule=<<schedule-id>>[¶meter=value][&...]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
schedule | The scheduleID value returned from the newsletter/addschedule API or the schedule ID attribute value returned by the newsletter/info API. | |
session | The ID of the OPENS API session. Use the user-token value returned from the session/login request. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results include an opens-api element with a status and schedule sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
schedule | The schedule element represents one newsletter schedule. The schedule id attribute is a unique identifier created by the newsletter/addschedule API. Schedule has a dayOfWeek sub-element. |
Name | Values | Description |
---|---|---|
dayOfWeek | 1, 2, 3, 4, 5, 6, 7, or comma-separated list of integers 1 through 7 | The day or days of the week when the newsletter will be automatically sent. The dayOfWeek includes a number attribute, where the number can be a single digit, representing one day of the week.
or a comma-separated list of integers, e.g. if the number value is 1,3,5 this represents Monday, Wednesday, and Friday. The dayOfWeek element displays different sub-elements depending on the defined schedule type. If the type is:
|
Name | Values | Description |
---|---|---|
endTime | Thhmmss-hhmm | Indicates the time after which no more periodic newsletters are sent for the day. Time is in hours minutes and seconds with an offset from Greenwich Mean Time. |
periodInSeconds | PTmmM | Indicates the time in minutes between the executions of periodic newsletters during a day. |
setTime | Thhmmss-hhmm | Indicates a specific time of the day the newsletter will be sent. Time is in hours minutes and seconds with an offset from Greenwich Mean Time. |
startTime | Thhmmss-hhmm | Indicates the time when this periodic newsletter is scheduled to start for the day. Time is in hours minutes and seconds with an offset from Greenwich Mean Time. |
Use newsletter/deleteschedule to delete the newsletter schedule. See also api/info where noun=newsletter and verb=deleteschedule.
https://secure.newsedge.com/opensapi/20/newsletter/deleteschedule?session=<<user-token>>&newsletter=<<newsletter-id>>&schedule=<<schedule-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
schedule | The scheduleID value returned from the newsletter/addschedule API or the schedule ID attribute value returned by the newsletter/info API. | |
session | The ID of the OPENS API session. Use the user-token value returned from the session/login request. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results include an opens-api element with a status and schedule sub-elements.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|
Use the newsletter/delete API to delete a saved newsletter. See also api/info where noun=newsletter and verb=delete.
https://secure.newsedge.com/opensapi/20/newsletter/delete?session=<<user-token>>&newsletter=<<newsletter-id>>[¶meter=value]
Parameter | Values | Description |
---|---|---|
newsletter | A numerical identifier representing the newsletter. Use the newsletter value from the original newsletter/create results or the id attribute for the newsletter from the newsletter/list call. | |
session | The ID of the OPENS API session. Use the value returned in the user-token element from session/login. |
Parameter | Values | Description |
---|---|---|
json | Default:0 0,1,2 | The json parameter controls the format of the return data. If the parameter is not provided, the data is returned in XML format.
|
The returned results from newsletter/delete include an opens-api element that contains a status sub-element.
Name | Values | Description |
---|---|---|
status | OK, ERROR | The status of the request.
|