Skip to content

SriConsultarAutorizacion

Queries Ecuador’s SRI for the authorization status of an already-issued document, using its 49-digit access key. This is the node to use to reconcile documents left IN PROCESSING after issuance (the SRI’s asynchronous response): running it updates the status stored in the database (AUTHORIZED, NOT AUTHORIZED, or still processing).

FieldTypeRequiredDescription
credentials_idcredentialsYesSRI credential
clave_accesotextYesDocument’s access key (49 digits)

This module requires an sri credential type with the following fields:

  • Certificate (.p12): the issuer’s digital certificate, PKCS#12 format
  • Certificate password: password to open the .p12 file
  • RUC: issuer’s tax ID (13 digits)
  • Environment: pruebas (testing) or producción (production)
{
"claveAcceso": "0512202501179001234500110010010000000011234567811",
"estado": "authorized",
"sriEstado": "AUTORIZADO",
"enProceso": false,
"numeroAutorizacion": "0512202501179001234500110010010000000011234567811",
"fechaAutorizacion": "2025-12-05T14:32:10-05:00",
"mensajes": [],
"xml": "<?xml version=\"1.0\"?><autorizacion>...</autorizacion>"
}

The normalized estado field can be authorized, received (when enProceso is true) or not_authorized.

{
"credentials_id": "cred-sri-prod",
"clave_acceso": "0512202501179001234500110010010000000011234567811"
}

When SriEmitirFactura returns estado: "received" with enProceso: true, you can query it again later by taking claveAcceso from the previous step’s output:

{
"credentials_id": "cred-sri-prod",
"clave_acceso": "{{data.claveAcceso}}"
}
  • If the document exists in the tenant’s database, the node automatically updates its status with the SRI’s response.
  • An access key that is not exactly 49 digits long returns an error without calling the SRI.
  • Useful inside a scheduled (cron) workflow to sweep documents left IN PROCESSING periodically.