API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console

POST /v1/dms-templates/preview-draft

POST/v1/dms-templates/preview-draft

Render a live preview of an unsaved template draft.

Data model

This operation works on the entity DMS Template (dms_template). All 16 fields — type, validation, required status, relationships — are listed in the schema reference.

Request body

NameTypeDescription
htmlTemplaterequiredstring
cssStylesstring
paperSizestring
orientationstring
marginsobject
headerHtmlstring
footerHtmlstring
sampleDataobject

Example

curl -X POST https://api.codemeta-os.de/v1/dms-templates/preview-draft \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "htmlTemplate": "string",
  "cssStyles": "string",
  "paperSize": "string",
  "orientation": "PORTRAIT",
  "margins": null,
  "headerHtml": "string",
  "footerHtml": "string",
  "sampleData": null
}'
const result = await cm.dms-templates.post({
  "htmlTemplate": "string",
  "cssStyles": "string",
  "paperSize": "string",
  "orientation": "PORTRAIT",
  "margins": null,
  "headerHtml": "string",
  "footerHtml": "string",
  "sampleData": null
});

Response codes

HTTP Meaning
200 Default Response

Search