This solution allows you to validate DTE (Electronic Tax Documents) from Chile's Servicio de Impuestos Internos (SII) against XSD schemas. It is designed as a lightweight API that processes one or more DTEs and returns validation results, highlighting schema errors or warnings.
It includes:
- Minimal API for local or cloud-based validation
- XML input (ISO-8859-1) with one or more DTEs
- Fast response format with IDs, errors, and warnings
This repository has no relationship with the government entity SII, only for educational purposes.
DTE
EnvioDTE
EnvioBOLETA
RespuestaDTE
EnvioRecibos
RESULTADO_ENVIO
Once the app is running, you can sign DTEs via::
curl -X POST http://localhost:5167/api/dte/validar \
-H "Content-Type: application/xml" \
-d '{
"dtes": [
"<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><DTE>...</DTE>",
"<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><DTE>...</DTE>"
]
}'
The response will be:
[
{
"id": "D33F2178",
"errors": [],
"warnings": []
},
{
"id": "D33F2179",
"errors": ["Missing mandatory element: Receptor"],
"warnings": []
}
]
Feel free to file a new issue with a respective title and description on the Sii.ValidarXmlDte/issues repository.
If this tool was useful, consider contributing with ideas or improving it further.
This repository is released under the GNU General Public License v3.0.