TF Fiscal
Documentation

DC-e

Issue DC-e

Accepts a Declaração de Conteúdo Eletrônica (model 99) and authorizes it asynchronously with SEFAZ.

POST/openapi/v2/empresas/{empresaId}/dc-e
Requires the token, timestamp and sign signature headers, see Authentication.

Acceptance returns HTTP 200 with no body. Resubmitting the same id: an identical message fingerprint reuses the original task (idempotent), a different fingerprint returns 10019030, and a previous terminal failure reopens the task with the new message. Results are obtained through the query or the dce.authorized / dce.rejected webhooks (see DC-e). The company must be approved with a usable certificate and emissaoDCe configured. Enum strings are case-insensitive.

Path parameters

empresaId*
stringIssuing company identifier

* Required field

Request body

id*
stringRequest identifier
ambiente*
stringEnvironment
dataEmissao
stringIssue time
*
required for Marketplace companies
objectSender
*
objectRecipient
*
arrayDeclared items
*
objectTransport
arrayXML download authorizations
informacoesAdicionais
stringMarketplace remark
informacoesAdicionaisFisco
stringTax authority remark
informacoesAdicionaisEmitente
stringIssuer remark
arrayMarketplace custom entries

* Required field

200
Accepted; no response body. The document enters Pendente and is numbered and sent to SEFAZ asynchronously. Follow up through the query or the webhook.

No response body

The DC-e issuer type set at company registration decides how remetente is filled. Marketplace issues on behalf of a seller; OwnIssuer issues in its own name; Carrier cannot issue yet and returns 10019013.

Marketplace issuing for a seller

The seller goes in remetente with document and address; the CNPJ in the access key remains the Marketplace company.

json
"remetente": {
"tipoPessoa": "F", "nome": "JOAO DA SILVA", "cpfCnpj": "12345678909", "telefone": "41999990000",
"endereco": { "uf": "PR", "cidade": "4106902", "logradouro": "RUA XV DE NOVEMBRO", "numero": "100", "bairro": "CENTRO", "cep": "80020310" }
}
*
objectSender

* Required field

Company issuing in its own name

Do not send remetente: the sender and the origin address come from the company registration. If you send remetente.cpfCnpj, it must be the company own CNPJ, otherwise 10019019.

json
{
"id": "DCe-000012334",
"ambiente": "Homologacao",
"destinatario": {
"tipoPessoa": "F", "nome": "MARIA OLIVEIRA", "cpfCnpj": "11144477735",
"endereco": { "uf": "SP", "cidade": "3550308", "logradouro": "AVENIDA PAULISTA", "numero": "1000", "bairro": "BELA VISTA", "cep": "01310100" }
},
"itens": [ { "descricao": "CARTEIRA", "ncm": "42023100", "quantidade": 1, "valorUnitario": 40.00 } ],
"transporte": { "modalidade": "PorContaPropria" }
}