跳到主要内容

查询可用模板

此端点允许查询书写系统中可用的所有模板。

Request​

ENDPOINT
/document_generator/document_template
MÉTODO
GET

Query Params​

字段类型描述必填
document_typestring文件类型。document_type 枚举否
pageinteger页码(默认:1)。否
page_sizeinteger每页条数(默认与最大值:100)。否

Response​

STATUS
200
Response Body
{
"data": [
{
"name": "NC - Padrão",
"document_template_key": "7668cf4a-e19a-4f94-b209-8186909ea650",
"document_type": "commercial_paper",
"version": 1,
"extra_fields": []
},
{
"name": "TA Sandbox",
"document_template_key": "2165ba90-99c8-442a-9dc3-3f651a08c113",
"document_type": "adhesion_term",
"version": 1,
"extra_fields": []
}
],
"pagination": {
"current_page": 1,
"next_page": null,
"rows_per_page": 100,
"total_pages": 1,
"total_rows": 2
}
}

Response Body Params​

字段类型描述最大字符数
name *string模板名称。255
document_template_key *string模板的唯一键(UUID v4)。创建操作时提交的即为该值。36
document_type *string生成的文件类型。document_type 枚举50
version *integer模板当前版本。-
extra_fields *array模板所需的额外字段。模板无要求时为空数组。额外字段-

Pagination 对象​

字段类型描述
current_page *integer当前查询页码。
next_pageinteger下一页(如存在)。
rows_per_page *integer每页记录数。
total_pages *integer可用总页数。
total_rows *integer符合筛选条件的记录总数。

document_type 枚举​

商业票据发行流程中使用的类型:

值描述
commercial_paper商业票据草案。
adhesion_term加入条款。
subscription_note认购通知书。
amendment_term修订条款。