Skip to content

NF-e 4.00 (Modelo 55) ​

Endpoints para emissão, consulta, download de PDF/XML e visualização de notas fiscais eletrônicas de produto (NF-e).


POST Emitir NF-e ​

Envia uma NF-e para cálculo tributário, geração de chave de 44 dígitos, assinatura digital XML-DSig e autorização na SEFAZ.

POST /v1/invoices/nfe

Requisição ​

bash
curl --request POST \
  --url http://localhost:3333/v1/invoices/nfe \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: fylee_live_...' \
  --header 'Idempotency-Key: venda_1234' \
  --data '{
    "naturezaOperacao": "VENDA DE MERCADORIA",
    "recipient": {
      "cnpjCpf": "00000000000191",
      "legalName": "EMPRESA COMPRADORA LTDA",
      "street": "Rua das Flores",
      "number": "123",
      "neighborhood": "Centro",
      "cityCode": "3550308",
      "cityName": "São Paulo",
      "state": "SP",
      "zipCode": "01001000"
    },
    "items": [
      {
        "code": "SKU-99",
        "description": "Teclado Mecânico Sem Fio",
        "ncm": "84716052",
        "cfop": "5102",
        "unit": "UN",
        "quantity": 2,
        "unitPrice": 250.0,
        "icms": { "cst": "102", "orig": 0 },
        "pis": { "cst": "07" },
        "cofins": { "cst": "07" }
      }
    ],
    "payments": [
      { "paymentType": "01", "amount": 500.0 }
    ]
  }'
json
{
  "id": "clt1983hx0001va93jflam789",
  "status": "AUTORIZADA",
  "cStat": 100,
  "xMotivo": "Autorizado o uso da NF-e",
  "chaveAcesso": "35261000000000000191550010000000011987654321",
  "numero": 1,
  "serie": 1,
  "protocolo": "135260000012345",
  "dataEmissao": "2026-10-07T10:20:00.000Z",
  "pdfUrl": "http://localhost:3333/v1/invoices/clt1983hx0001va93jflam789/pdf",
  "xmlUrl": "http://localhost:3333/v1/invoices/clt1983hx0001va93jflam789/xml"
}

GET Obter Dados da Nota ​

Consulta o status atual e metadados de uma nota fiscal emitida pelo seu ID interno.

GET /v1/invoices/:id

bash
curl --request GET \
  --url http://localhost:3333/v1/invoices/clt1983hx0001va93jflam789 \
  --header 'x-api-key: fylee_live_...'
json
{
  "id": "clt1983hx0001va93jflam789",
  "chaveAcesso": "35261000000000000191550010000000011987654321",
  "status": "AUTORIZADA",
  "cStat": 100,
  "valorTotal": 500.0,
  "emitenteCnpj": "11222333000181",
  "destinatarioCnpj": "00000000000191"
}

GET Baixar DANFE em PDF ​

Retorna o binário oficial do DANFE em formato PDF, pronto para impressão ou envio ao consumidor.

GET /v1/invoices/:id/pdf

bash
curl --request GET \
  --url http://localhost:3333/v1/invoices/clt1983hx0001va93jflam789/pdf \
  --header 'x-api-key: fylee_live_...' \
  --output danfe.pdf

GET Baixar XML Autorizado ​

Retorna o XML oficial assinado com o protocolo SEFAZ anexado (procNFe).

GET /v1/invoices/:id/xml

bash
curl --request GET \
  --url http://localhost:3333/v1/invoices/clt1983hx0001va93jflam789/xml \
  --header 'x-api-key: fylee_live_...' \
  --output nota.xml

API Brasileira de Emissão Fiscal Direta (SEFAZ & ADN RFB)