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; ambiente must match the company's current environment (note the field name is ambiente, not NF-e's ambienteEmissao). Enum strings are case-insensitive.

Parameters

Path parameters

  • empresaIdstringrequired

    Identifier returned by Register company.

    Example: 1934811222334455

Request body

  • idstringrequired

    Integrator document id (≤64), used as the dceId path variable in query / cancellation; idempotency key.

    Example: DCe-000012333
  • ambientestringrequired

    Producao / Homologacao, must match the company's environment (note the field name is ambiente, not NF-e's ambienteEmissao). A mismatch returns DCe00004.

  • dataEmissaostringoptional

    Issue time in ISO-8601; defaults to the acceptance time. With an offset or Z (2026-09-08T10:00:00-03:00) it is converted as given; a local time without offset (2026-09-08T10:00:00) is interpreted in the company's state time zone. Allowed window: at most 5 minutes ahead of now and at most 30 days back (server-configurable); outside it the request fails with 10019048 (SEFAZ rejects a future dhEmi and the number would be wasted; a far-past date drags the chave AAMM into an old period). Written to XML dhEmi with the company's state offset.

    Example: 2026-09-06T12:00:00Z
  • remetenteobjectrequired for Marketplace / Carrier companies

    Sender (DCe00005 when missing for a Marketplace / Carrier company); an OwnIssuer company may omit it (the company itself); when sent, cpfCnpj must equal the company's CNPJ.

  • destinatarioobjectrequired

    Recipient; cpfCnpj required (DCe00009).

  • itensarrayrequired

    Declared goods, 1-999 items.

  • transporteobjectrequired

    Transport data.

  • autorizacaoDownloadXmlarrayoptional

    CPF / CNPJ authorized to download the XML, up to 10 (10019022). Do not include the issuer's own CNPJ (already authorized by default; the authorizer replies "CNPJ do Marketplace ja autorizado para download") and do not repeat a document: both are rejected at acceptance.

  • informacoesAdicionaisstringoptional

    Marketplace additional information (≤5000) → infAdic/infAdMarketplace.

  • informacoesAdicionaisFiscostringoptional

    Additional information for the tax authority (≤2000) → infAdic/infAdFisco.

  • informacoesAdicionaisEmitentestringoptional

    Issuer complementary information (≤5000) → infAdic/infCpl.

  • observacoesMarketplacearrayoptional

    Up to 10 remarks → infAdic/obsMarketplace (xCampo attribute + xTexto).

Responses

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

Errors

CodeHTTP
10003000404

empresaId not found.

DCe00004400

Company not configured for DC-e (missing tipoEmitente / model 99 series / Marketplace site), or ambiente differs from the company's current environment (e.g. Producao sent before operations switched the company to production). Send emissaoDCe at registration or through an update with id; submit for the company's current environment.

DCe00005400

Marketplace / Carrier company without remetente. Add the sender.

DCe00006400

remetente.endereco missing. Add the sender address.

DCe00007400

Brazilian sender without cpfCnpj. Add the sender document.

DCe00008400

Company cannot issue (not approved / certificate not ready). Wait for approval / link the certificate.

DCe00009400

Brazilian recipient without cpfCnpj. Add the recipient document.

GW001400

Municipality IBGE code not found or inconsistent with uf. Check cidade / uf.

10019005400

Concurrent duplicate request. Retry later.

10019006400

Too many pending tasks for the CNPJ. Retry later.

10019007400

Number series unresolved (several enabled series). Ask operations to consolidate the series.

10019013400

Issuer type Carrier not supported for issuance yet. Use a Marketplace / OwnIssuer company.

10019018400

Invalid item (NCM length, quantity ≤ 0, negative unit price). Fix per mensagem.

10019019400

Invalid enum or format (mensagem names the field: tipoPessoa, modalidade, dataEmissao, documents, phone, e-mail, own-issuer remetente differing from the company, ...). Fix per mensagem.

10019020400

Invalid carrier CNPJ. Fix cnpjTransportadora.

10019021400

Additional information too long. Shorten the text.

10019022400

Invalid autorizacaoDownloadXml count or document; includes the issuer's own CNPJ; repeated document. Fix the list.

10019030400

Same id with a different message. Use a new id or resend the original message.

10019031400

Production: an active / authorized document already exists for the id. Query the original.

10019048400

dataEmissao outside the allowed window (more than 5 minutes ahead or more than 30 days back; mensagem carries the current limits). Use the current time or omit dataEmissao.

10001001400

Request field validation failed (one entry per field). Fix per mensagem.

Computed values and sanitization

vProd = quantidade × valorUnitario (HALF_UP, 2 decimals) and vDC = Σ vProd are computed by the platform and written to the XML. Text fields are sanitized (accents stripped, control characters replaced by spaces, whitespace collapsed) before length validation.

Acceptance-side validation

Checks performed at acceptance (no numbering, no SEFAZ call, direct 400): company issuable with a usable certificate and DC-e configured; ambiente matches the company; document lengths and check digits; municipality IBGE code consistent with the UF; 8-digit cep; non-empty itens with valid quantity / unit price / NCM; list size limits; text length.

SEFAZ rejections during issuance are not HTTP errors: they surface as query status Negada and the dce.rejected webhook. The full state machine is in DC-e.