TF Fiscal

NFC-e Consumer Invoices

POST/api/nfce/company/create

Register company for NFC-e

Registers (or updates) a company for NFC-e issuance. Company name, IE, address and other data are extracted automatically via SintegraWS from the CNPJ. If the CNPJ is already registered under the same user (uid), the registry lookup is skipped: csc_id, csc, serie_nfce, number_nfce, the certificate and the certificate password actually sent in the request update the stored values (omitted fields remain unchanged), and the existing company's company_id and token are returned with message Empresa atualizada para NFC-e. The existing-company check compares the CNPJ with punctuation removed, so the CNPJ with or without punctuation is treated as the same CNPJ. A new company receives its own token, which is used for subsequent NFC-e calls; the token in the request header is recorded as the company's distributor token.

Required headers

tokenstringstringDistributor token (b2b)
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

cnpj*stringstringIssuing company CNPJ; punctuation is accepted and removed when the value is stored
cert_content*stringstringContents of the A1 certificate file (.pfx/.p12), Base64-encoded.
cert_filestringstringDeprecated — rejected from 2026-09-01.
cert_pwd*stringstringCertificate password
csc_id*stringstringCSC (Taxpayer Security Code) ID at the tax authority
csc*stringstringCSC token (shared secret with the tax authority)
serie_nfceintintNFC-e series.
number_nfceintintNFC-e starting number: when no NFC-e has been issued in the series yet, the first one uses this number (1 when omitted); when the series already has issued invoices, numbering is not changed.
telefonestringstringCompany phone

 * Required field. Other data (name, IE, address, etc.) are extracted automatically via SintegraWS from the CNPJ.

Examples

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