SriConsultarAutorizacion
Description
Section titled “Description”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).
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SRI credential |
| clave_acceso | text | Yes | Document’s access key (49 digits) |
Credentials
Section titled “Credentials”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) orproducción(production)
Output
Section titled “Output”{ "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.
Usage Example
Section titled “Usage Example”Reconcile a previously issued document
Section titled “Reconcile a previously issued document”{ "credentials_id": "cred-sri-prod", "clave_acceso": "0512202501179001234500110010010000000011234567811"}Chained after SriEmitirFactura
Section titled “Chained after SriEmitirFactura”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.
Related Nodes
Section titled “Related Nodes”- SriEmitirFactura - Issue the original invoice
- SriEmitirNota - Issue a credit or debit note
- SriRIDE - Generate the RIDE with QR once authorized