- Getting started
- Introduction
Getting started
Introduction
Issue your company's fiscal documents from your own system, without entering invoices one by one.
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
| Resource | What it is for |
|---|---|
| Company | Read the company data and the NF-e readiness checklist. |
| NF-e | Issue model 55 NF-e, with or without automatic tax calculation. Cancel and issue a correction letter (CC-e). |
| Tax rules | Set the CFOP, CST, and rates that calculated NF-e issuance uses for each NCM and state. |
| NFS-e | Issue an NFS-e by sending the service and the amount. Download the PDF, send it by email, cancel, and substitute. |
| ADN distribution | Download NFS-e in which the company is the service recipient. |
| Webhooks | Receive notices when an invoice is authorized, rejected, or cancelled. |
| Records | Keep customers, products, and carriers. |
| Digital certificate | Upload and read the A1 certificate. |
| MCP | Issue 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.
Quickstart
From the API Key to the first sandbox invoice.
Issuing NF-e
With or without automatic tax calculation.
Issuing NFS-e
Just the service code and the amount.
MCP and AI agents
Issue NF-e by talking to Claude and other agents.
Webhooks
Notices of authorization and cancellation.
API reference
Every endpoint, with a playground.
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.