Companies
Register company
Registers the issuing company (or updates it when the body carries `id`) and returns the `empresaId` used by every later endpoint.
/openapi/v2/empresasRequires 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 updateThe
empresaIdreturned at registration. Omit to register; include to update the company (must belong to this application, otherwise 40410003000).cnpjstringrequired14 digits. Cannot be changed on update: a mismatch with the company returns 400
10001001.Example:14422279000106inscricaoMunicipalstringoptionalMunicipal registration, up to 15 characters.
inscricaoEstadualstringrequiredState registration (IE). Optional in the source document, but issuance on this platform requires an IE; missing returns
10003006.razaoSocialstringrequiredLegal name, up to 60.
nomeFantasiastringoptionalTrade name, up to 60.
optanteSimplesNacionalbooleanrequiredWhether the company is in the Simples Nacional regime.
meibooleanrequiredWhether the company is an MEI. Tax regime derivation:
mei=true→ MEI; elseoptanteSimplesNacional=true→ Simples; else regular regime.emailstringrequiredContact e-mail.
telefoneComercialstringrequiredBusiness phone, digits only including area code.
enderecoobjectrequiredCompany address.
emissaoNFeProdutoobjectat least one of emissaoNFeProduto / emissaoDCeNF-e (model 55) issuance configuration. Ignored on update: NF-e series are not maintained through this endpoint.
emissaoDCeobjectat least one of emissaoNFeProduto / emissaoDCeDC-e (model 99) issuance configuration. A company registered without this block is not enabled for DC-e: registration still succeeds, the response carries
dceHabilitado=falseand issuance returnsDCe00004. On update, omitting the block leaves the DC-e profile untouched.
Responses
Registration accepted and placed in the approval queue (or update applied). The same shape is returned in both cases.
empresaIdstringCompany identifier, the path variable of every later API; persist it. A numeric string.
dceHabilitadobooleanWhether the company is enabled for DC-e (
falsewhenemissaoDCewas not sent). On update it echoes the current company state. NF-e-only integrators can ignore it.
Errors
| Code | HTTP | |
|---|---|---|
| 10003002 | 400 | CNPJ already registered. The company exists: use the original |
| 10003000 | 404 | Update: |
| 10003006 | 400 | Registration data missing the IE. Provide |
| GW001 | 400 | City / state cannot be resolved to an IBGE code. Check the UF and city name. |
| 10001001 | 400 | Request field validation failed (one entry per field) or registration / update contract error: both configuration blocks missing, update changing |
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) orDCe00008(DC-e). Check approval progress with platform operations. - After registration the company is in the certification environment (
Homologacao): integrate withambienteEmissao=Homologacao(NF-e) /ambiente=Homologacao(DC-e). Switching to production is an operations action with no API; sendingProducaobefore the switch returns10004030(NF-e) orDCe00004(DC-e). See Environments. emissaoNFeProdutoandemissaoDCeare each optional, at least one is required: a DC-e-only integrator does not need to fabricate an NF-e series (omittingemissaoNFeProdutomeans no model 55 series is created). Omitting both returns 40010001001.- A company registered without
emissaoDCeis not enabled for DC-e: registration still succeeds, but the response carriesdceHabilitado=falseand issuance returnsDCe00004. Check that field right after registering. inscricaoEstadualis 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(thetipoEmitente/siteMarketplaceprofile and the model 99 series),nomeFantasia/email/telefoneComercial, andendereco'scep/logradouro/numero/complemento/bairro(empty values do not clear stored ones). - Not updated:
cnpj(a mismatch with the company returns 40010001001),razaoSocial/inscricaoEstadual/inscricaoMunicipal/ tax regime, environment;endereco.uf/endereco.cidaderesolving to a different municipality returns 40010001001(moving municipality goes through operations);emissaoNFeProdutois 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,sequencialDCemay only raise the next number (equal to the current next number is a no-op), a lower value returns 40010001001with an explanation; changingserieDCewhile the old series is still enabled returns 40010001001(switching series goes through operations, so two enabled series never make issuance fail with10019007). Numbers skipped by raising the cursor are never issued. - An update without
emissaoDCeleaves the DC-e profile untouched;dceHabilitadoechoes 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
sequencialDCeonly affects documents not yet numbered.
