Skip to main content

Available templates query

This endpoint allows querying all templates available for use in the bookkeeping system.

Request​

ENDPOINT
/document_generator/document_template
METHOD
GET

Query Params​

FieldTypeDescriptionRequired
document_typestringDocument type. document_type enumeratorsNo
pageintegerPage number (default: 1).No
page_sizeintegerItems per page (default and maximum: 100).No

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​

FieldTypeDescriptionMax Characters
name *stringTemplate name.255
document_template_key *stringUnique template key (UUID v4). This is the value sent when creating the operation.36
document_type *stringType of generated document. document_type enumerators50
version *integerCurrent template version.-
extra_fields *arrayExtra fields required by the template. Empty list when the template requires none. Extra fields-

Pagination Object​

FieldTypeDescription
current_page *integerCurrent page of the query.
next_pageintegerNext page, if any.
rows_per_page *integerNumber of records per page.
total_pages *integerTotal pages available.
total_rows *integerTotal records found for the applied filters.

document_type enumerators​

Types used in the commercial paper issuance flow:

ValueDescription
commercial_paperCommercial paper draft.
adhesion_termAdhesion term.
subscription_noteSubscription note.
amendment_termAmendment term.