TF Fiscal
Documentation

Companies

Register company

Registers the issuing company (or updates it when the body carries `id`) and returns the `empresaId` used by every later endpoint.

POST/openapi/v2/empresas

Requires the token, timestamp and sign signature headers, see Authentication.

Submit the seller company data; the response carries the empresaId, the path variable of every later endpoint. Registration enters the platform approval queue: the company issues only after operations approve it and the certificate is linked. The emissaoNFeProduto and emissaoDCe blocks are each optional, at least one is required: an NF-e-only company sends the former, a DC-e-only company may omit it (no NF-e series is created) and sending both enables both document types; omitting both returns 400 10001001 with a mensagem naming both blocks. A body carrying id (the empresaId returned at registration) is treated as an update, see the section below.

Parameters

Request body

  • idstringrequired for update

    The empresaId returned at registration. Omit to register; include to update the company (must belong to this application, otherwise 404 10003000).

  • cnpjstringrequired

    14 digits. Cannot be changed on update: a mismatch with the company returns 400 10001001.

    Example: 14422279000106
  • inscricaoMunicipalstringoptional

    Municipal registration, up to 15 characters.

  • inscricaoEstadualstringrequired

    State registration (IE). Optional in the source document, but issuance on this platform requires an IE; missing returns 10003006.

  • razaoSocialstringrequired

    Legal name, up to 60.

  • nomeFantasiastringoptional

    Trade name, up to 60.

  • optanteSimplesNacionalbooleanrequired

    Whether the company is in the Simples Nacional regime.

  • meibooleanrequired

    Whether the company is an MEI. Tax regime derivation: mei=true → MEI; else optanteSimplesNacional=true → Simples; else regular regime.

  • emailstringrequired

    Contact e-mail.

  • telefoneComercialstringrequired

    Business phone, digits only including area code.

  • enderecoobjectrequired

    Company address.

  • emissaoNFeProdutoobjectat least one of emissaoNFeProduto / emissaoDCe

    NF-e (model 55) issuance configuration. Ignored on update: NF-e series are not maintained through this endpoint.

  • emissaoDCeobjectat least one of emissaoNFeProduto / emissaoDCe

    DC-e (model 99) issuance configuration. A company registered without this block is not enabled for DC-e: registration still succeeds, the response carries dceHabilitado=false and issuance returns DCe00004. On update, omitting the block leaves the DC-e profile untouched.

Responses

200

Registration accepted and placed in the approval queue (or update applied). The same shape is returned in both cases.

  • empresaIdstring

    Company identifier, the path variable of every later API; persist it. A numeric string.

  • dceHabilitadoboolean

    Whether the company is enabled for DC-e (false when emissaoDCe was not sent). On update it echoes the current company state. NF-e-only integrators can ignore it.

Errors

CodeHTTP
10003002400

CNPJ already registered. The company exists: use the original empresaId (or update with id).

10003000404

Update: id does not exist or does not belong to this application.

10003006400

Registration data missing the IE. Provide inscricaoEstadual.

GW001400

City / state cannot be resolved to an IBGE code. Check the UF and city name.

10001001400

Request field validation failed (one entry per field) or registration / update contract error: both configuration blocks missing, update changing cnpj / municipality, lowering the series cursor, switching series.

Registration rules

  • Registration enters the platform approval queue; the company issues only after operations approve it and the certificate is linked (Link certificate). Issuing before that returns 10004004 (NF-e) or DCe00008 (DC-e). Check approval progress with platform operations.
  • After registration the company is in the certification environment (Homologacao): integrate with ambienteEmissao=Homologacao (NF-e) / ambiente=Homologacao (DC-e). Switching to production is an operations action with no API; sending Producao before the switch returns 10004030 (NF-e) or DCe00004 (DC-e). See Environments.
  • emissaoNFeProduto and emissaoDCe are each optional, at least one is required: a DC-e-only integrator does not need to fabricate an NF-e series (omitting emissaoNFeProduto means no model 55 series is created). Omitting both returns 400 10001001.
  • A company registered without emissaoDCe is not enabled for DC-e: registration still succeeds, but the response carries dceHabilitado=false and issuance returns DCe00004. Check that field right after registering.
  • inscricaoEstadual is mandatory on this platform (a hard condition for submission to review), for NF-e and DC-e alike.
  • Registering the same CNPJ again returns 10003002.

Update (body carrying `id`)

The same endpoint, with the body carrying id (the empresaId returned at registration), is treated as an update: used to enable DC-e later, raise the starting number or fix contact details. The other fields are still validated with the registration rules, so resending the registration payload with id added is enough.

  • The company is located within the current tenant; unknown returns 404 10003000.
  • Updated: emissaoDCe (the tipoEmitente / siteMarketplace profile and the model 99 series), nomeFantasia / email / telefoneComercial, and endereco's cep / logradouro / numero / complemento / bairro (empty values do not clear stored ones).
  • Not updated: cnpj (a mismatch with the company returns 400 10001001), razaoSocial / inscricaoEstadual / inscricaoMunicipal / tax regime, environment; endereco.uf / endereco.cidade resolving to a different municipality returns 400 10001001 (moving municipality goes through operations); emissaoNFeProduto is ignored on update (NF-e series are not maintained through this endpoint).
  • The model 99 series only moves up: when the series does not exist (and no other series is enabled) it is created from sequencialDCe / serieDCe; when it exists, sequencialDCe may only raise the next number (equal to the current next number is a no-op), a lower value returns 400 10001001 with an explanation; changing serieDCe while the old series is still enabled returns 400 10001001 (switching series goes through operations, so two enabled series never make issuance fail with 10019007). Numbers skipped by raising the cursor are never issued.
  • An update without emissaoDCe leaves the DC-e profile untouched; dceHabilitado echoes the company's current state.
  • An update does not resubmit for review and does not change the company status; the response is again { empresaId, dceHabilitado }.
  • Operations can also maintain these values; changing sequencialDCe only affects documents not yet numbered.