Template

Updates a Template.

Updates a Template.

PATCH/api/templates/{id}

Authorizations

X-AUTH-TOKEN
stringheaderrequired

Value for the X-AUTH-TOKEN header parameter.

Path Parameters

id
stringrequired

Template identifier

Request Body

application/json
required

The updated Template resource

{
  "id": 12345,
  "identifier": "my_template_document",
  "description": "Invoice for contract <<contract.number>>",
  "comment": "This is a special template",
  "fileName": "invoice_<<contract.number>>",
  "color": "#083E5D",
  "maxPageAmount": 10,
  "xmlContent": "string",
  "maxBlockedAmount": 10,
  "paused": false,
  "customId": "<<contract.number>>",
  "legacy": false,
  "chartIdentifiers": [
    "consumption",
    "balance"
  ],
  "validatorIdentifiers": [
    "address_validator",
    "product_validator"
  ],
  "qrCodeIdentifiers": [
    "myqrcode"
  ],
  "emailAttachmentIdentifiers": [
    "terms_pdf",
    "sepa_mandate"
  ],
  "file": "data:application/docx;base64,UEsDBBQABg...",
  "brandLayoutDisabled": false,
  "brandLayoutLint": [
    "string"
  ],
  "createdBy": "user1@company.com",
  "updatedBy": "user1@company.com",
  "createdAt": "2024-08-23T00:00:00+00:00",
  "updatedAt": "2024-08-23T00:00:00+00:00",
  "active": true,
  "activeFrom": "2024-01-01",
  "groupIdentifier": "my_group",
  "groupCondition": "data['contract']['balance'] > 0"
}

Response

200application/json

Template resource updated

id
integer

Identifier generated by Output.Rocks.

Example: 12345

identifier
stringrequired

Unique identifier to be used for mappings

Example: "my_template_document"

description
string

Template description / title. <<>>-Syntax can be used for dynamical generation.

Example: "Invoice for contract <<contract.number>>"

comment
string

Comments and notes

Example: "This is a special template"

fileName
string

Target file name without extension <<>>-Syntax can be used for dynamical generation.

Example: "invoice_<<contract.number>>"

color
string

HTML color code to be used on Dashboard-charts and statistics.

Example: "#083E5D"

maxPageAmount
integer

Maximum expected pages amount in rendered documents. Documents with page amount > limit will be marked and displayed on Dashboard.

Example: 10

path
string | null
xmlContent
string | null

Normalized OpenXML package content extracted from the uploaded DOCX template.

maxBlockedAmount
integer

Maximum amount of accepted errors. Template will be paused in case of reaching this limit

Example: 10

paused
boolean

Paused flag. Default: false

Available options: truefalse

Example: false

customId
string

Optional value in <<>>-Syntax to be extracted and stored on each rendered document.

Example: "<<contract.number>>"

legacy
boolean

Legacy flag. To be used only on systems with activated legacy module. Default: false

Available options: truefalse

Example: false

chartIdentifiers
string[]

Identifier list of charts, used in current template

Example: ["consumption","balance"]

validatorIdentifiers
string[]

Identifier list of validators, to be executed on current template

Example: ["address_validator","product_validator"]

qrCodeIdentifiers
string[]

Identifier list of QR-Code definitions, to be used on current template

Example: ["myqrcode"]

emailAttachmentIdentifiers
string[]

Identifier list of static PDF attachments appended to rendered PDFs

Example: ["terms_pdf","sepa_mandate"]

file
string<binary>

base64 encoded file

Example: "data:application/docx;base64,UEsDBBQABg..."

brandLayoutDisabled
boolean

Opt-out from the brand's document layout for this template.

Available options: truefalse

Example: false

brandLayoutLint
string | null[] | null

What a brand layout would take away from this template - its own headers, footers or section breaks - recorded when the file is uploaded. Advisory: it never blocks a save.

createdBy
string

User, created this entry

Example: "user1@company.com"

updatedBy
string

User, updated this entry

Example: "user1@company.com"

createdAt
string<date-time>

UTC date time of entry creation

Example: "2024-08-23T00:00:00+00:00"

updatedAt
string<date-time>

UTC date time of last entry update

Example: "2024-08-23T00:00:00+00:00"

client
object
subClient
object
brandIdentifier
stringrequired

Example: "default"

active
boolean

Active flag. Default: true

Available options: truefalse

Example: true

activeFrom
string<date-time>

Date to activate the entry. Default: today

Example: "2024-01-01"

versionGroup
string<uuid>

Immutable lineage key shared by all versions of this configuration entry.

versionNumber
integer

Monotonic version counter within the version group. Display/audit only, not part of resolution.

Example: 1

supersededAt
string<date-time>

Moment from which this version is superseded by a newer version of the same version group. Null while the version is (or is scheduled to become) the current one.

changeSummaryDe
string

AI generated German summary of the changes introduced by this version.

changeSummaryEn
string

AI generated English summary of the changes introduced by this version.

summaryStatus
enum<string>

Generation status of the AI change summary.

Available options: pendingdonefailed

groupIdentifier
string

Optional group identifier to be used with group conditions

Example: "my_group"

groupCondition
string

Group condition.

Example: "data['contract']['balance'] > 0"

reviewCondition
string

Review condition.

Example: "data['contract']['id'] > 1000"

subClientDefault
boolean

Default for environmental tenants (sub-clients)

Available options: truefalse

Example: false

brandLayoutLintCount
integer

Findings count only, so a list can flag a template without carrying the whole report.

brandLayoutLintFailed
boolean

A count cannot express "not checked": an inspection that failed reports zero findings and would read in a list exactly like one that found nothing wrong. These are the templates whose layout impact is unknown, so the list has to be able to tell them apart.

Available options: truefalse

subClientId
integer

SubClient ID. Provided on instances with enabled sub-client module only.

Example: 3

subClientDescription
string

SubClient description. Provided on instances with enabled sub-client module only.

Example: "Branch Office A"

subClientColor
string

SubClient display colour. Provided on instances with enabled sub-client module only.

Example: "#083E5D"