/api/company/editEdit company data
Updates issuing company data. Send only the fields to be changed; all fields are optional, and the company changed is always the one identified by the token header. CNPJ is immutable: sending it returns an error. When cep is updated, the system automatically resolves stateCode and ibge; when the CEP cannot be resolved, both remain unchanged. When any of cert_content, cert_file or cert_pwd is sent, the certificate is opened with the values sent (the stored value is used for whichever is omitted); when it cannot be opened or has expired, an error is returned and none of the changes in the request is saved.
The company is created with the NF-e configuration (via /api/company/create). To enable the other documents, complete the setup here: this endpoint also accepts the NFC-e, NFS-e, MDF-e, CT-e and DC-e fields (see the sections below). Send only the fields for the document(s) the company will issue.
Required headers
tokenstring | string | Company token |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
company_string | string | Optional, used for verification: when sent, it must match the company_id of the company identified by the token header; otherwise an error is returned and nothing is changed |
namestring | string | Company name |
invoice_string | string | Tax regime; see /api/company/create for the accepted values |
iestring | string | State Registration |
iestarray | array | IEST (state registration as tax substitute), one per state: [{"uf": "MG", "ie": "0012345670053"}]. The list sent replaces the stored one; [] clears it. It goes on the NF-e (emit/IEST) when the destination state has an IEST on file and the invoice has ICMS-ST withheld; in-state sales and invoices without ST leave it out. Rejected: invalid state, repeated state, the company's own state, or IE longer than 14 digits |
unitstring | string | Unit type |
emailstring | string | |
cepstring | string | ZIP code (auto-updates stateCode and ibge; both remain unchanged when the CEP cannot be resolved) |
addressstring | string | Street address |
house_string | string | Number |
townstring | string | Neighborhood |
citystring | string | City |
statestring | string | UF |
cert_string | string | Contents of the A1 certificate file (.pfx/.p12), Base64-encoded |
cert_string | string | Deprecated — rejected from 2026-09-01. Certificate HTTPS URL |
cert_string | string | New certificate password |
serieint | int | NF-e series. After switching to this series, numbering continues from the series' own counter; when no invoice has been issued in the series yet, numbering starts at number (when omitted, the starting number stored for the company). Existing numbers are never lowered |
numberint | int | Number used by the next NF-e in the current series (or in the serie sent in the same request).It can only be raised: when it is less than or equal to the actual next number of the series, numbering is not changed, which prevents duplicate numbers |
aliasstring | string | Trade name |
telefonestring | string | Phone |
complementostring | string | Address complement |
| NFC-e | ||
csc_string | string | CSC (Taxpayer Security Code) ID at the tax authority |
cscstring | string | CSC token (shared secret with the tax authority) |
serie_int | int | NFC-e series |
number_int | int | NFC-e starting number: when no NFC-e has been issued in the series yet, the first one uses this number; when the series already has issued invoices, numbering is not changed |
| NFS-e | ||
imstring | string | Municipal registration (Inscrição Municipal) |
codigo_string | string | IBGE code of the issuing municipality |
codigo_string | string | Default service code (LC 116) |
cnae_string | string | Default activity CNAE |
serie_int | int | Initial NFS-e series |
number_int | int | Stored only; does not affect actual numbering |
regime_int | int | Special tax regime code |
optante_bool | bool | Opting in to Simples Nacional |
| Transport (MDF-e / CT-e / DC-e) | ||
serie_int | int | MDF-e series |
number_int | int | MDF-e starting number (where numbering begins) |
serie_int | int | CT-e series |
number_int | int | CT-e starting number (where numbering begins) |
serie_int | int | DC-e series |
number_int | int | DC-e starting number (where numbering begins) |
| Communication (NFCom) | ||
serie_int | int | NFCom series |
number_int | int | NFCom starting number (where numbering begins) |
| Energy (NF3e) | ||
serie_int | int | NF3e series |
number_int | int | NF3e starting number (where numbering begins) |
Sending cnpj returns an error. All other fields are optional — send only the fields to be changed. When cert_pwd contains the mask ******** returned by the detail endpoint, the password is treated as unchanged. When the company has no NF-e tax category yet, the endpoint creates the default categories (same rule as is_create_category_template in /api/company/create). On success only success: true is returned.
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/edit" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"company_id": "10234",
"name": "Nova Razão Social LTDA",
"email": "novo@empresa.com",
"cep": "01310100"
}
{
"company_id": "10234",
"csc_id": "000001",
"csc": "ABCDEF0123456789",
"serie_nfce": 1,
"number_nfce": 1,
"serie_cte": 1,
"number_cte": 1
}
{
"success": true
}