REST API Documentation
Welcome to the TF API Documentation Hub. Here you'll find complete references for consuming APIs from TF ERP, TF Store, TF Talk, TF Software and other group solutions. 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, querying 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 invoice issuance 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
- Fiscal Information
- Transportation 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 | Company unique ID |
/api/category/get_list
Returns all categories available 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 | Invoice unique 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
Queries 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 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 make a declaration of 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 master data synchronization, accounting entries and centralized cash flow management.
https://api.tferp.com/v3
OAuth2 Bearer Token
/financial/cash-flow
Parameters (Query)
| Field | Type | Description |
|---|---|---|
| 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" }
]
}
TF Pay API
Payment Processing & Financial Transactions
Process payments with multiple methods (card, PIX, boleto, transfer) and securely manage financial transactions. TF Pay API provides 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}
Parameters (Path)
| Field | Type | Description |
|---|---|---|
| payment_id | string | Payment unique ID |
Response Example
{
"payment_id": "pay_7d9f2a1b",
"order_id": "ord_8x92nm",
"status": "captured",
"amount": 299.90,
"currency": "BRL",
"payment_method": "credit_card",
"card_last_four": "1111",
"created_at": "2023-11-01T10:30:00Z",
"captured_at": "2023-11-01T10:31:00Z",
"customer": {
"id": "cus_99aa88",
"email": "[email protected]"
}
}
/payments/{payment_id}/refund
Requires JWT authentication with
payments:refund scope.
{
"amount": 299.90,
"reason": "product_return"
}
/transactions
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 |
Response Example
{
"data": [
{
"payment_id": "pay_7d9f2a1b",
"order_id": "ord_8x92nm",
"amount": 299.90,
"status": "captured",
"payment_method": "credit_card",
"created_at": "2023-11-01T10:30:00Z"
}
],
"summary": {
"total_amount": 299.90,
"total_transactions": 1,
"successful": 1,
"failed": 0
}
}
TF Store API
E-commerce & Digital Storefront
Manage catalogs, control inventory in real time and securely process orders. The TF Store API is the heart of ecosystem retail operations.
https://api.tfloja.com/v1
1000 req/min (Standard)
Main Endpoints
/products
Parameters (Query)
| Field | Type | Description |
|---|---|---|
| page | int | Pagination |
| category | string | Category ID filter |
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)
/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"
}
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
/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 Software API
SaaS Management & Licensing
API dedicated to software license management, version control and update distribution for group SaaS products.
https://api.tfsoftwares.com/v2
API Key (Header: X-TF-Key)
/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 virtual store management, orders, payments and products. Allows creating orders, querying purchase status and integrating external systems into the TF Shop ecosystem.
https://api.tfshop.com/v1
API Key (Header: X-TF-Key)
/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 querying detailed logistics reports.
https://api.tfwms.com/v1
https://sandbox.api.tfwms.com/v1
/inventory/entries
{
"message": "Product entry registered successfully.",
"entry_id": "ent_98451234",
"warehouse_id": "wh_0021",
"created_at": "2025-01-12T10:45:00Z"
}