This documentation has moved

XML API documentation can now be found at developer.openprovider.com. This page will remain available until September 2026, but will no longer be updated.

The XML API itself is not changing. Your existing integration continues to work.

API Module Email Templates createEmailTemplateRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Raw XML)
(Module Email Templates > Create)
 
(5 intermediate revisions not shown)
Line 9: Line 9:
|-
|-
|'''Use'''
|'''Use'''
-
|Creates an email template with the provided data
+
|Create email template with the provided attributes
 +
''Note: It is much more convenient to modify e-mail template for reseller control panel''
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|'''Input'''
|'''Input'''
Line 17: Line 18:
*isDefault
*isDefault
*isActive
*isActive
-
*locale All supported locale codes http://demo.icu-project.org/icu-bin/locexp
+
*locale (All supported locale codes http://demo.icu-project.org/icu-bin/locexp)
*fields
*fields
*[[API Format tags|tags]]
*[[API Format tags|tags]]
Line 23: Line 24:
|'''Output'''
|'''Output'''
|
|
-
* id
+
* id (id of the email template)
|}
|}
Line 127: Line 128:
     <nowiki><code>0</code></nowiki>
     <nowiki><code>0</code></nowiki>
     <desc></desc>
     <desc></desc>
-
     <data>1404</data>
+
     <data><id>1404</id></data>
   </reply>
   </reply>
  </openXML>
  </openXML>

Current revision as of 12:41, 17 June 2016

Contents

Module Email Templates > Create

Module Email Templates
Command name createEmailTemplateRequest
Use Create email template with the provided attributes

Note: It is much more convenient to modify e-mail template for reseller control panel

Input
Output
  • id (id of the email template)

Examples

Using PHP class

$request = new OP_Request; 
$request->setCommand('createEmailTemplateRequest')
   ->setAuth(array('username' => 'username', 'password' => 'password'))
   ->setArgs([
       'name' => 'Demo template',
       'group' => 'ive',
       'isDefault' => true,
       'isActive' => true,
       'locale' => ['nl_NL'],
       'fields' => [
           [
               'name' => 'senderEmail',
               'value' => 'myemail@mycompany.eu',
           ],
           [
               'name' => 'confirmUrl',
               'value' => 'http://icann-verification.registrar.eu/?email=%%email%%&authCode=%%authCode%%',
           ],
           [
               'name' => 'resellerName',
               'value' => 'demo Co',
           ],
           [
               'name' => 'subject',
               'value' => 'Initial E-mail verification',
           ],
           [
               'name' => 'body',
               'value' => '%%confirmUrl%% and %%respondDate%%',
           ],
           [
               'name' => 'reminderSubject',
               'value' => 'Email verification reminder',
           ],
           [
               'name' => 'reminderBody',
               'value' => '%%confirmUrl%% and %%respondDate%%',
           ],
       ],
   ]);

Raw XML

Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <createEmailTemplateRequest>
    <name>Demo template</name>
    <group>ive</group>
    <isDefault>0</isDefault>
    <isActive>0</isActive>
    <locale>
      <array>
        <item>en_US</item>
      </array>
    </locale>
    <fields>
      <array>
        <item>
          <name>senderEmail</name>
          <value>do-not-reply@registrar.eu</value>
        </item>
        <item>
          <name>confirmUrl</name>
          <value>http://icann-verification.registrar.eu/?email=%%email%%&authCode=%%authCode%%</value>
        </item>
        <item>
          <name>resellerName</name>
          <value>demo Co</value>
        </item>
        <item>
          <name>subject</name>
          <value>My subject Email verification</value>
        </item>
        <item>
          <name>body</name>
          <value>%%confirmUrl%% and %%respondDate%%</value>
        </item>
        <item>
          <name>reminderSubject</name>
          <value>My Email verification reminder</value>
        </item>
        <item>
          <name>reminderBody</name>
          <value>%%confirmUrl%% and %%respondDate%%</value>
        </item>
      </array>
    </fields>
 </createEmailTemplateRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    <code>0</code>
    <desc></desc>
    <data><id>1404</id></data>
  </reply>
</openXML>
Views
Personal tools