REST · JSON · 104 endpoints
TF Fiscal API
Complete API for issuing, consulting, and canceling Electronic Invoices (NF-e) in Brazil. Supports automatic tax calculation (ICMS, IPI, PIS/COFINS), XML generation, tax authority authorization, and integration with management systems. Currently supports invoice issuance for products throughout Brazilian territory.
Base URL (Production)
https://api.tffiscal.comAuthentication & signing
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature: MD5(token + path + body + timestamp) |
timestampstring | string | Unix timestamp in seconds (5-minute window) |
Signature
sign = md5(token + path + body + timestamp) # token: the company token # path: request path; include the query string on GET # body: raw request body with all CR/LF removed; empty string on GET # timestamp: Unix seconds, valid for 5 minutes # result: 32 lowercase hex chars
Example · cURL
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/invoice/create" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
System Flow
- 1Input Data
- Customer Information
- Product Data
- Fiscal Information
- Transport Data
- 2Processing
- Data validation
- Tax calculation
- XML generation
- tax authority authorization
- 3Output
- Invoice XML
- Invoice PDF
- DANFE (Auxiliary Document)
- Authorization status
API categories
CompaniesRegister a new issuing company · Register company by certificate · Edit company data7 endpointsNF-e Tax CodesCreate tax category · Tax category details · List tax categories5 endpointsCFOP CodesLook up CFOP · List CFOP2 endpointsNCM CodesLook up NCM · NCM list (paginated)2 endpointsTax CalculationCalculate taxes · Purchase credit × cost · Import taxes3 endpointsNF-e InvoicesIssue a new invoice · List NF-e (paginated) · Get NF-e details16 endpointsNFC-e Consumer InvoicesRegister company for NFC-e · Update NFC-e company · Get NFC-e company15 endpointsNFS-e Service InvoicesRegister NFS-e company · Issue NFS-e · Cancel NFS-e6 endpointsCT-e TransportIssue CT-e · Cancel CT-e · Correction Letter (CC-e)5 endpointsMDF-e ManifestIssue MDF-e · Query the status of the MDF-e · Cancel MDF-e5 endpointsDC-e Content DeclarationIssue DC-e · Consult the status of the DC-e · Cancel DC-e5 endpointsNF3-e ElectricityIssue NF3e · Consult NF3e status · Cancel NF3e5 endpointsNFCom TelecomIssue NFCom · Consult NFCom status · Cancel NFCom5 endpointsReceived Documents & DistDFeSend recipient manifestation event · List manifestations · Get manifestation XML9 endpointsSPED FilingGenerate SPED EFD1 endpointsAuditRun tax audit1 endpointsRPA ReceiptsCreate/update provider · List providers · Calculate without issuing9 endpointsSSOGenerate automatic login link · Consume SSO ticket2 endpointsAccountantGet accountant info1 endpoints