SifenConsultarLote
Description
Section titled “Description”Queries SIFEN for the result of an already-sent batch of Electronic Documents (siResultLoteDE), using the protocol (dProtConsLote) returned by the SifenEnviarLote node. It returns the status of each DE in the batch and automatically reconciles the local database, marking each voucher as approved or rejected.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SIFEN credential |
| protocolo | text | No | Batch protocol (dProtConsLote). If left empty, taken from the input data |
Credentials
Section titled “Credentials”This module requires a sifen credential (.p12 certificate, RUC and environment). See the full field list in SifenEmitirDE.
Output
Section titled “Output”{ "success": true, "protocolo": "987654321", "codigo": "0260", "mensaje": "Proceso Lote recibido con éxito", "total": 2, "items": [ { "cdc": "01800123456001001000001234567890123456789012", "estado": "Aprobado", "codigo": "0260", "mensaje": "Autorizado" }, { "cdc": "01800123456001001000001234567890123456789013", "estado": "Rechazado", "codigo": "0450", "mensaje": "Invalid receiver RUC check digit" } ]}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-sifen-prod", "protocolo": "987654321"}- SIFEN processes batches asynchronously; if there is no result yet, retry the query after a few seconds or minutes
- Each result item updates the corresponding DE’s status in the local database by its CDC
- A batch accepted by SIFEN does not mean every DE inside it is approved: each document can be approved or rejected individually
Related Nodes
Section titled “Related Nodes”- SifenEnviarLote - Send a batch of up to 50 DE
- SifenConsultarDE - Query a single DE by its CDC