API reference / Templates
Templates
GET /v1/templates
List Templates
D46(f): the CLI's `template list`.
Query
-
limitinteger (>= 1, <= 200) default50 -
offsetinteger (>= 0) default0
Responses
- 200 TemplatePage
- 4xx 5xx
application/problem+json; see the error reference.
POST /v1/templates
Create Template
Request body (application/json, required)
| Member | Type | Notes |
|---|---|---|
fields | array of FieldSpecFieldSpec | |
name required | string (min length 1, max length 300) | |
pdf_base64 required | string | |
recipients | array of RecipientSpecRecipientSpec |
Responses
- 201 TemplateOut
- 4xx 5xx
application/problem+json; see the error reference.
GET /v1/templates/{tpl_id}
Get Template
D46(f): the CLI's `template pull` — the definition round-trips.
Path
tpl_idstring
Responses
- 200 TemplateOut
- 4xx 5xx
application/problem+json; see the error reference.
PATCH /v1/templates/{tpl_id}
Patch Template
D54/TE-6: replaces the parts given and bumps `version`. Documents already created from the template are unaffected.
Path
tpl_idstring
Request body (application/json, required)
| Member | Type | Notes |
|---|---|---|
fields | array of FieldSpec | nullFieldSpec | |
name | string (min length 1, max length 300) | null | |
recipients | array of RecipientSpec | nullRecipientSpec |
Responses
- 200 TemplateOut
- 4xx 5xx
application/problem+json; see the error reference.
DELETE /v1/templates/{tpl_id}
Delete Template
D54: soft delete — the template disappears from list/get/use; documents created from it are unaffected.
Path
tpl_idstring
Responses
- 204 no body
- 4xx 5xx
application/problem+json; see the error reference.
POST /v1/templates/{tpl_id}/duplicate
Duplicate Template
T-5: a new template (version 1) from the same PDF and definition.
Path
tpl_idstring
Request body (application/json)
Type: DuplicateTemplateIn | null
Responses
- 201 TemplateOut
- 4xx 5xx
application/problem+json; see the error reference.
POST /v1/templates/{tpl_id}/use
Use Template
Path
tpl_idstring
Request body (application/json, required)
| Member | Type | Notes |
|---|---|---|
date_format | string | null | |
display_timezone | string | null | |
form_values | object of string | Prefill values keyed by field name, or by field index as a string in the template's field order ("0", "1", …). An unknown key fails the request with 422. |
recipients required | array of RecipientSpecRecipientSpec | |
redirect_url | string | null | |
title | string | null |
Responses
- 201 DocumentOut
- 4xx 5xx
application/problem+json; see the error reference.