SmartFocus Cloud Service APIs Document name Transactional Messaging Templates SOAP API Guide Service Transactional Messaging Service for Managing Templates Protocol SOAP over HTTP Version 11.8 Last updated on June 22, 2015
Table of Contents Table of Contents Table of Contents 2 Introduction 5 About This Document 5 About SmartFocus APIs 5 Feedback 5 Support Options 5 Training Options 5 SmartFocus's Products and Services 5 Disclaimer 5 Introducing SmartFocus APIs 6 Module Overview 6 Getting started with integration 7 Prerequisites 7 Quick Start 7 Integration Using APIs 7 URL Encoding Considerations (for HTTP GET methods only) 8 Security 8 Overview of the Transactional Messaging Templates & Dynamic Content API 9 Transactional Messaging Templates and Dynamic Content API Use Cases 11 Connection 13 Recommended Token Usage 13 openapiconnection 14 closeapiconnection 16 Template Management 17 createtemplate 17 18 createtemplatebyobj 20 deletetemplate 22 updatetemplate 23 updatetemplatebyobj 25 clonetemplate 27 gettemplate 28 getlasttemplates 30 gettemplatesbyfield 32 gettemplatesbyperiod 34 gettemplatesummarylist 36 gettemplatepreview 39 gettemplatepreviewbyobj 41 gettemplatepreviewwithlinksbyobj 44 www.smartfocus.com 2
Table of Contents createandaddstandardtemplateurl 47 createandaddpersonalizedtemplateurl 48 updatetemplateurlbyfield 49 deletetemplateurl 51 trackalltemplatelinks 52 untrackalltemplatelinks 53 tracktemplatelinkbyposition 54 untracktemplatelinkbyorder 56 getalltemplatetrackablelinks 57 getalltemplatetrackedlinks 58 getallunusedtemplatetrackedlinks 59 getnotifdefaultsender 60 getnotifnotvalidatedsenders 61 getnotifvalidatedaltsenders 62 addbanner 63 testtemplatebygroup 64 testtemplatebygroupbyobj 66 testtemplatebymember 68 testtemplatebymemberbyobj 70 Dynamic Content Management 72 createbanner 72 72 createbannerbyobj 74 updatebanner 76 updatebannerbyobj 78 deletebanner 80 clonebanner 81 getbanner 82 getlastbanners 84 getbannersbyfield 86 getbannersbyperiod 88 getbannerpreview 90 getbannerpreviewbyobj 91 createandaddstandardbannerurl 93 createandaddpersonalizedbannerurl 95 deletebannerurl 97 trackallbannerlinks 98 trackbannerlinkbyposition 99 untrackallbannerlinks 100 untrackbannerlinkbyorder 101 www.smartfocus.com 3
Table of Contents updatebannerurlbyfield 102 getbannerurlbyorder 104 getallbannertrackablelinks 106 getallbannertrackedlinks 107 getallunusedbannertrackedlinks 108 Reference 109 www.smartfocus.com 4
Introduction Introduction About This Document This document is a reference document for using SmartFocus APIs. It does not explain the purpose or functions of SmartFocus features. For information on these features, please consult the SmartFocus Online Help or the SmartFocus User Guide. This document is intended for developers and project managers. About SmartFocus APIs An Application Programming Interface (API) is a source code interface that a computer system or program library provides in order to support requests for services made from another computer program. The goal of SmartFocus APIs is to offer customers the ability to pilot a complete campaign from their own system. Feedback The Transactional Messaging Templates SOAP API Guide is constantly being enhanced to provide you with more and more information on using SmartFocus API methods. If you can't find the information you need or want to provide feedback, simply drop us a line at documentation@smartfocus.com. We look forward to hearing from you! Support Options SmartFocus provides you with a dedicated Account Manager to accompany you throughout the execution of your projects in SmartFocus. Your Account Manager is the gateway to support, training, and professional services. Working with your Account Manager, you can rely on SmartFocus s deliverability and technical support teams for complex troubleshooting and optimization. Training Options SmartFocus provides fully comprehensive training ranging from basic product training through to advanced modules and both strategic and tactical marketing courses. The training courses are designed to help you increase productivity, develop new methods, and share best practices to optimize your email, mobile, and social marketing campaigns. To get more information on training, please contact your Account Manager. SmartFocus's Products and Services For more information on SmartFocus's products and services, please see www.smartfocus.com Disclaimer While the information contained in this publication is believed to be true and accurate, SmartFocus cannot accept any legal responsibility for any errors or omissions contained herein. All information is subject to change without notice. None of the material in this publication may be reproduced or transmitted in whole or in part without the express written permission of SmartFocus. www.smartfocus.com 5
Introducing SmartFocus APIs Introducing SmartFocus APIs Module Overview The Transactional module is a way to access your Transactional Messaging Templates and Dynamic Content Blocks (often referred to as Notification Messaging or NMP templates and banners) through the API. It provides full access to the Templates and Dynamic Content Blocks for insert, update, get, and preview. www.smartfocus.com 6
Getting started with integration Getting started with integration Prerequisites To access SmartFocus s APIs and take full advantage of this software s ease of integration with other systems, you will need the following: An Internet connection A recent browser and operating system An active SmartFocus account with the API feature enabled Quick Start The process for interfacing your website, CRM, or any other internal system with the APIs is quite straightforward. Step 1: Get your API key in SmartFocus Note: You must have a dedicated API login. This login will NOT have access to SmartFocus. Contact your Account Manager to have a dedicated API login. To connect through the API, the user must first obtain a manager key using the CCMD Web Application. Calling the connect method (with the login, password, manager key) will provide a token, to be used in all subsequent calls. This token will expire in the following cases: When a close connection call is made. When the maximum number of calls per session, defined by the manager in SmartFocus, is reached. When the session times out. Step 2: Build your application Integration Using APIs The first step in getting started with web services is to configure the range of remote servers that will access this module. Webmasters and developers should be able to interface with this new API with any programming language that uses standard HTTP calls. List of APIs that are available: RESTful API SOAP API SOAP API The SOAP API consists in posting an XML file through HTTP POST. API call summary: SOAP Submission URL www.smartfocus.com 7
Getting started with integration SOAP Parameters & associated values All parameter names are case sensitive. When specific values are expected, it should be assumed that parameter values are case sensitive. The order of must be strictly followed. A parameter and its contents must appear on the same line without spaces and line breaks. In this guide, line breaks have sometimes been added for display reasons. URL Encoding Considerations (for HTTP GET methods only) Some characters cannot be part of a URL - for example, spaces are not allowed. Some characters have a special meaning in a URL for example, the hash (#) character is used to locate a specific point within a page, and the equals (=) character is used to separate a name from a value. A query string may need to be converted to satisfy these constraints. This can be done using a schema known as URL encoding. In particular, encoding the query string uses the following rules: Letters (A-Z and a-z) and numbers (0-9) are not encoded. The period (.), comma (,), tilde (~), and underscore (_) characters are not encoded. A space is encoded as %20. The forward slash (/) is encoded as %2F. All other characters are encoded as %FF hex representation with any non-ascii characters first encoded as UTF-8 (or other specified encoding). To encode as RFC 1738, use the + sign to replace spaces. Security As web services are accessible over the Internet and can be interfaced with any system, there is a risk of fraudulent access and usage of the system. To tighten security, SmartFocus APIs can be accessed using the HTTPS protocol. To use HTTPS, just replace HTTP with HTTPS in all the submission URLs. www.smartfocus.com 8
Overview of the Transactional Messaging Templates & Dynamic Content API Overview of the Transactional Messaging Templates & Dynamic Content API The Transactional Messaging Templates & Dynamic Content API allows you to manage your Transactional Messages and Dynamic Content: Create, edit, and delete Messages Create, edit, and delete Dynamic Content Blocks Add, edit, track, and untrack Message and Dynamic Content Block links For further information on how to create, edit, and manage Transactional Messaging creatives, please consult the SmartFocus User Guide or SmartFocus Online Help. The following methods are available: www.smartfocus.com 9
Overview of the Transactional Messaging Templates & Dynamic Content API Connection Method openapiconnection closeapiconnection This method provides a session token when given valid credentials. This method terminates the session token. Template Management Method Template Management createtemplatebyobj deletetemplate updatetemplate updatetemplatebyobj clonetemplate gettemplate getlasttemplates gettemplatesbyfield gettemplatesbyperiod gettemplatesummarylist gettemplatepreview gettemplatepreviewbyobj gettemplatepreviewwithlinksbyobj createandaddstandardtemplateurl This method creates a Transactional Messaging Template. This method creates a Transactional Messaging Template by object. This method deletes a Transactional Messaging Template. This method updates a Transactional Messaging Template. This method updates a Template by object. This method clones a Transactional Messaging Template. This method retrieves a Transactional Messaging Template. This method retrieves the most recently created Transactional Messaging Templates. This method retrieves a list of Transactional Messaging Templates containing a given value in a specified field. This method retrieves a list of Transactional Messaging Templates created during a specified period. This method retrieves a list of Templates and their details. This method retrieves a preview of the HTML or text part of a Template without personalization. This method retrieves a Template preview by object using personalization and dynamic content fields. This method retrieves a Template preview with displayed links using personalization and dynamic content fields. This method creates and adds a standard link to the Template. createandaddpersonalizedtemplateurl This method creates and adds a personalized link to the Template. updatetemplateurlbyfield deletetemplateurl trackalltemplatelinks untrackalltemplatelinks tracktemplatelinkbyposition untracktemplatelinkbyorder getalltemplatetrackablelinks getalltemplatetrackedlinks getallunusedtemplatetrackedlinks getnotifdefaultsender getnotifnotvalidatedsenders getnotifvalidatedaltsenders addbanner This method updates a Template link by field. This method deletes a Template link. This method activates link tracking for all links in a Template. This method deactivates tracking for all the links in a Template. This method activates link tracking for a link in a specific position in a Template. This method deactivates link tracking for specific link by its order number. This method retrieves a list of all the trackable links in a Template. This method retrieves a list of all the tracked links in a Template. This method retrieves a list of all the unused tracked links in a Template. This method retrieves the Transactional Messaging default sender. This method retrieves the Transactional Messaging non-validated senders. This method retrieves the Transactional Messaging validated senders. This method adds a Dynamic Content Block to a Template. www.smartfocus.com 10
Overview of the Transactional Messaging Templates & Dynamic Content API Method testtemplatebygroup testtemplatebygroupbyobj testtemplatebymember testtemplatebymemberbyobj This method sends a test email to a group of members. This method sends a test email to a group of members. This method sends a test email to a member. This method sends a test email to a member. Dynamic Content Management Method Dynamic Content Management createbannerbyobj updatebanner updatebannerbyobj deletebanner clonebanner getbanner getlastbanners getbannersbyfield getbannersbyperiod getbannerpreview getbannerpreviewbyobj createandaddstandardbannerurl createandaddpersonalizedbannerurl updatebannerurlbyfield deletebannerurl trackallbannerlinks trackbannerlinkbyposition untrackallbannerlinks untrackbannerlinkbyorder getbannerurlbyorder getallbannertrackablelinks getallbannertrackedlinks getallunusedbannertrackedlinks This method creates a Dynamic Content Block. This method creates a Dynamic Content Block by object. This method updates a Dynamic Content Block by field and value. This method updates a Dynamic Content Block by object. This method deletes a Dynamic Content Block. This method clones a Dynamic Content Block. This method retrieves a Dynamic Content Block using its ID. This method retrieves the most recently created Dynamic Content Blocks. This method retrieves a list of Dynamic Content Blocks that contain the same given value in a specific field. This method retrieves a list of Dynamic Content Blocks from a given period. This method displays a preview of a Dynamic Content Block. This method retrieves a preview of a Dynamic Content Block by object. This method creates and adds a standard link to the Dynamic Content Block. This method creates and adds a personalized link to the Dynamic Content Block. This method updates a Dynamic Content Block link by field. This method deletes a Dynamic Content Block link. This method activates tracking for all untracked Dynamic Content Block links and saves the Dynamic Content Block. This method tracks the Dynamic Content Block link through its position in the Dynamic Content Block. This method untracks all the Dynamic Content Block links. This method untracks a link in the Dynamic Content Block by its order. This method retrieves a Dynamic Content Block link by its order number. This method retrieves a list of all the trackable links in a Dynamic Content Block. This method retrieves a list of all the tracked links in a Dynamic Content Block. This method retrieves a list of all the unused tracked links of the Dynamic Content Block. Transactional Messaging Templates and Dynamic Content API Use Cases Create a Dynamic Content Block and Add it to a Template To create a Dynamic Content Block and add it to a Template, you would typically carry out the following procedure: www.smartfocus.com 11
Overview of the Transactional Messaging Templates & Dynamic Content API 1. Use the openapiconnection method to open the connection. 2. Use the createbannerbyobj method to create the Dynamic Content Block. 3. Use the gettemplatesbyperiod method to retrieve a list of recently created Templates and find the ID of the Template to which you want to add the Dynamic Content Block. 4. Use the addbanner method to add the Dynamic Content Block to the Template. 5. Use the closeapiconnection method to close the connection. Clone a Template and Update the New Template with a Different Dynamic Content Block To add a different Dynamic Content Block to a Template: 1. Use the openapiconnection method to open the connection. 2. Use the gettemplatesbyperiod method to find the Template ID. 3. Use the clonetemplate method to clone the Template. 4. Use the getbannersbyperiod method to retrieve a list of recently created Dynamic Content Blocks and find the new Dynamic Content Block that you want to add. 5. Use the updatetemplatebyobj method to add the new Dynamic Content Block to the Template. 6. Use the closeapiconnection method to close the connection. www.smartfocus.com 12
Connection Connection Prerequisite: To use SmartFocus APIs, you need to have the API manager login provided by SmartFocus and the associated password. To connect through the API, you must first retrieve the manager key from SmartFocus. 1. Go to Account Administration and select Logins. 2. Click the Edit icon next to your API manager. 3. In the API section of the popup window, copy the API key (also known as the manager key) and use it to open a connection to retrieve the token that will be used in your calls. Calling the connect method (with the login, password, manager key) will provide a token, to be used in all subsequent calls. This token will expire in the following cases: When a close connection call is made. When the maximum number of calls per session, defined by the manager in SmartFocus, is reached. When the session times out. Recommended Token Usage An open connection call generates a token that should be used until it expires. Once the token expires, an API call will generate a session exception. At this point, you should open a new connection to continue your API calls. Example: An example workflow: 1. Open the connection to generate the token. 2. Use API method calls as needed. If a call fails due to a problem with the session: a. Send another open connection call to renew the token. b. Resend the call that failed due to the session issue. 3. Send a close connection call once all API method calls for the session have been sent successfully. Note: For time consuming calls (e.g., uploading a large file), you may need to use an open connection call to ensure that the token will remain valid for the duration of the call. www.smartfocus.com 13
openapiconnection This method provides a session token when given valid credentials. Note: The token is valid for 60 minutes. Required login The login provided for API access return pwd The password Note: API passwords expire after 365 days. The token to use in all other API calls key The manager key copied from SmartFocus (see Connection on page 13) You must fill in the apiname parameter to check rights of client on this API. You must fill in the login parameter to authentifiate on this API. You must fill in the password parameter to authentifiate on this API. You must fill in the managerkey parameter to authentifiate on this API. Error while decoding managerkey. Your login is not valid!! Your password is not valid!! No manager retrieved for those login, password. No available connection for manager {0}. {0} doesn't exist or is not activated on client account. {0} is not activated for the client. This manager does not have authorized access to this API. Error while parsing validdate on managerkey. Date not valid on managerkey! The managerkey is no longer valid. Your API access is closed! www.smartfocus.com 14
<api:openapiconnection> <login>br_test</login> <pwd>aptrokez</pwd> <key>cdx7crle_26blfnjosgfdawh6lj3y6pwg5peova</key> </api:openapiconnection> <ns2:openapiconnectionresponse xmlns:ns2="http:/ <return>{token}</return> </ns2:openapiconnectionresponse> www.smartfocus.com 15
closeapiconnection This method terminates the session token. parameter Required parameter token The connection token return The connection is closed if the operation was successful, otherwise an error code appears. No available connection for the specified token. <api:closeapiconnection> <token>{token}</token> </api:closeapiconnection> <ns2:closeapiconnectionresponse xmlns:ns2="http:// <return>connection closed</return> </ns2:closeapiconnectionresponse> www.smartfocus.com 16
Template Management Template Management createtemplate This method creates a Transactional Messaging Template. Required token The connection token return The ID of the Template name description subject from fromemail to encoding body replyto replytoemail type The name of the Template The description of the Template The subject of the Template The From name. For SMS messages, the From name cannot exceed 11 characters. The From email address The To name The encoding used (e.g. UTF-8) The body of the Template (must be between the tags <![CDATA[ and ]]> ) The Reply To name The Reply To email address The type of Template: TRANSACTIONAL SOCIALNETWORK You must fill in the name parameter. You must fill in the description parameter. You must fill in the subject parameter. You must fill in the from parameter. You must fill in the fromemail parameter. You must fill in the to parameter. You must fill in the replyto parameter. You must fill in the replytoemail parameter. Error while retrieving the default sender on your account. www.smartfocus.com 17
Template Management This sender is not configured for your account. Template type not supported. <api:createtemplate> <token>{token}</token> <name>first test</name> <description>special rose promotion template</description> <subject>special Rose Bouquet</subject> <from>john Blum, Flower power Shop</from> <fromemail>johnblum@smartfocus.com</fromemail> <to>dear Customer</to> <encoding>shift-jis</encoding> <body> <![CDATA[[EMV HTMLPART] <html> <body/> <table width="625" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" height="20"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="453" heightt="20"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" heightt="20"> </td> </tr> <tr> <td bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/logo.gif" width="453" heightt="44"> </td> <td bgcolor="#f3f3f3"> </td> </tr> <tr> <td colspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td rowspan="3" bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http:// emailvision.com/web/imgv5/framebluetop.gif" width="453" height="14"> </td> <td rowspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td bgcolor="#00a0da"> <table width="453" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> www.smartfocus.com 18
Template Management magazine.</b> <td width="433"> <font face="arial" size="3" color="#ffffff"> <b>hello, <br>you have successfully subscribed to Emailvision </font> </td> <td width="10"> </td> </tr> </table> </body> </html>]]></body> <replyto>john</replyto> <replytoemail>johnblum@smartfocus.com</replytoemail> <type>socialnetwork</type> </api:createtemplate> <ns2:createtemplateresponse xmlns:ns2="http:// <return>196</return> </ns2:createtemplateresponse> www.smartfocus.com 19
createtemplatebyobj This method creates a Transactional Messaging Template by object. Required token The connection token return The ID of the Template template The Template object You must fill in the name parameter. You must fill in the description parameter. You must fill in the subject parameter. You must fill in the from parameter. You must fill in the fromemail parameter. You must fill in the to parameter. You must fill in the encoding parameter. You must fill in the replyto parameter. You must fill in the replytoemail parameter. You must fill in the type parameter. Error while retrieving the default sender on your account. This sender is not configured for your account. Template type not supported. <api:createtemplatebyobj> <token>{token}</token> <template> <name>special Rose Bouquet</name> <description>order confirmation</description> <subject>special Rose Bouquet</subject> <from>john Blum, Flower power Shop</from> <fromemail>info@flowerpowershop.com</fromemail> <to>dear Customer</to> <encoding>shift-jis</encoding> <body> <![CDATA[[EMV TEXTPART]Dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN]LASTNAME[EMV www.smartfocus.com 20
/DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address:[emv DYN] EMAIL[EMV /DYN][EMV CONTENT]2[EMV /CONTENT]Let us know if you have any question.my Date Customer Service.[EMV HTMLPART] <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my Sample HTML</title> </head> <body> <img src="http://mypath/to/my/header.gif" width="600" height="100"/> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <font size="2" face="arial">dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN] LASTNAME[EMV /DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address: [EMV DYN]EMAIL[EMV /DYN] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</font> </td> </tr> </table>[emv CONTENT]1[EMV /CONTENT] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</body> </html>]]></body> <replyto>john Blum</replyTo> <replytoemail>john@flowerpowershop.com</replytoemail> <type>transactional</type> </template> </api:createtemplatebyobj> <ns2:createtemplatebyobjresponse xmlns:ns2="http:// <return>224</return> </ns2:createtemplatebyobjresponse> www.smartfocus.com 21
deletetemplate This method deletes a Transactional Messaging Template. Required token id The connection token return The ID of the Template true if it was successful, false if it was not successful No template found!! <api:deletetemplate> <token>{token}</token> <id>193</id> </api:deletetemplate> <ns2:deletetemplateresponse xmlns:ns2="http:// <return>true</return> </ns2:deletetemplateresponse> www.smartfocus.com 22
updatetemplate This method updates a Transactional Messaging Template. Required token The connection token return true if it was successful, false if it was not successful id field value The ID of the Template The field to update name description subject from to replyto replytoemail encoding The value to set for the field You must fill in the id parameter. You must fill in the field parameter. You must fill in the name parameter. You must fill in the encoding parameter. You must fill in the replyto parameter. No template found!! <api:updatetemplate> <token>{token}</token> <id>118</id> <field>name</field> www.smartfocus.com 23
<value>api_creation_update</value> </api:updatetemplate> <ns2:updatetemplateresponse xmlns:ns2="http:// <return>true</return> </ns2:updatetemplateresponse> www.smartfocus.com 24
updatetemplatebyobj This method updates a Template by object. Required token The connection token return true if it was successful, false if it was not successful template The Template object No template found!! Error while retrieving the default sender on your account. This sender is not configured for your account. Template type not supported. <api:updatetemplatebyobj> <token>{token}</token> <template> <id>224</id> <name>special Rose Bouquet</name> <description>order confirmation</description> <subject>special Rose Bouquet</subject> <from>john Blum, Flower power Shop</from> <fromemail>info@flowerpowershop.com</fromemail> <to>dear Customer</to> <encoding>shift-jis</encoding> <body> <![CDATA[[EMV TEXTPART]Dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN]LASTNAME[EMV /DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address:[emv DYN] EMAIL[EMV /DYN][EMV CONTENT]2[EMV /CONTENT]Let us know if you have any question.my Date Customer Service.[EMV HTMLPART] <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my Sample HTML</title> </head> <body> www.smartfocus.com 25
<img src="http://mypath/to/my/header.gif" width="600" height="100"/> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <font size="2" face="arial">dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN] LASTNAME[EMV /DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address: [EMV DYN]EMAIL[EMV /DYN] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</font> </td> </tr> </table>[emv CONTENT]1[EMV /CONTENT] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</body> </html>]]></body> <replyto>john Blum</replyTo> <replytoemail>john@flowerpowershop.com</replytoemail> <type>socialnetwork</type> </template> </api:updatetemplatebyobj> <ns2:updatetemplatebyobjresponse xmlns:ns2="http:// <return>true</return> </ns2:updatetemplatebyobjresponse> www.smartfocus.com 26
clonetemplate This method clones a Transactional Messaging Template. Required token The connection token return The ID of the Template id newname The ID of the Template The new name for the cloned Template You must fill in the id parameter. You must fill in the name parameter. No template found!! <api:clonetemplate> <token>{token}</token> <id>196</id> <newname>copy Special Rose Bouquet</newName> </api:clonetemplate> <ns2:clonetemplateresponse xmlns:ns2="http:// <return>201</return> </ns2:clonetemplateresponse> www.smartfocus.com 27
gettemplate This method retrieves a Transactional Messaging Template. Required token The connection token return The Template object id The ID of the Template You must fill in the id parameter. No template found!! Error while retrieving the default sender on your account. Error while retrieving the defined sender for this template. Template type not supported. <api:gettemplate> <token>{token}</token> <id>201</id> </api:gettemplate> <ns2:gettemplateresponse xmlns:ns2="http:// <return> <body> <![CDATA[[EMV TEXTPART]Dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN]LASTNAME[EMV /DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address:[emv DYN] EMAIL[EMV /DYN][EMV CONTENT]2[EMV /CONTENT]Let us know if you have any question.my Date Customer Service.[EMV HTMLPART] <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my Sample HTML</title> www.smartfocus.com 28
</head> <body> <img src="http://mypath/to/my/header.gif" width="600" height="100"/> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <font size="2" face="arial">dear [EMV DYN]FIRSTNAME[EMV /DYN] [EMV DYN] LASTNAME[EMV /DYN],Thank you for subscribing to MyDate.You are subscribed with the Email address: [EMV DYN]EMAIL[EMV /DYN] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</font> </td> </tr> </table>[emv CONTENT]1[EMV /CONTENT] <font size="2" face="arial">let us know if you have any question.my Date Customer Service.</body> </html>]]></body> <description>order confirmation</description> <encoding>shift-jis</encoding> <encrypt>edx7cqkmjtt88sa93241132mkjp2vtult53124zfk7l-kvde602w8wrkmk</encrypt> <from>john Blum, Flower power Shop</from> <fromemail>email@blandine.ccemails.com</fromemail> <id>201</id> <name>copy Special Rose Bouquet</name> <random>35b9838324320c004035b</random> <replyto>john Blum</replyTo> <replytoemail>john@flowerpowershop.com</replytoemail> <sent>false</sent> <subject>a more fancy subject</subject> <to>dear Customer</to> <type>transactional</type> </return> </ns2:gettemplateresponse> www.smartfocus.com 29
getlasttemplates This method retrieves the most recently created Transactional Messaging Templates. Required token The connection token return The list of Template IDs type limit The type of Template: TRANSACTIONAL SOCIALNETWORK The maximum number of Templates to retrieve You must fill in the type parameter. You must fill in the limit parameter. <api:getlasttemplates> <token>{token}</token> <type>transactional</type> <limit>10</limit> </api:getlasttemplates> <ns2:getlasttemplatesresponse xmlns:ns2="http:// <return>201</return> <return>200</return> <return>197</return> <return>196</return> <return>194</return> <return>103</return> <return>66</return> <return>30</return> <return>29</return> www.smartfocus.com 30
</ns2:getlasttemplatesresponse> www.smartfocus.com 31
gettemplatesbyfield This method retrieves a list of Transactional Messaging Templates containing a given value in a specified field. Required token The connection token return The list of Template IDs type field value The type of Template: TRANSACTIONAL SOCIALNETWORK The field containing the criteria (value): name description subject from to replyto replytoemail encoding The value to set for the field limit The size of the list (between 1 and 1000) You must fill in the type parameter. You must fill in the field parameter. You must fill in the limit parameter. You must fill in the name parameter. You must fill in the encoding parameter. You must fill in the replytoemail parameter. <api:gettemplatesbyfield> <token>{token}</token> <type>transactional</type> <field>name</field> www.smartfocus.com 32
<value>rose</value> <limit>10</limit> </api:gettemplatesbyfield> <ns2:gettemplatesbyfieldresponse xmlns:ns2="http:// <return>201</return> <return>196</return> </ns2:gettemplatesbyfieldresponse> www.smartfocus.com 33
gettemplatesbyperiod This method retrieves a list of Transactional Messaging Templates created during a specified period. Required token The connection token return The list of Template IDs type datebegin dateend The type of Template: TRANSACTIONAL SOCIALNETWORK The start date of the period to retrieve (yyyy-mm-dd HH:mm:ss) The end date of the period to retrieve (yyyy-mm-dd HH:mm:ss) You must fill in the type parameter. You must fill in the datebegin parameter. You must fill in the dateend parameter. datebegin doesn't exist or is malformed (good format is : yyyy-mm-dd HH:mm:ss). dateend doesn't exist or is malformed (good format is : yyyy-mm-dd HH:mm:ss). <api:gettemplatesbyperiod> <token>{token}</token> <type>transactional</type> <datebegin>2009-10-23 00:00:00</dateBegin> <dateend>2009-10-25 00:00:00</dateEnd> </api:gettemplatesbyperiod> www.smartfocus.com 34
<ns2:gettemplatesbyperiodresponse xmlns:ns2="http:// <return>194</return> <return>200</return> <return>201</return> <return>197</return> <return>196</return> </ns2:gettemplatesbyperiodresponse> www.smartfocus.com 35
gettemplatesummarylist This method retrieves a list of Templates and their details. parameter Required parameter token The connection token return List Options Parameters page The page to return pagesize The number of elements to return per page (default: 1000) Search Parameters search id name subject from to The search envelope The ID of the Template The name of the Template The subject of the message. Note: The subject cannot exceed 2000 characters. The From name. For SMS messages, the From name cannot exceed 11 characters. The To name mincreationdate The start date of the creation date range. maxcreationdate The end date of the creation date range. minmodifdate maxmodifdate Sort Options Parameters sortoptions sortoption column The start date of the modification date range. The end date of the modification date range. The envelope containing the sortoption envelope(s) The sortoption envelope that specifies which column should be used for the sort and in which order the sort should be applied The column that should be used for the sort id name from to creationdate modifdate The Templates and their details www.smartfocus.com 36
parameter Required order The order of the sort (i.e., ascending or descending): ASC DESC Note: The values must be in uppercase. parameter <api:gettemplatesummarylist> <token>token</token> <listoptions> <page>1</page> <pagesize>100</pagesize> <search> <minmodifdate>2013-03-18 11:00:00</minModifDate> <maxmodifdate>2013-03-18 18:00:00</maxModifDate> </search> <sortoptions> <sortoption> <column>modifdate</column> <order>asc</order> </sortoption> </sortoptions> </listoptions> </api:gettemplatesummarylist> <ns2:gettemplatesummarylistresponse xmlns:ns2= <return> <templatesummarylist> <templatesummary> <id>62</id> <name>template 2</name> <subject>the Subject</subject> <from>john Smith</from> <fromemail>john.smith@example.com</fromemail> <to>jane</to> <replyto>john Smith</replyTo> www.smartfocus.com 37
<replytoemail>john.smith@example.com</replytoemail> <creationdate>2013-03-18 11:15:07</creationDate> <modifdate>2013-03-18 17:46:50</modifDate> </templatesummary> <templatesummary> <id>61</id> <name>template 1</name> <fromemail>jane.scott@example.com</fromemail> <replytoemail>jane.scott@example.com</replytoemail> <creationdate>2013-03-18 11:12:30</creationDate> <modifdate>2013-03-18 11:12:58</modifDate> </templatesummary> </templatesummarylist> <pagesize>10</pagesize> <nbtotalitems>2</nbtotalitems> <page>1</page> <nextpage>false</nextpage> <previouspage>false</previouspage> </return> </ns2:gettemplatesummarylistresponse> www.smartfocus.com 38
gettemplatepreview This method retrieves a preview of the HTML or text part of a Template without personalization. Required token The connection token return id part The ID of the Template The part of the Template (HTML or TEXT) The Template preview for the specified part (HTML or TEXT) You must fill in the id parameter. You must fill in the part parameter. No template found!! TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. Unable to retrieve the links of the template. Unable to retrieve xheaders. The content doesn't have [EMV DYN] tags. The dyn tags are probably malformed. The content doesn't have [EMV CONTENT] tags. Error while formatting the template for send request. Error while formatting the template. Template type not supported. <api:gettemplatepreview> <token>{token}</token> <id>196</id> <part>text</part> </api:gettemplatepreview> www.smartfocus.com 39
<ns2:gettemplatepreviewresponse xmlns:ns2="http:// <return>dear,thank you for subscribing to MyDate.You are subscribed with the Email address:let us know if you have any question.my Date Customer Service.</return> </ns2:gettemplatepreviewresponse> www.smartfocus.com 40
gettemplatepreviewbyobj This method retrieves a Template preview by object using personalization and dynamic content fields. Required token The connection token return part templateperso The part of the Template to preview (HTML or TEXT) The templateperso object The Template preview with correctly displayed links You must fill in the id parameter. You must fill in the part parameter. No template found!! TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. Unable to retrieve the links of the template. Unable to retrieve xheaders. The content doesn't have [EMV DYN] tags. The dyn tags are probably malformed. The content doesn't have [EMV CONTENT] tags. Error while formatting the template for send request. Error while formatting the template. Template type not supported. <api:gettemplatepreviewbyobj> <token>{token}</token> <part>html</part> <templateperso> <contentitemlist> www.smartfocus.com 41
<contentitem> <label>1</label> <value>fdsjkhfdjkshds</value> <label>2</label> <value>aaaaaaaaaaaa</value> </contentitem> </contentitemlist> <persoitemlist> <persoitem> <label>email</label> <value>aaaaa</value> </persoitem> <persoitem> <label>firstname</label> <value>bbbbbbb</value> </persoitem> <persoitem> <label>lastname</label> <value>ccccccc</value> </persoitem> </persoitemlist> <templateid>196</templateid> </templateperso> </api:gettemplatepreviewbyobj> <ns2:gettemplatepreviewbyobjresponse xmlns:ns2="http:// <return> <![CDATA[ <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my Sample HTML</title> </head> <body> <img src="http://mypath/to/my/header.gif" width="600" height="100"/> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <a href="http://wiki.emv2.com/index.php?title=ccmd_api&action=edit">edit</a> <a href="http://wiki.emv2.com/index.php?title=ccmd_ API&action=copy">Copy</a> <a hreff="http://nmtritgr1.campaigncommander.com/h?a=cyoe9vbzcs4q8sa9mkjp2z7nghxklj3z4wjts5kgapc VJyU">Paste</a> <a hreff="http://nmtritgr1.campaigncommander.com/h?a=cyoe9vbzcs4q8sa9mkjp2z7nghxklj3z4wjts5kgapc UJyQ">Drag</a> <font size="2" face="arial">dear BBBBBBB CCCCCCC,Thank you for subscribing to My Date.You are subscribed with the Email address: johnsmith@smartfocus.com <font size="2" face="arial">let us know if you have any questions.my Date Customer Service.</font> </td> </tr> </table> <font size="2" face="arial">let us know if you have any questions.my Date Customer Service. <table width="625" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> www.smartfocus.com 42
<td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" heightt="20"> height="20"> height="20"> </td> </tr> <tr> <td bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/yahoo/logo.gif" widthh="453" height="44"> width="453" height="14"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="453" </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" </td> <td bgcolor="#f3f3f3"> </td> </tr> <tr> <td colspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td rowspan="3" bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/blueframetop.gif" </td> <td rowspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td bgcolor="#00a0da"> <table width="453" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="433"> <font face="arial" size="3" color="#ffffff"> <b>hello, <br>you have successfully subscribed to the Emailvison magazine.</b> </font> </td> <td width="10"> </td> </tr> </table>http://nmtritgr1.campaigncommander.com/h?a=ccoe9vbzcs4q8sa9mkjp2z7nghxklj3zmqjts5kga PDALk,ex5GZWU9l2g</body> </html>]]></return> </ns2:gettemplatepreviewbyobjresponse> www.smartfocus.com 43
gettemplatepreviewwithlinksbyobj This method retrieves a Template preview with displayed links using personalization and dynamic content fields. Required token The connection token return part templateperso The part of the Template to preview (HTML or TEXT) The templateperso object The Template preview You must fill in the id parameter. You must fill in the part parameter. No template found!! TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. Unable to retrieve the links of the template. Unable to retrieve xheaders. The content doesn't have [EMV DYN] tags. The dyn tags are probably malformed. The content doesn't have [EMV CONTENT] tags. Error while formatting the template for send request. Error while formatting the template. Template type not supported. <api:gettemplatepreviewwithlinksbyobj> <token>{token}</token> <part>html</part> <templateperso> <contentitemlist> <contentitem> <label>1</label> www.smartfocus.com 44
<value>fdsjkhfdjkshds</value> <label>2</label> <value>aaaaaaaaaaaa</value> </contentitem> </contentitemlist> <persoitemlist> <persoitem> <label>email</label> <value>aaaaa</value> </persoitem> <persoitem> <label>firstname</label> <value>bbbbbbb</value> </persoitem> <persoitem> <label>lastname</label> <value>ccccccc</value> </persoitem> </persoitemlist> <templateid>196</templateid> </templateperso> </api:gettemplatepreviewwithlinksbyobj> <ns2:gettemplatepreviewwithlinksbyobjresponse xmlns:ns2="http:// <return> <![CDATA[ <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my Sample HTML</title> </head> <body> <img src="http://mypath/to/my/header.gif" width="600" height="100"/> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <a href="http://wiki.emv2.com/index.php?title=ccmd_api&action=edit">edit</a> <a href="http://wiki.emv2.com/index.php?title=ccmd_ API&action=copy">Copy</a> <a hreff="http://nmtritgr1.campaigncommander.com/h?a=cyoe9vbzcs4q8sa9mkjp2z7nghxklj3z4wjts5kgapc VJyU">Paste</a> <a hreff="http://nmtritgr1.campaigncommander.com/h?a=cyoe9vbzcs4q8sa9mkjp2z7nghxklj3z4wjts5kgapc UJyQ">Drag</a> <font size="2" face="arial">dear BBBBBBB CCCCCCC,Thank you for subscribing to My Date.You are subscribed with the Email address: johnsmith@smartfocus.com <font size="2" face="arial">let us know if you have any questions.my Date Customer Service.</font> </td> </tr> </table> <font size="2" face="arial">let us know if you have any questions.my Date Customer Service. <table width="625" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" www.smartfocus.com 45
height="20"> height="20"> height="20"> </td> </tr> <tr> <td bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/yahoo/logo.gif" widthh="453" height="44"> width="453" height="14"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="453" </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/spacer.gif" width="86" </td> <td bgcolor="#f3f3f3"> </td> </tr> <tr> <td colspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td rowspan="3" bgcolor="#f3f3f3"> </td> <td bgcolor="#f3f3f3"> <img src="http://emailvision.com/web/imgv5/blueframetop.gif" </td> <td rowspan="3" bgcolor="#f3f3f3"> </td> </tr> <tr> <td bgcolor="#00a0da"> <table width="453" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="433"> <font face="arial" size="3" color="#ffffff"> <b>hello, <br>you have successfully subscribed to the Emailvison magazine.</b> </font> </td> <td width="10"> </td> </tr> </table>http://nmtritgr1.campaigncommander.com/h?a=ccoe9vbzcs4q8sa9mkjp2z7nghxklj3zmqjts5kga PDALk,ex5GZWU9l2g</body> </html>]]></return> </ns2:gettemplatepreviewwithlinksbyobjresponse> www.smartfocus.com 46
createandaddstandardtemplateurl This method creates and adds a standard link to the Template. Required token The connection token return order - The order number of the URL templateid name url The ID of the Template The name of the URL The URL of the link You must fill in the bannerid parameter. You must fill in the name parameter. You must fill in the url parameter. No banner found!! <api:createandaddstandardtemplateurl> <token>{token}</token> <templateid>176</templateid> <name>linkname</name> <url>www.smarfocus.com</url> </api:createandaddstandardtemplateurl> <ns2:createandaddstandardtemplateurlresponse xmlns:ns2="http:// <return>8</return> </ns2:createandaddstandardtemplateurlresponse> www.smartfocus.com 47
createandaddpersonalizedtemplateurl This method creates and adds a personalized link to the Template. Required token The connection token return order - The order number of the URL templateid name url The ID of the Template The name of the URL The URL of the link You must fill in the bannerid parameter. You must fill in the name parameter. You must fill in the url parameter. No banner found!! <api:createandaddpersonalizedtemplateurl> <token>{token}</token> <templateid>176</templateid> <name>linkname</name> <url>www.smarfocus.com</url> </api:createandaddpersonalizedtemplateurl> <ns2:createandaddpersonalizedtemplateurlresponse xmlns:ns2="http:// <return>8</return> </ns2:createandaddpersonalizedtemplateurlresponse> www.smartfocus.com 48
updatetemplateurlbyfield This method updates a Template link by field. Required token The connection token return id order field value The ID of the Template The order number of the URL The field of the Template: name description contenttype The value of the field Required for: the name field the contenttype field (0=TEXT, 1=HTML) Optional for: the description field true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the order parameter. You must fill in the field parameter. This link doesn't exist for the banner. You must fill in the name parameter. You must fill in the url parameter. You must fill in the field. You must fill in the action field. Banner link type not supported. www.smartfocus.com 49
<api:updatetemplateurlbyfield> <token>{token}</token> <id>165</id> <order>7</order> <field>url</field> <value>http://www.smarfocus.com</value> </api:updatetemplateurlbyfield> <ns2:updatetemplateurlbyfieldresponse xmlns:ns2="http:// <return>true</return> </ns2:updatetemplateurlbyfieldresponse> www.smartfocus.com 50
deletetemplateurl This method deletes a Template link. Required token The connection token return id order The ID of the Template The order number of the URL true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the order parameter. This link doesn't exist for the banner. <api:deletetemplateurl> <token>{token}</token> <bannerid>176</bannerid> <order>1</order> </api:deletetemplateurl> <ns2:deletetemplateurlresponse xmlns:ns2="http:// <return>true</return> </ns2:deletetemplateurlresponse> www.smartfocus.com 51
trackalltemplatelinks This method activates link tracking for all links in a Template. Required token The connection token return The ID of the last tracked URL id The ID of the Template You must fill in the id parameter. No template found!! There is no link to track. Error while tracking all template links. <api:trackalltemplatelinks> <token>{token}</token> <id>196</id> </api:trackalltemplatelinks> <ns2:trackalltemplatelinksresponse xmlns:ns2="http:// <return>1</return> </ns2:trackalltemplatelinksresponse> www.smartfocus.com 52
untrackalltemplatelinks This method deactivates tracking for all the links in a Template. Required token id The connection token return The ID of the Template true if it was successful, false if it was not successful You must fill in the id parameter. No template found!! Error while tracking all template links. <api:untrackalltemplatelinks> <token>{token}</token> <id>196</id> </api:untrackalltemplatelinks> <ns2:untrackalltemplatelinksresponse xmlns:ns2="http:// <return>true</return> </ns2:untrackalltemplatelinksresponse> www.smartfocus.com 53
tracktemplatelinkbyposition This method activates link tracking for a link in a specific position in a Template. Required token The connection token return id position part The ID of the Template The position of the link in the Template (from top to bottom) The part of the Template (HTML or TEXT) The order number of the tracked URL You must fill in the id parameter. You must fill in the position parameter. You must fill in the part parameter. No template found!! There is no any link. TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. The part parameter is not the same as HTML or TEXT. <api:tracktemplatelinkbyposition> <token>{token}</token> <id>196</id> <position>2</position> <part>html</part> </api:tracktemplatelinkbyposition> www.smartfocus.com 54
<ns2:tracktemplatelinkbypositionresponse xmlns:ns2="http:// <return>3</return> </ns2:tracktemplatelinkbypositionresponse> www.smartfocus.com 55
untracktemplatelinkbyorder This method deactivates link tracking for specific link by its order number. Required token The connection token return id order The ID of the Template The order number of the link in the Template true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the order parameter. No template found!! Error while tracking all template links. <api:untracktemplatelinkbyorder> <token>{token}</token> <id>196</id> <order>2</order> </api:untracktemplatelinkbyorder> <ns2:untracktemplatelinkbyorderresponse xmlns:ns2="http:// <return>true</return> </ns2:untracktemplatelinkbyorderresponse> www.smartfocus.com 56
getalltemplatetrackablelinks This method retrieves a list of all the trackable links in a Template. Required token The connection token return The list of link order numbers id The ID of the Template You must fill in the id parameter. No template found!! There is no link to track. <api:getalltemplatetrackablelinks> <token>{token}</token> <id>196</id> </api:getalltemplatetrackablelinks> <ns2:getalltemplatetrackablelinksresponse xmlns:ns2="http:// <return>2</return> <return>1</return> </ns2:getalltemplatetrackablelinksresponse> www.smartfocus.com 57
getalltemplatetrackedlinks This method retrieves a list of all the tracked links in a Template. Required token The connection token return The list of link order numbers id The ID of the Template You must fill in the id parameter. No template found!! There aren't tracked links. <api:getalltemplatetrackedlinks> <token>{token}</token> <id>196</id> </api:getalltemplatetrackedlinks> <ns2:getalltemplatetrackedlinksresponse xmlns:ns2="http:// <return>3</return> <return>4</return> </ns2:getalltemplatetrackedlinksresponse> www.smartfocus.com 58
getallunusedtemplatetrackedlinks This method retrieves a list of all the unused tracked links in a Template. Required token The connection token return The list of link order numbers id The ID of the Template You must fill in the id parameter. No template found!! There aren't unused tracked links. <api:getallunusedtemplatetrackedlinks> <token>{token}</token> <id>196</id> </api:getallunusedtemplatetrackedlinks> <ns2:getallunusedtemplatetrackedlinksresponse xmlns:ns2="http:// <return>1</return> <return>2</return> </ns2:getallunusedtemplatetrackedlinksresponse> www.smartfocus.com 59
getnotifdefaultsender This method retrieves the Transactional Messaging default sender. Required token The connection token return The default sender <api:getnotifdefaultsender> <token>{token}</token> </api:getnotifdefaultsender> <ns2:getnotifdefaultsenderresponse xmlns:ns2="http:// <return>email@johnsmith.ccemails.com</return> </ns2:getnotifdefaultsenderresponse> www.smartfocus.com 60
getnotifnotvalidatedsenders This method retrieves the Transactional Messaging non-validated senders. Required token The connection token return The list of non-validated senders <api:getnotifnotvalidatedsenders> <token>{token}</token> </api:getnotifnotvalidatedsenders> <ns2:getnotifnotvalidatedsendersresponse xmlns:ns2="http:// <return>email@thierry.ccemails.com</return> </ns2: getnotifnotvalidatedsendersresponse > www.smartfocus.com 61
getnotifvalidatedaltsenders This method retrieves the Transactional Messaging validated senders. Required token The connection token return The list of validated senders <api: getnotifvalidatedaltsenders> <token>{token}</token> </api: getnotifvalidatedaltsenders> <ns2: getnotifvalidatedaltsendersresponse xmlns:ns2="http:// <return>email@john.ccemails.com</return> </ns2: getnotifvalidatedaltsendersresponse> www.smartfocus.com 62
addbanner This method adds a Dynamic Content Block to a Template. Required token The connection token return templateid bannerid The ID of the Template The ID of the Dynamic Content Block true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the bannerid parameter. No template found!! No banner found!! <api:addbanner> <token>{token}</token> <id>196</id> <bannerid>83</bannerid> </api:addbanner> <ns2:addbannerresponse xmlns:ns2="http:// <return>true</return> </ns2:addbannerresponse> www.smartfocus.com 63
testtemplatebygroup This method sends a test email to a group of members. Required token The connection token return id The ID of the Template groupid The group ID to whom to send the test true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the field parameter. You must fill in the name parameter. You must fill in the encoding parameter. You must fill in the replyto parameter. No template found!! <api:testtemplatebygroup> <token>?</token> <id>176</id> <groupid>103</groupid> </api:testtemplatebygroup> <ns2:testtemplatebygroupresponse xmlns:ns2= <return>true</return> </ns2:testtemplatebygroupresponse> www.smartfocus.com 64
www.smartfocus.com 65
testtemplatebygroupbyobj This method sends a test email to a group of members. Required token The connection token return id The ID of the Template groupid The group ID to whom to send the test templateperso The templateperso object true if it was successful, false if it was not successful No template found!! TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. Unable to retrieve the links of the template. Unable to retrieve xheaders. The content doesn't have [EMV DYN] tags. The dyn tags are probably malformed. The content doesn't have [EMV CONTENT] tags. Error while formatting the template for send request. Error while formatting the template. Template type not supported. <api:testtemplatebygroupbyobj> <token>?</token> <groupid>145</groupid> <templateperso> <contentitemlist> <contentitem> <label>1</label> www.smartfocus.com 66
<value>value</value> </contentitem> </contentitemlist> <persoitemlist> <persoitem> <label>email</label> <value>jsmith@smartfocus.com</value> </persoitem> </persoitemlist> <templateid>176</templateid> </templateperso> </api:testtemplatebygroupbyobj> <ns2:testtemplatebygroupbyobjresponse xmlns:ns2="http:// <return>true</return> </ns2:testtemplatebygroupbyobjresponse> www.smartfocus.com 67
testtemplatebymember This method sends a test email to a member. Required token id memberid The connection token return The ID of the Template The ID of the member true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the field parameter. You must fill in the name parameter. You must fill in the encoding parameter. You must fill in the replyto parameter. No template found!! <api:testtemplatebymember> <token>{token}</token> <id>176</id> <memberid>103</memberid> </api:testtemplatebymember> <ns2:testtemplatebymemberresponse xmlns:ns2="http:// <return>true</return> </ns2:testtemplatebymemberresponse> www.smartfocus.com 68
www.smartfocus.com 69
testtemplatebymemberbyobj This method sends a test email to a member. Required token The connection token return id memberid templateperso The ID of the Template The ID of the member The templateperso object true if it was successful, false if it was not successful No template found!! TEXT part doesn't exist or is malformed. HTML part doesn't exist or is malformed. Unable to retrieve the links of the template. Unable to retrieve xheaders. The content doesn't have [EMV DYN] tags. The dyn tags are probably malformed. The content doesn't have [EMV CONTENT] tags. Error while formatting the template for send request. Error while formatting the template. Template type not supported. <api:testtemplatebymemberbyobj> <token>?</token> <memberid>145</groupid> <templateperso> <contentitemlist> <contentitem> <label>1</label> <value>value</value> www.smartfocus.com 70
</contentitem> </contentitemlist> <persoitemlist> <persoitem> <label>email</label> <value>jsmith@smartfocus.com</value> </persoitem> </persoitemlist> <templateid>176</templateid> </templateperso> </api:testtemplatebymemberbyobj> <ns2:testtemplatebymemberbyobjresponse xmlns:ns2="http:// <return>true</return> </ns2:testtemplatebymemberbyobjresponse> www.smartfocus.com 71
Dynamic Content Management Dynamic Content Management createbanner This method creates a Dynamic Content Block. Required token The connection token return name description contenttype content The name of the Dynamic Content Block The description of the Dynamic Content Block The content type of the Dynamic Content Block (TEXT or HTML) The content of the Dynamic Content Block (must be between the tags <![CDATA[ and ]]> ) bannerid - The ID of the Dynamic Content Block You must fill in the name parameter. You must fill in the contenttype parameter. You can't retrieve this type of banner. <api:createbanner> <token>{token}</token> <name>banner mirror link</name> <description>mirror link for HTML newsletter banner</description> <contenttype>html</contenttype> <content> <![CDATA[To read this email in your browser, click <a href="&&&">here</a>.]]> </content> </api:createbanner> www.smartfocus.com 72
Dynamic Content Management <ns2:createbannerresponse xmlns:ns2="http:// <return>165</return> </ns2:createbannerresponse> www.smartfocus.com 73
createbannerbyobj This method creates a Dynamic Content Block by object. Required token The connection token return banner The Dynamic Content Block envelope parameter. bannerid - The ID of the Dynamic Content Block You must fill in the name parameter. You can't retrieve this type of banner. You must fill in the contenttype parameter. <api:createbannerbyobj> <token>{token}</token> <banner> <content> <![CDATA[To read this email in your browser, click here.]]> </content> <contenttype>text</contenttype> <creationdate>2009-10-27t00:00:00+02:00</creationdate> <description>text version of the newsletter banner</description> <id>01</id> <modifdate>2009-10-27t00:00:00+02:00</modifdate> <name>text Banner</name> </banner> </api:createbannerbyobj> www.smartfocus.com 74
<ns2:createbannerbyobjresponse xmlns:ns2="http:// <return>171</return> </ns2:createbannerbyobjresponse> www.smartfocus.com 75
updatebanner This method updates a Dynamic Content Block by field and value. Required token The connection token return id field value The ID of the Dynamic Content Block The field of the Dynamic Content Block: name description contenttype The value of the field Required for: the name field the contenttype field (0=TEXT, 1=HTML) Optional for: the description field true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the field parameter. The field parameter doesn't exist. You must fill in the name parameter. You must fill in the contenttype parameter. You can't retrieve this type of banner. No banner found!! www.smartfocus.com 76
<api:updatebanner> <token>{token}</token> <id>165</id> <field>description</field> <value>mirror version HTML</value> </api:updatebanner> <ns2:updatebannerresponse xmlns:ns2="http:// <return>true</return> </ns2:updatebannerresponse> www.smartfocus.com 77
updatebannerbyobj This method updates a Dynamic Content Block by object. Required token The connection token return true if it was successful, false if it was not successful banner The Dynamic Content Block envelope parameter. You must fill in the id parameter. You must fill in the name parameter. You must fill in the contenttype parameter. No banner found!! You can't retrieve this type of banner. <api:updatebannerbyobj> <token>{token}</token> <banner> <content> <![CDATA[To read this email in your browser, click <a href="&&&">here</a>]]> </content> <contenttype>html</contenttype> <creationdate>2009-10-27t00:00:00+02:00</creationdate> <description>html version of the banner newsletter</description> <id>165</id> <modifdate>2009-10-27t11:05:00+02:00</modifdate> <name>html banner mirror link</name> </banner> </api:updatebannerbyobj> www.smartfocus.com 78
<ns2:updatebannerbyobjresponse xmlns:ns2="http:// <return>true</return> </ns2:updatebannerbyobjresponse> www.smartfocus.com 79
deletebanner This method deletes a Dynamic Content Block. Required token The connection token return id The ID of the Dynamic Content Block true if it was successful, false if it was not successful You must fill in the id parameter. No banner found!! <api:deletebanner> <token>{token}</token> <id>172</id> </api:deletebanner> <ns2:deletebannerresponse xmlns:ns2="http:// <return>true</return> </ns2:deletebannerresponse> www.smartfocus.com 80
clonebanner This method clones a Dynamic Content Block. Required token The connection token return id newname The ID of the Dynamic Content Block The new name of the new banner clonebannerid -The ID of the new Dynamic Content Block You must fill in the id parameter. You must fill in the name parameter. No banner found!! <api:clonebanner> <token>{token}</token> <id>165</id> <newname>mirror link HTML banner 2</newName> </api:clonebanner> <ns2:clonebannerresponse xmlns:ns2="http:// <return>173</return> </ns2:clonebannerresponse> www.smartfocus.com 81
getbanner This method retrieves a Dynamic Content Block using its ID. Required token The connection token return id The ID of the Dynamic Content Block APIBanner - The Dynamic Content Block You must fill in the id parameter. No banner found!! You can't retrieve this type of banner. <api:getbanner> <token>{token}</token> <id>171</id> </api:getbanner> <ns2:getbannerresponse xmlns:ns2="http:// <return> <content>pour visualiser cet email dans votre navigateur suivez le lien suivant &&&</content> <contenttype>text</contenttype> <description>bannière des newsletter version text</description> <id>171</id> <name>bannière TEXT</name> </return> </ns2:getbannerresponse> www.smartfocus.com 82
www.smartfocus.com 83
getlastbanners This method retrieves the most recently created Dynamic Content Blocks. Required token The connection token return limit The size of the list (between 1 and 1000) The list of Dynamic Content Block IDs You must fill in the type parameter. You must fill in the limit parameter. <api:getlastbanners> <token>{token}</token> <type>transactional</type> <limit>10</limit> </api:getlastbanners> <ns2:getlastbannersresponse xmlns:ns2="http:// <return>201</return> <return>200</return> <return>197</return> <return>196</return> <return>194</return> <return>103</return> <return>66</return> <return>30</return> <return>29</return> </ns2:getlastbannersresponse> www.smartfocus.com 84
www.smartfocus.com 85
getbannersbyfield This method retrieves a list of Dynamic Content Blocks that contain the same given value in a specific field. Required token The connection token return field value limit The field of the Dynamic Content Block: name description contenttype The value of the field Required for: the name field the contenttype field (0=TEXT, 1=HTML) Optional for: the description field The size of the list (between 1 and 1000) listids - The list of Dynamic Content Block IDs You must fill in the field parameter. You must fill in the limit parameter. You must fill in the name parameter. You must fill in the contenttype parameter. <api:getbannersbyfield> <token>{token}</token> <field>name</field> www.smartfocus.com 86
<value>dynamic Content Block</value> <limit>3</limit> </api:getbannersbyfield> <ns2:getbannersbyfieldresponse xmlns:ns2="http:// <return>173</return> <return>171</return> <return>165</return> </ns2:getbannersbyfieldresponse> www.smartfocus.com 87
getbannersbyperiod This method retrieves a list of Dynamic Content Blocks from a given period. Required token The connection token return datebegin dateend The start date of the period to retrieve (yyyy- MM-dd HH:mm:ss) The end date of the period to retrieve (yyyy-mmdd HH:mm:ss) listids - The list of Dynamic Content Block IDs You must fill in the datebegin parameter. You must fill in the dateend parameter. datebegin doesn't exist or is malformed (good format is : yyyy-mm-dd HH:mm:ss). dateend doesn't exist or is malformed (good format is : yyyy-mm-dd HH:mm:ss). <api:getbannersbyperiod> <token>{token}</token> <datebegin>2009-01-01t00:00:00+02:00</datebegin> <dateend>2009-10-27t00:00:00+02:00</dateend> </api:getbannersbyperiod> <ns2:getbannersbyperiodresponse xmlns:ns2="http:// <return>158</return> <return>160</return> www.smartfocus.com 88
<return>155</return> <return>154</return> <return>173</return> <return>156</return> <return>81</return> <return>83</return> <return>84</return> <return>165</return> <return>82</return> <return>171</return> </ns2:getbannersbyperiodresponse> www.smartfocus.com 89
getbannerpreview This method displays a preview of a Dynamic Content Block. Required token The connection token return The preview of the banner id The ID of the Dynamic Content Block You must fill in the id parameter. The content must begin with [EMV TEXTPART] OR [EMV HTMLPART]. No banner found!! The part parameter is not the same as HTML or TEXT. <api:getbannerpreview> <token>{token}</token> <id>171</id> </api:getbannerpreview> <ns2:getbannerpreviewresponse xmlns:ns2="http:// <return>to view this email click here</return> </ns2:getbannerpreviewresponse> www.smartfocus.com 90
getbannerpreviewbyobj This method retrieves a preview of a Dynamic Content Block by object. Required token The connection token return bannerperso The banner personalized object, containing: bannerid: The ID of the Dynamic Content Block to preview dynlist: The list of dyn tags, containing labels and values for each of the personalization fields. formattedbanner - The formatted preview of the Dynamic Content Block You must fill in the id parameter. The content must begin with [EMV TEXTPART] OR [EMV HTMLPART]. No banner found!! The part parameter is not the same as HTML or TEXT. <api:getbannerpreviewbyobj> <token>{token}</token> <bannerperso> <bannerid>165</bannerid> <dynlist> <dyn> <label>lastname</label> <value>emailvision</value> </dyn> </dynlist> </bannerperso> </api:getbannerpreviewbyobj> www.smartfocus.com 91
<ns2:getbannerpreviewbyobjresponse xmlns:ns2="http:// <return> <![CDATA[ <html> <head> </head> <body>bonjour Emailvision, pour visualiser cet email dans votre navigateur, suivez ce <a href="http://nmtritgr1.campaigncommander.com/h?a=ccoe9vbzcs4qdt_ Cz12wJAXnGHxKLJ3zbwjtS5kGaPDALk,ex5GZWcJ97Q">lien</a> </body> </html>]]></return> </ns2:getbannerpreviewbyobjresponse> www.smartfocus.com 92
createandaddstandardbannerurl This method creates and adds a standard link to the Dynamic Content Block. Required token The connection token return order - The order number of the URL bannerid name url The ID of the Dynamic Content Block The name of the URL The URL of the link You must fill in the bannerid parameter. You must fill in the name parameter. You must fill in the url parameter. No banner found!! <api:createandaddstandardbannerurl> <token>{token}</token> <bannerid>165</bannerid> <name>emailvision</name> <url>http://www.smarfocus.com</url> </api:createandaddstandardbannerurl> <ns2:createandaddstandardbannerurlresponse xmlns:ns2="http:// <return>8</return> </ns2:createandaddstandardbannerurlresponse> www.smartfocus.com 93
www.smartfocus.com 94
createandaddpersonalizedbannerurl This method creates and adds a personalized link to the Dynamic Content Block. Required token The connection token return order - The order number of the URL bannerid name url The ID of the Dynamic Content Block The name of the URL The URL of the link You must fill in the bannerid parameter. You must fill in the name parameter. You must fill in the url parameter. No banner found!! <api:createandaddpersonalizedbannerurl> <token>{token}</token> <bannerid>165</bannerid> <name>emailvision</name> <url>http://www.smarfocus.com</url> </api:createandaddpersonalizedbannerurl> <ns2:createandaddpersonalizedbannerurlresponse xmlns:ns2="http:// <return>8</return> </ns2:createandaddpersonalizedbannerurlresponse> www.smartfocus.com 95
www.smartfocus.com 96
deletebannerurl This method deletes a Dynamic Content Block link. Required token The connection token return bannerid order The ID of the Dynamic Content Block The order number of the URL true if it was successful, false if it was not successful You must fill in the bannerid parameter. You must fill in the order parameter. This link doesn't exist for the banner. <api:deletebannerurl> <token>{token}</token> <bannerid>150</bannerid> <order>1</order> </api:deletebannerurl> <ns2:deletebannerurlresponse xmlns:ns2="http:// <return>true</return> </ns2:deletebannerurlresponse> www.smartfocus.com 97
trackallbannerlinks This method activates tracking for all untracked Dynamic Content Block links and saves the Dynamic Content Block. Required token The connection token return id The ID of the Dynamic Content Block lastorder - The last tracked link's order number You must fill in the id parameter. No banner found!! There is no link to track. <api:trackallbannerlinks> <token>{token}</token> <id>165</id> </api:trackallbannerlinks> <ns2:trackallbannerlinksresponse xmlns:ns2="http:// <return>2</return> </ns2:trackallbannerlinksresponse> www.smartfocus.com 98
trackbannerlinkbyposition This method tracks the Dynamic Content Block link through its position in the Dynamic Content Block. Required token The connection token return id position The ID of the Dynamic Content Block The position of the link in the Dynamic Content Block order - The order number of the URL You must fill in the id parameter. You must fill in the position parameter. No banner found!! <api:trackbannerlinkbyposition> <token>{token}</token> <id>165</id> <position>2</position> </api:trackbannerlinkbyposition> <ns2:trackbannerlinkbypositionresponse xmlns:ns2="http://api.service. apitransactional.emailvision.com/"> <return>3</return> </ns2:trackbannerlinkbypositionresponse> www.smartfocus.com 99
untrackallbannerlinks This method untracks all the Dynamic Content Block links. Required token The connection token return id The ID of the Dynamic Content Block true if it was successful, false if it was not successful You must fill in the id parameter. No banner found!! <api:untrackallbannerlinks> <token>{token}</token> <id>165</id> </api:untrackallbannerlinks> <ns2:untrackallbannerlinksresponse xmlns:ns2="http:// <return>true</return> </ns2:untrackallbannerlinksresponse> www.smartfocus.com 100
untrackbannerlinkbyorder This method untracks a link in the Dynamic Content Block by its order. Required token The connection token return id order The ID of the Dynamic Content Block The order number of the URL true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the order parameter. No banner found!! <api:untrackbannerlinkbyorder> <token>{token}</token> <id>165</id> <order>6</order> </api:untrackbannerlinkbyorder> <ns2:untrackbannerlinkbyorderresponse xmlns:ns2="http:// <return>true</return> </ns2:untrackbannerlinkbyorderresponse> www.smartfocus.com 101
updatebannerurlbyfield This method updates a Dynamic Content Block link by field. Required token The connection token return bannerid order field value The ID of the Dynamic Content Block The order number of the URL The field of the Dynamic Content Block: name description contenttype The value of the field Required for: the name field the contenttype field (0=TEXT, 1=HTML) Optional for: the description field true if it was successful, false if it was not successful You must fill in the id parameter. You must fill in the order parameter. You must fill in the field parameter. This link doesn't exist for the banner. You must fill in the name parameter. You must fill in the url parameter. You must fill in the field. You must fill in the action field. Banner link type not supported. www.smartfocus.com 102
<api:updatebannerurlbyfield> <token>{token}</token> <bannerid>165</bannerid> <order>7</order> <field>url</field> <value>http://www.smarfocus.com</value> </api:updatebannerurlbyfield> <ns2:updatebannerurlbyfieldresponse xmlns:ns2="http:// <return>true</return> </ns2:updatebannerurlbyfieldresponse> www.smartfocus.com 103
getbannerurlbyorder This method retrieves a Dynamic Content Block link by its order number. Required token The connection token return bannerid order The ID of the Dynamic Content Block The order number of the URL APIBannerLink - The Dynamic Content Block link You must fill in the bannerid parameter. You must fill in the order parameter. This link doesn't exist for the banner. <api:getbannerurlbyorder> <token>{token}</token> <bannerid>165</bannerid> <order>7</order> </api:getbannerurlbyorder> <ns2:getbannerurlbyorderresponse xmlns:ns2="http:// <return> <bannerid>165</bannerid> <clientid>41</clientid> <id>154</id> <name>url7</name> <order>7</order> <type>standard</type> www.smartfocus.com 104
<url>http://www.smarfocus.com</url> </return> </ns2:getbannerurlbyorderresponse> www.smartfocus.com 105
getallbannertrackablelinks This method retrieves a list of all the trackable links in a Dynamic Content Block. Required token The connection token return id The ID of the Dynamic Content Block listorders - The list of all the trackable links in the Dynamic Content Block You must fill in the id parameter. No banner found!! There aren't trackable links. <api:getallbannertrackablelinks> <token>{token}</token> <id>165</id> </api:getallbannertrackablelinks> <ns2:getallbannertrackablelinksresponse xmlns:ns2="http:// <return>1</return> </ns2:getallbannertrackablelinksresponse> www.smartfocus.com 106
getallbannertrackedlinks This method retrieves a list of all the tracked links in a Dynamic Content Block. Required token The connection token return id The ID of the Dynamic Content Block listorders - The list of all the tracked links in the Dynamic Content Block You must fill in the id parameter. There aren't tracked links. <api:getallbannertrackedlinks> <token>{token}</token> <id>165</id> </api:getallbannertrackedlinks> <ns2:getallbannertrackedlinksresponse xmlns:ns2="http:// <return>5</return> <return>7</return> </ns2:getallbannertrackedlinksresponse> www.smartfocus.com 107
getallunusedbannertrackedlinks This method retrieves a list of all the unused tracked links of the Dynamic Content Block. Required token The connection token return id The ID of the Dynamic Content Block listorders - The list of all the unused tracked links in the Dynamic Content Block You must fill in the id parameter. No banner found!! There aren't unused tracked links. <api:getallunusedbannertrackedlinks> <token>{token}</token> <id>165</id> </api:getallunusedbannertrackedlinks> <ns2:getallunusedbannertrackedlinksresponse xmlns:ns2="http:// <return>1</return> <return>2</return> <return>3</return> <return>4</return> <return>6</return> </ns2:getallunusedbannertrackedlinksresponse> www.smartfocus.com 108
Reference Reference WADL The Web Application Language (WADL) is a machine-readable XML-based language that provides a model for describing HTTP-based web applications (such as REST web services). Web Services The W3C defines a Web service as a software system designed to support interoperable Machine to Machine interaction over a network. Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services. The W3C Web service definition encompasses many different systems, but in common usage the term refers to clients and servers that communicate XML messages that follow the SOAP-standard. Common in both the field and the terminology is the assumption that there is also a machine readable description of the operations supported by the server, a description in the WSDL. The latter is not a requirement of SOAP endpoint, but it is a prerequisite for automated client-side code generation in the mainstream Java and.net SOAP frameworks. Some industry organizations, such as the WS-I, mandate both SOAP and WSDL in their definition of a Web service. WSDL The Web Services Language (WSDL, pronounced 'wiz-dull' or spelled out, 'W-S-D-L') is an XML-based language that provides a model for describing Web services. Version 2.1 has not been endorsed by the World Wide Web Consortium (W3C). Version 2.0, for which several drafts have been released, is expected to become a W3C recommendation. WSDL is an XMLbased service description on how to communicate using web services. The WSDL defines services as collections of network endpoints, or ports. WSDL specification provides an XML format for documents for this purpose. WSDL is often used in combination with SOAP and XML Schema to provide web services over the Internet. A client program connecting to a web service can read the WSDL to determine what functions are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to actually call one of the functions listed in the WSDL. XML The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language. The XML recommendation specifies both the structure of XML, and the requirements for XML processors. XML is considered "general-purpose" because it enables anyone to originate and use a markup language for many types of applications and problem domains. Numerous formally defined markup languages are based on XML, such as RSS, MathML, GraphML, XHTML, Scalable Vector Graphics, MusicXML, and thousands of others. XML's primary purpose is to facilitate the sharing of data across different information systems, particularly systems connected via the Internet. It is a simplified subset of Standard Generalized Markup Language (SGML), and is designed to be relatively human-legible. www.smartfocus.com 109