API Module Email Templates modifyEmailTemplateRequest
From Openprovider API documentation
(Difference between revisions)
(→Module Email Templates > Create) |
(→Raw XML) |
||
Line 71: | Line 71: | ||
===Raw XML=== | ===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.'' | ''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> | ||
+ | <modifyEmailTemplateRequest> | ||
+ | <id>1408</id> | ||
+ | <name>Demo template</name> | ||
+ | <group>ive</group> | ||
+ | <isDefault>0</isDefault> | ||
+ | <isActive>1</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> | ||
+ | </modifyEmailTemplateRequest> | ||
+ | </openXML> |
Revision as of 13:45, 17 September 2015
Contents |
Module Email Templates > Create
Module | Email Templates |
Command name | modifyEmailTemplateRequest |
Use | Modifies the data of an existing email template |
Input |
|
Output |
|
Examples
Using PHP class
$request = new OP_Request; $request->setCommand('modifyEmailTemplateRequest') ->setAuth(array('username' => 'username', 'password' => 'password')) ->setArgs([ 'id' => 1234, '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> <modifyEmailTemplateRequest> <id>1408</id> <name>Demo template</name> <group>ive</group> <isDefault>0</isDefault> <isActive>1</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> </modifyEmailTemplateRequest> </openXML>