Replace template field positions
/document-templates/{id}/positionsReplaces the template's whole set of placements with positions (empty clears it) and returns it ordered by page, y, then id. Keys are snake_case, including element_type, element_id and style; unknown or camelCase keys are 422 prohibited. Business rules (page bounds, DocuSign elements) are 422 on the field positions, rule invalid. Needs only the scope. dry_run previews it. Emits document_template.updated with changed_fields ["positions"] after commit, only when the set differs; no email. Sending the old set undoes it.
Path parameters
The record's id.
Query parameters
Validate and run the call without committing it, returning what the real call would return with
meta.dry_runset.
Headers
Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.
Request body
application/json, required
Every placement the template should have.
{
"positions": [
{
"reference": "full_name",
"page": 1,
"x": 120.5,
"y": 640,
"width": 200,
"height": 24,
"style": {
"font_size": 11,
"align": "L"
}
}
]
}Responses
{
"data": [
{
"id": 4183,
"reference": "full_name",
"kind": "field",
"element_type": null,
"element_id": null,
"required": true,
"conditions": [],
"page": 1,
"x": 120.5,
"y": 640,
"width": 200,
"height": 24,
"style": {
"font_size": 11,
"align": "L"
}
}
]
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X PUT https://your-org-domain/kong/core/api/v2/document-templates/{id}/positions\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"\
-d '{
"positions": [
{
"reference": "full_name",
"page": 1,
"x": 120.5,
"y": 640,
"width": 200,
"height": 24,
"style": {
"font_size": 11,
"align": "L"
}
}
]
}'