Skip to content

Solución en .NET para descargar archivos CAF (Código de Asignación de Folios) desde el SII (Chile). Utiliza un certificado PFX almacenado en Azure Blob Storage para realizar llamadas autenticadas mediante HttpClient.

License

Notifications You must be signed in to change notification settings

sergioocode/Sii.DescargaFolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Sii.DescargaFolio

This solution allows you to query the Download CAF files from Chile's Servicio de Impuestos Internos (SII) using scraping. Download XML file using authenticated HTTPS requests with a valid digital certificate.

⚠️ This project is not affiliated with the official SII. It is intended for private automation and educational use.


📦 Details

Package Reference Version
Azure.Storage.Blobs 12.25.0
Microsoft.Extensions.Azure 1.7.6
AngleSharp.XPath 2.0.5

🚀 Usage

curl -X GET "https://localhost:7212/api/DescargaFolio/caf?rut=88777555-9&tipoDoc=33&folioInicio=2294&folioFin=2415&fecha=30-12-2024" \
     -H "Accept: application/xml"

Return XML from controller:


⚙️ Configuration

Use appsettings.json or environment variables to configure the certificate source:

{
  "StorageConnection": "UseDevelopmentStorage=true",
  "StorageConnection:ContainerName": "certificados",
  "StorageConnection:BlobName": "certificado1.pfx",
  "StorageConnection:CertPassword": "<your-cert-password>"
}

You may also define these as Azure App Settings if you're deploying the API to the cloud.


📢 Have a question? Found a Bug?

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


💖 Community and Contributions

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

Support via PayPal


📘 License

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

About

Solución en .NET para descargar archivos CAF (Código de Asignación de Folios) desde el SII (Chile). Utiliza un certificado PFX almacenado en Azure Blob Storage para realizar llamadas autenticadas mediante HttpClient.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages