List all templates
GET /api/templates
<?xml version="1.0" encoding="UTF-8"?>
<templates type="array">
<template>
...
</template>
<template>
...
</template>
</templates>
The list can be filtered with parameters:
GET /api/template?type=INVOICE
Shows all invoice templates. It doesn’t matter if you use upper– or lowercase.
The following parameters can be used:
| Parameter | Description |
|---|---|
| type | Type of the template (INVOICE, OFFER, CONFIRMATION, REMINDER, DELIVERY_NOTE, CREDIT_NOTE) |
Show a specific template
GET /api/templates/{id}
<?xml version="1.0" encoding="UTF-8"?>
<template>
<id type="integer">1</id>
<created type="datetime">2007-12-13T12:12:00+01:00</created>
<type>INVOICE</type>
<name>My frist template</name>
<format>doc</format>
<base64file>{base64 file}</base64file>
</template>
Create template
POST /api/templates
| XML element | Description | Type | Default value | Mandatory |
|---|---|---|---|---|
| name | Name of the template | ALNUM | yes | |
| type | Type (INVOICE, OFFER, CONFIRMATION, REMINDER, DELIVERY_NOTE, CREDIT_NOTE) | Type of the template | yes | |
| format | Format (doc, docx or rtf) | File format | yes | |
| base64file | base64 coded template file | yes |
<template>
<name>My first template</name>
<type>INVOICE</type>
<format>doc</format>
<base64file>{base64 file}</base64file>
</template>
<?xml version="1.0" encoding="UTF-8"?>
<template>
<id type="integer">1234</id>
<created type="datetime">2007-12-13T12:12:00+01:00</created>
<type>INVOICE</type>
<name>My first template</name>
<format>doc</format>
<base64file>{b{base64 file}</base64file>
</template>
Edit template
PUT /api/templates/{id}
<template>
<name>Special template</name>
</template>
Delete template
DELETE /api/templates/{id}
Deletes a template.
Preview of a template
GET /api/templates/{id}/thumb
Returns the first page of the template,
The desired image format can be specified via the parameter format.
| Parameter | Description |
|---|---|
| format | Image format (png, gif or jpg). The default format is png. |
English »
Deutsch