GET /api/email-templates
<?xml version="1.0" encoding="UTF-8"?> <email-templates type="array" page="1" per_page="100" total="2"> <email-template> ... </email-template> <email-template> ... </email-template> </email-templates>
GET /api/email-templates/{id}
<?xml version="1.0" encoding="UTF-8"?> <email-template> <id type="integer">7</id> <name>Template 1</name> <type>OFFERS</type> <subject>Your offer</subject> <text>Dear Sir or Madam,...</text> <bcc type="integer">1</bcc> <is_default type="integer">1</is_default> </email-template>
POST /api/email-templates
XML element | Description | Type | Default value | Mandatory |
---|---|---|---|---|
name | Name of the template | ALNUM | yes | |
type | Document type | ALNUM (“INVOICES”, “OFFERS”, “CONFIRMATIONS”, “CREDIT_NOTES”, “DELIVERY_NOTES”, “REMINDERS”, “PAYMENT_THANKS”) | yes | |
subject | Subject | ALNUM | ||
text | Message text | ALNUM | ||
bcc | Specifies whether the sender should get a copy as BCC (1=yes, 0=no) | BOOL | no | yes |
is_default | Specifies whether this is the standard template (1=yes, 0=no) | BOOL | no | yes |
<email-template> <name>Template 1</name> <type>INVOICES</type> <subject>Your invoice</subject> <text>Dear Sir or Madam,...</text> <bcc>1</bcc> <is_default>1</is_default> </email-template>
<?xml version="1.0" encoding="UTF-8"?> <email-template> <id type="integer">11</id> <name>Template 1</name> <type>INVOICES</type> <subject>Your invoice</subject> <text>Dear Sir or Madam,...</text> <bcc type="integer">1</bcc> <is_default type="integer">1</is_default> </email-template>
PUT /api/email-templates/{id}
<email-template> <name>Template 1</name> <bcc>0</bcc> <is_default>1</is_default> </email-template>
DELETE /api/email-templates/{id}