Skip to content

Solución en .NET para validar distintos tipos de XML o DTE provenientes de sistema de facturación del SII (Chile). Expone una Minimal API que recibe los xml, valida contra el esquema definido y devuelve los errores o advertencias.

License

Notifications You must be signed in to change notification settings

sergioocode/Sii.ValidarXmlDte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.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.

About

Solución en .NET para validar distintos tipos de XML o DTE provenientes de sistema de facturación del SII (Chile). Expone una Minimal API que recibe los xml, valida contra el esquema definido y devuelve los errores o advertencias.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages