Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 2.73 KB

File metadata and controls

88 lines (62 loc) · 2.73 KB

.NET GitHub commit activity GitHub contributors GitHub code size in bytes

Valida XML DTE

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.


📆 Supported DTE Types

  • DTE
  • EnvioDTE
  • EnvioBOLETA
  • RespuestaDTE
  • EnvioRecibos
  • RESULTADO_ENVIO

🚀 Usage

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": []
  }
]

📢 Have a question? Found a Bug?

Feel free to file a new issue with a respective title and description on the Sii.ValidarXmlDte/issues repository.


💖 Community and Contributions

If this tool was useful, consider contributing with ideas or improving it further.

Azure Function


📘 License

This repository is released under the GNU General Public License v3.0.