TF Fiscal

Companies

POST/api/company/create

Register a new issuing company

Registers an issuing company under a distributor (b2b) account. Use this endpoint when company data is already available. For automatic extraction from the digital certificate, use /api/company/v2/create. The CNPJ in the certificate must match cnpj, otherwise an error is returned. The endpoint does not check whether the CNPJ is already registered: a repeated call creates another company (new company_id and token). Each company receives its own token, used for its subsequent issuance and other calls.

Required headers

tokenstringstringDistributor token (b2b — the account must have isb2b=true)
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

Identification
cnpj*stringstringIssuing company CNPJ; must match the CNPJ in the certificate
name*stringstringCompany name
ie*stringstringState Registration (Inscrição Estadual)
invoice_type*stringstringTax regime, which sets the CRT in the XML: "simples_nacional" (CRT 1), "simples_nacional_excesso" (CRT 2), "lucro_normal" or "tributacao_normal" (CRT 3), "simples" (CRT 4, MEI); "1"–"4" are also accepted.
unit*stringstringUnit type
emailstringstringCompany email
Address
cep*stringstringZIP code
address*stringstringStreet address
house_number*stringstringAddress number
town*stringstringNeighborhood
city*stringstringCity
state*stringstringUF (state abbreviation)
Digital certificate
cert_content*stringstringContents of the A1 certificate file (.pfx/.p12), Base64-encoded
cert_filestringstringDeprecated — rejected from 2026-09-01.
cert_pwd*stringstringCertificate password
Numbering and settings
serie*intintNF-e series
number*intintNumber used by the next NF-e in this series
Transport (MDF-e / CT-e / DC-e)
serie_mdfeintintMDF-e series
number_mdfeintintMDF-e starting number (where numbering begins)
serie_cteintintCT-e series
number_cteintintCT-e starting number (where numbering begins)
serie_dceintintDC-e series
number_dceintintDC-e starting number (where numbering begins)
Communication (NFCom)
serie_nfcomintintNFCom series
number_nfcomintintNFCom starting number (where numbering begins)
Energy (NF3e)
serie_nf3eintintNF3e series
number_nf3eintintNF3e starting number (where numbering begins)
is_create_category_templatebooleanbooleanAuto-create the default tax categories.

 * Required field.

Examples

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/company/create" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json