Logo ExelensiaExelensia/Docs
Getting Started
  • Introduction
API Reference
  • Schemas
  • Templates
  • Upload
  • Process
  • Files
  • Results
  • Exports

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

ParameterTypeRequiredDefaultDescription
pagenumberNo1Page number (min: 1)
limitnumberNo20Items per page (min: 1, max: 100)
sort_bystringNocreated_atSort field: created_at or name
sort_orderstringNodescSort direction: asc or desc
created_afterstringNo—ISO 8601 date filter
created_beforestringNo—ISO 8601 date filter

Request

Bash
curl -H "x-api-key: wk_xxxxxxxx.your_secret_here" \
  "https://api.exelensia.com/v1/templates?page=1&limit=20"

Response

JSON
{
  "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

StatusDescription
200Success
401Missing or invalid authentication

GET /v1/templates/:id

Returns a single template by ID, including its full JSON Schema definition.

Path Parameters

ParameterTypeRequiredDescription
idstringYesTemplate UUID

Request

Bash
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.

JSON
{
  "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

StatusDescription
200Success
401Missing or invalid authentication
404Template not found

On this page

  • Endpoints
  • GET /v1/templates
  • GET /v1/templates/:id