Skip to content

HenriqueTardivo/xml_to_danfe_dacte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML-TO-DANFE-DACTE

This is an API for generating the "Documento Auxiliar da Nota Fiscal Eletrônica" (DANFE) or the "Documento Auxiliar do Conhecimento de Transporte Eletrônico" (DACTE) from the XML file of the Nota Fiscal Eletrônica (NFe) or Conhecimento de Transporte Eletrônico (CTe).

Prerequisites

You need Bun.js runtime installed on your machine. This project won't work with Node.js. To install Bun.js, follow the instructions on the official website.

Quick Start

git clone https://github.com/DenisBessa/xml_to_danfe_dacte.git
cd xml_to_danfe_dacte
bun install
bun dev

Use example

curl --location 'http://localhost:3000' \
--header 'Content-Type: text/plain' \
--data-raw '<nfeProc versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe"> { ... } </nfeProc>'

Replace the { ... } with the XML content. It should be a valid XML file of the NFe or CTe.

You can find a valid NFE in the example directory

Return Types

The default return is in base64. If the query parameter 'return_type' is passed as 'download', the return will be in download format.

About

API que recebe XML e retorna um PDF de DANFE ou DACTE como Download

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors