Skip to content

DgiConsultarCAE

Queries the available numbering balance of the CAE loaded into Floogos for a Comprobante Fiscal Electronico (CFE) type and, optionally, a given series. If the series is omitted, it sums the balance of all active series for that CFE type.

It is useful to alert before running out of available numbering and trigger the loading of a new CAE ahead of time (for example, from a scheduled workflow that runs every morning).

FieldTypeRequiredDescription
credentials_idcredentialsYesdgi credential
tipo_cfetextYesCFE type (101 e-Ticket, 111 e-Invoice, 181 e-Remito, etc.)
serietextNoSeries to query. If omitted, sums all series of the type

This module requires a dgi credential type with the following fields:

  • Certificate (.p12): advanced signature certificate in base64
  • Certificate password: password for the .p12 file
  • RUT: issuer’s tax ID
  • Company Name: issuer’s legal name
  • Environment: test (homologation) or prod (production)
{
"tipo_cfe": 111,
"serie": null,
"disponibles": 842,
"caes": [
{
"cae_id": "12345",
"serie": "A",
"estado": "active",
"disponibles": 842,
"nro_desde": 158,
"nro_hasta": 1000
}
]
}
{
"credentials_id": "cred-dgi-prod",
"tipo_cfe": "111",
"serie": "A"
}
  • Only CAE with active status are added into disponibles; expired or exhausted ones are excluded from the total but still listed in caes for auditing.
  • Combine this node with a scheduled trigger and a condition (e.g. disponibles < 100) to automate alerts for reloading numbering.
  • The caes list keeps the per-series detail, useful when the company operates several series at once (branches, registers, etc.).