Central REST API Documentation
Welcome to the TF API Documentation Hub. Here you find complete references for consuming TF ERP, TF Loja, TF Talk, TF Softwares APIs and other solutions from the TF group. Consult endpoints, HTTP methods, authentication, parameters and complete interconnection in a single channel.
TF Fiscal API
Brazilian Electronic Invoice (NF-e)
Complete API for issuing, consulting and canceling Electronic Invoices (NF-e) in Brazil. Supports automatic tax calculation (ICMS, IPI, PIS/COFINS), XML generation, SEFAZ authorization and integration with management systems. Currently supports issuing invoices for products throughout Brazilian territory.
https://api.tffiscal.com/v1
Headers: sign, timestamp, token
Valid A1 Digital Certificate
System Flow
Input Data
- Customer Information
- Product Data
- Tax Information
- Transport Data
Processing
- Data validation
- Tax calculation
- XML generation
- SEFAZ authorization
Output
- Invoice XML
- Invoice PDF
- DANFE (Auxiliary Document)
- Authorization status
Main Endpoints
/api/company/create
Use distributor token (b2b_token) to create company.
/api/company/get_list
Returns paginated list of registered companies.
/api/company/get_detail
Parameters (Query)
| Field | Type | Description |
|---|---|---|
| company_id | string | Unique company ID |
/api/category/get_list
Returns all available categories for fiscal classification.
/api/invoice/create
Main Payload
{
"company_id": "comp_123456",
"customer": {
"document": "123.456.789-09",
"name": "Example Customer",
"address": {...}
},
"products": [
{
"code": "PROD001",
"description": "Example Product",
"quantity": 2,
"unit_price": 150.00,
"ncm": "85176277"
}
],
"tax_parameters": {...},
"payment_parameters": {...}
}
/api/invoice/get_list
Parameters (Query)
| Field | Type | Description |
|---|---|---|
| start_date | date | Start date (YYYY-MM-DD) |
| end_date | date | End date (YYYY-MM-DD) |
| status | string | Filter by status |
/api/invoice/get_detail
Parameters (Query)
| Field | Type | Description |
|---|---|---|
| invoice_id | string | Unique invoice ID |
Response Example
{
"invoice_id": "nf_789012",
"access_key": "35210112345678901234567890123456789012345678",
"status": "AUTHORIZED",
"issue_date": "2024-01-10T10:30:00Z",
"xml_url": "https://storage.tffiscal.com/xml/nf_789012.xml",
"pdf_url": "https://storage.tffiscal.com/pdf/nf_789012.pdf"
}
/api/invoice/refresh
Checks current status at SEFAZ and updates locally.
/api/invoice/cancel
Request Payload
{
"invoice_id": "nf_789012",
"reason": "Order error"
}
/api/invoice/invalid
For invoices with processing errors or duplicates.
Authentication
All requests must include the following headers:
| Header | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | application/json;charset=utf-8 |
| sign | string | Yes | Request digital signature |
| timestamp | string | Yes | Request UTC timestamp |
| token | string | Yes | Authentication token |
Note: To create company and get company list, use the distributor token (b2b_token).
Signature Algorithm (SIGN)
static string GetSign(string AppKey, string Path, string bodyString, string timestamp)
{
string input = AppKey + Path + bodyString + timestamp;
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("x2"));
}
return sb.ToString();
}
}
Tax Parameters
ICMS Parameters
Taxation Scenario
Tax Situation
PIS/COFINS Parameters
Taxation Scenario
Tax Situation
Payment Parameters
Payment Indicator
0
|
Cash |
1
|
Installment |
Payment Methods
01
|
Cash |
03
|
Credit Card |
04
|
Debit Card |
Card Brands
01
|
Visa |
02
|
Mastercard |
06
|
Elo |
XML Troubleshooting
Rejection 225 - XML Schema Failure
Occurs when trying to cancel, download XML, invalidate number or manifest an NF-e that was not successfully registered in the SEFAZ database.
SEFAZ Online Validation
Use the official validator to identify XML problems:
https://www.sefaz.rs.gov.br/nfe/nfe-val.aspx
Common problems: Incomplete address, invalid NCM, incorrect value formatting, missing required fields.
TF ERP API
Enterprise Resource Planning
Integrate financial, accounting and administrative modules. The TF ERP API allows synchronization of master data, accounting entries and centralized cash flow management.
https://api.tferp.com/v3
OAuth2 Bearer Token
Endpoints
/financial/cash-flow
Parameters (Query)
| Field | Type | Desc |
|---|---|---|
| start_date | date | Period start |
| end_date | date | Period end |
Response Example
{
"balance": 150000.00,
"entries": [
{ "date": "2023-11-01", "amount": 5000.00, "type": "credit" },
{ "date": "2023-11-02", "amount": -1200.00, "type": "debit" }
]
}
/accounting/entries
Registers accounting entries in the ERP system.
TF Pay API
Payment Processing & Financial Transactions
Process payments with multiple methods (card, PIX, boleto, transfer) and manage financial transactions securely. The TF Pay API offers full support for authorization, capture, refund and automatic reconciliation integrated with the TF ecosystem.
https://api.tfpay.com/v2
JWT Bearer Token
Main Endpoints
/payments/create
Requires JWT authentication with
payments:write scope.
Request Payload
{
"order_id": "ord_8x92nm",
"amount": 299.90,
"currency": "BRL",
"payment_method": "credit_card",
"card": {
"number": "4111111111111111",
"exp_month": "12",
"exp_year": "2025",
"cvc": "123",
"holder_name": "John Doe"
},
"customer": {
"id": "cus_99aa88",
"email": "[email protected]"
}
}
Response Example
{
"payment_id": "pay_7d9f2a1b",
"status": "authorized",
"authorization_code": "AUTH123456",
"amount": 299.90,
"currency": "BRL",
"created_at": "2023-11-01T10:30:00Z"
}
/payments/{payment_id}/refund
Requires JWT authentication with
payments:refund scope.
{
"amount": 299.90,
"reason": "product_return"
}
TF Loja API
E-commerce & Digital Storefront
Manage catalogs, control real-time inventory and process orders securely. The TF Loja API is the heart of retail operations in the ecosystem.
https://api.tfloja.com/v1
1000 req/min (Standard)
Main Endpoints
/products
Parameters (Query)
| Field | Type | Desc |
|---|---|---|
| page | int | Pagination |
| category | string | Filter ID |
Response Example
{
"data": [
{
"id": "prod_8x92nm",
"name": "TF Smart Watch",
"price": 299.90,
"stock": 45
}
]
}
/orders
Requires OAuth2 authentication with
orders:write scope.
{
"customer_id": "cus_99aa88",
"items": [
{ "product_id": "prod_8x92nm", "quantity": 1 }
],
"payment_method": "credit_card"
}
TF Talk API
Communication & Chatbot
Unified communication platform. Send messages via WhatsApp, SMS or Email and integrate intelligent chatbots into your customer service.
https://api.tftalk.com/v2
Supported (Signature Verification)
Endpoints
/messages/send
Request Payload
{
"channel": "whatsapp",
"recipient": "+5511999998888",
"content": {
"type": "text",
"body": "Hello! Your order has been confirmed."
}
}
Response (200 OK)
{
"message_id": "msg_9921828",
"status": "queued"
}
/chatbots/respond
Endpoint for integration with intelligent chatbots.
TF OMS API
Order Management System
Complete Order Management System. Orchestrate orders from multiple channels (omnichannel), manage logistics and reverse logistics.
https://api.tfoms.com/v1
X-Tenant-ID Required
Endpoints
/orders/{id}/status
Updates the processing status of a specific order in the fulfillment flow.
Parameters (Path)
| id | string | Order UUID |
Request Payload
{
"status": "shipped",
"tracking_code": "BR123456789TR",
"carrier": "Correios"
}
TF Softwares API
SaaS Management & Licensing
API dedicated to software license management, version control and update distribution for SaaS products in the group.
https://api.tfsoftwares.com/v2
API Key (Header: X-TF-Key)
Endpoints
/licenses/verify
Required Headers
- Content-Type application/json
- X-TF-Key your_api_key
Request Payload
{
"license_key": "XXXX-YYYY-ZZZZ",
"machine_id": "hw_82738273",
"product_code": "tf_crm_v1"
}
TF Shop API
E-commerce & Order Management
API dedicated to managing virtual stores, orders, payments and products. Allows creating orders, checking purchase status and integrating external systems with the TF Shop ecosystem.
https://api.tfshop.com/v1
API Key (Header: X-TF-Key)
Endpoints
/orders/create
Required Headers
- Content-Type application/json
- X-TF-Key your_api_key
Request Payload
{
"customer_id": "cus_392018",
"items": [
{
"product_id": "prd_001",
"quantity": 2
}
],
"payment_method": "card",
"currency": "AOA"
}
TF WMS API
Warehouse & Inventory Management
API focused on warehouse management and inventory control. Allows registering product entries and exits, tracking stock in real time and consulting detailed logistics reports.
https://api.tfwms.com/v1
https://sandbox.api.tfwms.com/v1
Endpoints
/inventory/entries
{
"message": "Product entry registered successfully.",
"entry_id": "ent_98451234",
"warehouse_id": "wh_0021",
"created_at": "2025-01-12T10:45:00Z"
}