Templates
Templates are pre-built extraction schemas maintained by the Exelensia platform for common Brazilian electronic fiscal documents (NF-e, CT-e, NFS-e, and more). Unlike your own schemas, templates are read-only — you cannot create, update, or delete them. Browse them for reference, or use a template's id as the schema_id when uploading or processing a document.
A template's definition uses the same JSON Schema format as user-created schemas.
Endpoints
GET /v1/templates
Returns a paginated list of all available templates. List items include only id, name, and description — fetch a single template to retrieve its full definition.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | No | 1 | Page number (min: 1) |
limit | number | No | 20 | Items per page (min: 1, max: 100) |
sort_by | string | No | created_at | Sort field: created_at or name |
sort_order | string | No | desc | Sort direction: asc or desc |
created_after | string | No | — | ISO 8601 date filter |
created_before | string | No | — | ISO 8601 date filter |
Request
curl -H "x-api-key: wk_xxxxxxxx.your_secret_here" \
"https://api.exelensia.com/v1/templates?page=1&limit=20"Response
{
"data": [
{
"id": "01940000-0000-7000-8000-000000000007",
"name": "NF-e",
"description": "Nota Fiscal Eletrônica (modelo 55)"
},
{
"id": "01940000-0000-7000-8000-000000000003",
"name": "CT-e",
"description": "Conhecimento de Transporte Eletrônico"
}
],
"meta": {
"total": 12,
"page": 1,
"limit": 20,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}Status Codes
| Status | Description |
|---|---|
200 | Success |
401 | Missing or invalid authentication |
GET /v1/templates/:id
Returns a single template by ID, including its full JSON Schema definition.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Template UUID |
Request
curl -H "x-api-key: wk_xxxxxxxx.your_secret_here" \
"https://api.exelensia.com/v1/templates/01940000-0000-7000-8000-000000000007"Response
The schema is abbreviated below — real templates declare many more fields.
{
"id": "01940000-0000-7000-8000-000000000007",
"name": "NF-e",
"description": "Nota Fiscal Eletrônica (modelo 55)",
"schema": {
"type": "object",
"properties": {
"numero_nfe": { "type": "string", "description": "Número da NF-e" },
"serie": { "type": "string", "description": "Série da NF-e" },
"data_emissao": { "type": "string", "description": "Data de emissão no formato ISO 8601 ou DD/MM/AAAA" },
"chave_acesso": { "type": "string", "description": "Chave de acesso com 44 dígitos" },
"emitente": {
"type": "object",
"description": "Dados do emitente da NF-e",
"properties": {
"cnpj": { "type": "string" },
"razao_social": { "type": "string" }
}
}
}
}
}Status Codes
| Status | Description |
|---|---|
200 | Success |
401 | Missing or invalid authentication |
404 | Template not found |