Skip to main content

Update a document template (JSON Merge Patch).

PATCH/api/v1/document-templates/{document_template_id}document_templates:write

The project and deletion are read-only. document_id changes only for an orphaned template, whose document no longer exists (the Portal's upload of a replacement file): the new document must be readable and a .docx or .xlsx, as when creating one; for any other template it is read-only.

Scopedocument_templates:write
AsynchronousNo
MCP toolupdate_document_template
Portal permissionsedit_document_templates

Parameters​

NameInTypeRequiredDescription
document_template_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-MatchheaderstringOptional

Request body​

Content typeType
application/jsonDocumentTemplatePatchInput
application/merge-patch+jsonDocumentTemplatePatchInput

Responses​

StatusDescriptionBody
200Success.application/json DocumentTemplate or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
412precondition_failedapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentTemplate​

FieldTypeRequiredDescription
deleted_atstring (date-time) or nullRequired
document_idstringRequiredThe document holding the template file.
document_template_idstringRequired
output_document_typeobject or nullRequired
project_idstring or nullRequired
template_namestring or nullRequired

DocumentTemplatePatchInput​

FieldTypeRequiredDescription
deleted_atstring (date-time) or nullOptional
document_idstring or nullOptionalThe document holding the template file. Changes only while the template's document no longer exists (an orphaned template); the new document must be readable and a .docx or .xlsx.
document_template_idstring or nullOptional
output_document_typeobject or nullOptional
project_idstring or nullOptional
template_namestring or nullOptional