v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
DC-e

Generate DC-e

Authorize a DC-e with the /dce/autorizar endpoint and see request and response examples.

post/dce/autorizar

Request body

infAdicstring

Additional information for the DC-e (1-5000 chars)

Example request

{
  "ide": {
    "uf": "SP",
    "cUF": "35"
  },
  "emit": {
    "xNome": "JOAO DA SILVA",
    "endereco": {
      "logradouro": "Rua Henri Dunant",
      "uf": "SP",
      "cep": "01310100"
    }
  },
  "dest": {
    "xNome": "MARIA OLIVEIRA",
    "endereco": {
      "logradouro": "Avenida Engenheiro Luiz Carlos Berrini",
      "uf": "SP",
      "cep": "04571936"
    }
  },
  "produtos": [
    {
      "xProd": "LIVRO DE RECEITAS"
    }
  ],
  "transp": {
    "carrierName": "buslog"
  },
  "infAdic": "BENS DE USO PESSOAL SEM VALOR COMERCIAL"
}

Response

Successful DC-e authorization

successboolean

Whether the authorization was successful

cStatstring

Status code returned by SEFAZ. 100 = Authorization approved

xMotivostring

Human-readable description of the authorization result

documentTypestring

Type of the returned document

dceNumberstring

Generated DC-e number

dceSeriestring

DC-e series number

dceDatestring date-time

DC-e emission date and time

dceKeystring

44-digit DC-e access key

dceValuestring

Total value of the DC-e document

nProtstring

Authorization protocol number from SEFAZ

dhRecbtostring date-time

Date and time when SEFAZ received and processed the authorization

xmlstring

Complete signed XML of the authorized DC-e document. Shown abbreviated in documentation for readability

Example response

{
  "cStat": "100",
  "xMotivo": "Autorizado o uso do DCe",
  "documentType": "dce",
  "dceNumber": "374",
  "dceSerie": "1",
  "dceDate": "2026-04-06T20:37:41-03:00",
  "dceKey": "35260440728044000157990010000003741101480600",
  "dceValue": "100.00",
  "nProt": "3352600000044170",
  "dhRecbto": "2026-04-06T20:37:42-03:00"
}