1. Getting started
  2. Introduction

The Treeunfe API brings fiscal issuance into your company’s system. It is for technology teams that need to issue their own company’s invoices automatically, from an online store, an ERP, or a management system.

Some examples:

  • An online store that issues the NF-e as soon as the order payment is approved.
  • An ERP or management system that creates the invoice when the order is billed.
  • A services or subscription company that issues the NFS-e for each charge.
  • A finance team that cancels, corrects, and looks up invoices from its own system, or by talking to an AI agent through the MCP.

The API issues two kinds of invoice:

  • NF-e (model 55): sale and movement of goods.
  • NFS-e (national standard): services.

Issuing invoices for several companies? If you are a software house, platform, or marketplace that issues on behalf of your customers, use the Treeunfe Enterprise API, which manages many companies with one integration.

​
How to start

Your company needs a Treeunfe account. That is where you register the digital certificate, configure issuance, and generate the API Key your system sends on each call. See Quickstart.

​
What you can do

ResourceWhat it is for
CompanyRead the company data and the NF-e readiness checklist.
NF-eIssue model 55 NF-e, with or without automatic tax calculation. Cancel and issue a correction letter (CC-e).
Tax rulesSet the CFOP, CST, and rates that calculated NF-e issuance uses for each NCM and state.
NFS-eIssue an NFS-e by sending the service and the amount. Download the PDF, send it by email, cancel, and substitute.
ADN distributionDownload NFS-e in which the company is the service recipient.
WebhooksReceive notices when an invoice is authorized, rejected, or cancelled.
RecordsKeep customers, products, and carriers.
Digital certificateUpload and read the A1 certificate.
MCPIssue and look up NF-e from Claude, Cursor, VS Code, and other AI agents.

Every API route uses your company’s API Key, in the x-api-key header. See Authentication.

​
Base URL

https://api.treeunfe.com.br/api/v1

Requests and responses use JSON (Content-Type: application/json), with three exceptions: the certificate upload uses multipart/form-data, the NF-e XML comes back as text, and the NFS-e PDF comes back as a file.

Fiscal terms such as CFOP, NCM, DPS, and ISSQN are in the glossary.