SunatConsultarTicket
Description
Section titled “Description”Queries the status of a ticket previously returned by a daily boletas summary or by a void communication (the getStatus operation). While SUNAT is still processing it, the node returns enProceso as true. Once processed, it reads the CDR (accepted, observed or rejected) and updates the status of the summary stored in the database.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SUNAT credential |
| ticket | text | Yes | Ticket returned by the summary or void to query |
Credentials
Section titled “Credentials”This module requires a sunat credential type with the following fields:
- Certificate (.p12): the issuer’s digital certificate
- Certificate password
- Issuer RUC (11 digits)
- SOL user and SOL password: SUNAT Clave SOL credentials
- Mode: direct (to SUNAT) or OSE (Electronic Services Operator)
- OSE URL, if mode is OSE
- Environment: beta (testing) or production
Output
Section titled “Output”{ "ticket": "1234567890", "enProceso": false, "estado": "accepted", "codigo": "0", "descripcion": "El Resumen numero RC-20260101-1, ha sido aceptado", "notas": [], "statusCode": "0"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-sunat-prod", "ticket": "1234567890"}- statusCode 0 means processed; statusCode 99 means processed with errors (the node maps it to estado rejected).
- While enProceso is true, retry the query later, for example with a wait node or a short cron.
- The result also updates the summary or void record that was stored when it was sent.
Related Nodes
Section titled “Related Nodes”- SunatResumenBoletas - Send the daily boletas summary
- SunatEmitirCPE - Issue an individual invoice or boleta