Other fiscal documents
CT-e Transport
5 endpoints
The CT-e API (model 57, layout 4.00 + NT2025/001) lets you issue, cancel, correct (CC-e) and consult Electronic Bills of Lading. The CT-e documents the provision of a cargo transport service. It supports 6 modes (road, air, waterway, rail, pipeline, multimodal) and 4 types of CT-e (Normal, Supplement, Annulment, Replacement). The business data goes in the /create body; the technical access-key fields (cCT, cDV, cUF, dhEmi, mod) are calculated automatically by the server. The fields serie and nCT are optional: they are allocated automatically when omitted (or set to 0), but are honored when sent (useful for skipping the numbering, e.g. after a duplicate at the tax authority).
| Endpoint | Method | Description |
|---|---|---|
/api/cte/create | POST | Issue CT-e |
/api/cte/cancel | POST | Cancel CT-e (event 110111) |
/api/cte/cce | POST | Correction Letter — CC-e (event 110110) |
/api/cte/consult | POST | Consult the status of the CT-e |
The service taker (whoever pays the freight) is defined in ide.toma: 0=Sender, 1=Dispatcher, 2=Receiver, 3=Recipient, 4=Others (in this case fill in ide.toma4).
/api/cte/createIssue CT-e
Issues a CT-e from the submitted body. The client sends only the business data; the technical access-key identification fields are calculated by the server (see the note below the ide table). Credit is debited only in production (tpAmb=1) and when the CT-e is authorized. The examples below cover the most common case: road mode (modal=01) and Normal CT-e (tpCTe=0).
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Token of the issuing company |
| sign | string | MD5 signature: MD5(token + path + body + timestamp) |
| timestamp | string | Unix timestamp in seconds (5-minute window) |
ide (tpAmb, CFOP, natOp, modal, tpCTe, toma, cMunIni, UFIni, cMunFim, UFFim); emit with CNPJ or CPF and xNome; rem with CNPJ or CPF; dest with CNPJ or CPF; vPrest.vTPrest > 0; imp (with one ICMS variant). For tpCTe=0 (Normal): infCTeNorm with infCarga (proPred + at least 1 infQ) and infModal (the mode corresponding to ide.modal; for modal=01, rodo.RNTRC is required). All other fields are optional.
Body — root
| Field | Type | Description |
|---|---|---|
| ide * | object | CT-e identification |
| emit * | object | Issuer data (carrier) |
| rem * | object | Cargo sender |
| dest * | object | Cargo recipient |
| vPrest * | object | Service provision values |
| imp * | object | Taxes (ICMS + tributes) |
| infCTeNorm * | object | Normal CT-e body — required when tpCTe=0 (Normal) or 3 (Replacement) |
| exped | object | Dispatcher (optional) |
| receb | object | Receiver (optional) |
| compl | object | Complementary data (observations, flow, delivery) |
| infCteComp | object | Key of the supplemented CT-e — required when tpCTe=1 (Supplement): { chCTe } |
| infCteAnu | object | Key of the annulled CT-e — required when tpCTe=2 (Annulment): { chCte, dEmi } |
| autXML | array | CNPJs/CPFs authorized to access the XML: [{ CNPJ } | { CPF }] |
| infRespTec | object | Technical contact — filled in automatically by the server per UF |
ide — Identification
| Field | Type | Description |
|---|---|---|
| tpAmb * | int | Environment: 1=production, 2=staging |
| CFOP * | int | Fiscal operation code (e.g.: 5353 within the state, 6353 interstate) |
| natOp * | string | Nature of the operation (e.g.: "PRESTACAO DE SERVICO DE TRANSPORTE") |
| modal * | string | Mode: "01"=road, "02"=air, "03"=waterway, "04"=rail, "05"=pipeline, "06"=multimodal |
| tpCTe * | int | CT-e type: 0=Normal, 1=Supplement, 2=Annulment, 3=Replacement |
| tpServ * | int | Service type: 0=Normal, 1=Subcontracting, 2=Reshipment, 3=Intermediate Reshipment, 4=Service Linked to Multimodal |
| toma * | int | Service taker: 0=Sender, 1=Dispatcher, 2=Receiver, 3=Recipient, 4=Others |
| toma4 | object | Service taker data — required when toma=4 (see table below) |
| indIEToma | int | Service taker IE indicator: 1=ICMS taxpayer, 2=Exempt, 9=Non-taxpayer (when 9, the service taker's IE is omitted automatically) |
| cMunIni * | long | IBGE code of the service start municipality (7 digits) |
| xMunIni | string | Name of the start municipality |
| UFIni * | string | Start UF (2 letters) |
| cMunFim * | long | IBGE code of the service end municipality (7 digits) |
| xMunFim | string | Name of the end municipality |
| UFFim * | string | End UF (2 letters) |
| cMunEnv | long | IBGE code of the issuance municipality |
| xMunEnv | string | Name of the issuance municipality |
| UFEnv | string | Issuance UF |
| retira | int | Pickup at origin: 0=Yes, 1=No. Default: 1 |
| xDetRetira | string | Pickup details |
| tpImp | int | DACTE format: 1=Portrait, 2=Landscape. Default: 1 |
| infPercurso | array | Route UFs: [{ UFPer }] |
| dhCont | string | Date/time of entry into contingency (ISO 8601) |
| xJust | string | Contingency justification |
| serie | int | CT-e series (3 digits of the access key). Optional — auto-allocated (the company's CT-e series) when omitted or 0; respected when sent |
| nCT | long | CT-e number (part of the access key). Optional — auto-incremented by the server when omitted or 0; respected when sent (useful for skipping numbering, e.g.: after a duplicate) |
Filled in automatically by the server — you do not need to send them: mod (fixed at 57), cCT (8-digit numeric code), cDV (check digit), cUF (derived from the issuer's UF), dhEmi (current date/time), tpEmis (default 1=Normal), procEmi and verProc.
toma4 — "Others" service taker (when ide.toma=4)
| Field | Type | Description |
|---|---|---|
| CNPJ ⚠ / CPF ⚠ | string | Service taker's document (one of the two) |
| IE | string | State Registration |
| xNome | string | Company name/name |
| xFant, fone, email | string | Trade name, phone, e-mail |
| enderToma | object | Address: { xLgr, nro, xCpl, xBairro, cMun, xMun, CEP, UF, cPais, xPais } |
emit — Issuer (carrier)
| Field | Type | Description |
|---|---|---|
| CNPJ ⚠ | string | Issuer's CNPJ (14 digits) |
| CPF ⚠ | string | Issuer's CPF (11 digits) |
| IE | string | State Registration |
| IEST | string | State Registration of the tax substitute |
| xNome * | string | Company name |
| xFant | string | Trade name |
| CRT | int | Tax Regime Code: 1=Simples Nacional, 2=SN exceeding sublimit, 3=Normal Regime, 4=MEI. Default: 3 |
| enderEmit | object | Address: { xLgr, nro, xCpl, xBairro, cMun, xMun, CEP, UF, fone } |
rem — Sender
| Field | Type | Description |
|---|---|---|
| CNPJ ⚠ / CPF ⚠ | string | Sender's document (one of the two) |
| IE | string | State Registration (or "ISENTO") |
| xNome | string | Company name/name |
| xFant, fone, email | string | Trade name, phone, e-mail |
| enderReme | object | Sender's address (structure below) |
| locColeta | array | Pickup locations (optional): [{ CNPJ|CPF, xNome, xLgr, nro, xBairro, cMun, xMun, UF }] |
dest — Recipient
| Field | Type | Description |
|---|---|---|
| CNPJ ⚠ / CPF ⚠ | string | Recipient's document (one of the two) |
| IE | string | State Registration (or "ISENTO") |
| xNome | string | Company name/name |
| fone, email, ISUF | string | Phone, e-mail, SUFRAMA Registration |
| enderDest | object | Recipient's address (structure below) |
| locEnt | object | Delivery location (optional): { CNPJ|CPF, xNome, xLgr, nro, xBairro, cMun, xMun, UF } |
exped / receb — Dispatcher / Receiver (optional)
| Field | Type | Description |
|---|---|---|
| CNPJ / CPF | string | Document (one of the two) |
| IE, xNome, fone, email | string | State Registration, name, phone, e-mail |
| enderExped / enderReceb | object | Address (same generic structure below) |
Address (enderEmit / enderReme / enderExped / enderReceb / enderDest)
| Field | Type | Description |
|---|---|---|
| xLgr | string | Street |
| nro | string | Number |
| xCpl | string | Complement |
| xBairro | string | Neighborhood |
| cMun | string | IBGE municipality code (7 digits) |
| xMun | string | Municipality name |
| CEP | string | Postal code (8 digits) — not used in enderEmit |
| UF | string | State abbreviation (2 letters) |
| cPais | string | Country code (optional, default 1058 Brazil) |
| xPais | string | Country name (optional) |
| fone | string | Phone (only in enderEmit) |
vPrest — Service Provision Values
| Field | Type | Description |
|---|---|---|
| vTPrest * | decimal | Total value of the service provision (> 0) |
| vRec | decimal | Amount receivable |
| Comp | array | Value components: [{ xNome, vComp }] — e.g.: "FRETE PESO", "PEDÁGIO", "GRIS" |
imp — Taxes
| Field | Type | Description |
|---|---|---|
| ICMS * | object | ICMS taxation — fill in only one of the variants (see below) |
| vTotTrib | decimal | Approximate total value of tributes |
| infAdFisco | string | Additional information of interest to the tax authority |
| ICMSUFFim | object | DIFAL (interstate sharing, optional): { vBCUFFim, pFCPUFFim, pICMSUFFim, pICMSInter, vFCPUFFim, vICMSUFFim, vICMSUFIni } |
| infTribFed | object | Federal tributes (optional): { vPIS, vCOFINS, vIR, vINSS, vCSLL } |
ICMS — variants (fill in only one)
| Variant | When to use | Fields |
|---|---|---|
| ICMS00 | Normal taxation | { vBC, pICMS, vICMS } (CST 00) |
| ICMS20 | With reduction of calculation base | { pRedBC, vBC, pICMS, vICMS } (CST 20) |
| ICMS45 | Exempt / non-taxed / deferred | { CST } — "40"=Exempt, "41"=Non-taxed, "51"=Deferred |
| ICMS60 | ICMS charged by tax substitution | { vBCSTRet, vICMSSTRet, pICMSSTRet, vCred } (CST 60) |
| ICMS90 | Others (special regime) | { pRedBC, vBC, pICMS, vICMS, vCred } (CST 90) |
| ICMSOutraUF | ICMS due to another UF | { pRedBCOutraUF, vBCOutraUF, pICMSOutraUF, vICMSOutraUF } |
| ICMSSN | Simples Nacional issuer | { CST: "90", indSN: 1 } |
infCTeNorm — Normal CT-e (required for tpCTe=0/3)
| Field | Type | Description |
|---|---|---|
| infCarga * | object | Cargo information (table below) |
| infDoc | object | Transported documents (table below) |
| infModal * | object | Mode information (table below) |
| docAnt | object | Previous documents (subcontracting/reshipment): { emiDocAnt[]{ CNPJ|CPF, IE, UF, xNome, idDocAnt[] } } |
| seg | array | Cargo insurance: [{ respSeg, xSeg, CNPJ, nApol, nAver, vCarga }] — respSeg: 1=Sender…6=Service taker |
| cobr | object | Billing/invoices: { fat{ nFat, vOrig, vDesc, vLiq }, dup[]{ nDup, dVenc, vDup } } |
| veicNovos | array | New vehicles transported: [{ chassi, cCor, xCor, cMod, vUnit, vFrete }] |
| infCteSub | object | Replacement — required when tpCTe=3: { chCte, indAltToma, refNF, tomaICMS, tomaNaoICMS } |
infCTeNorm.infCarga — Cargo
| Field | Type | Description |
|---|---|---|
| proPred * | string | Predominant product |
| vCarga | decimal | Total cargo value |
| xOutCat | string | Other cargo characteristics (e.g.: FRIA, GRANEL, REFRIGERADA) |
| vCargaAverb | decimal | Cargo value for endorsement purposes |
| infQ[] * | array | Quantities — minimum 1: [{ cUnid, tpMed, qCarga }] |
| infQ[].cUnid | string | Unit: "00"=M³, "01"=KG, "02"=TON, "03"=UNIT, "04"=LITERS, "05"=MMBTU |
| infQ[].tpMed | string | Measurement type (e.g.: "PESO BRUTO", "PESO DECLARADO") |
| infQ[].qCarga | decimal | Quantity |
infCTeNorm.infDoc — Transported documents
| Field | Type | Description |
|---|---|---|
| infNFe | array | NF-es by access key: [{ chave, PIN, dPrev, infUnidCarga[], infUnidTransp[] }] — chave with 44 digits |
| infNF | array | Paper invoices (legacy): [{ mod, serie, nDoc, dEmi, vBC, vICMS, vProd, vNF, nCFOP, nPeso, … }] |
| infOutros | array | Other documents: [{ tpDoc, descOutros, nDoc, dEmi, vDocFisc }] — tpDoc: "00"=Declaration, "10"=Pipeline, "99"=Others |
infCTeNorm.infModal — Modes (fill in only the one corresponding to ide.modal)
| Mode | Object | Fields |
|---|---|---|
| 01 Road | rodo | { RNTRC* } — RNTRC with 8 digits or "ISENTO". Optional: occ[] (pickup orders) |
| 02 Air | aereo | { nMinu, nOCA, dPrevAereo, natCarga{ xDime, cInfManu[] }, tarifa{ CL, cTar, vTar }, peri[] } — dPrevAereo AAAA-MM-DD |
| 03 Waterway | aquav | { vPrest, vAFRMM, xNavio, nViag, direc, irin, tpNav, balsa[], detCont[] } — direc: N/L/S/O; tpNav: 0=Interior, 1=Coastal |
| 04 Rail | ferrov | { tpTraf, respFat, ferrEmi, vFrete, chCTeFerroOrigem, ferroEnv[] } — tpTraf: 0=Own, 1=Mutual, 2=Road-rail, 3=Road |
| 05 Pipeline | duto | { vTar, dIni, dFim } — dates AAAA-MM-DD |
| 06 Multimodal | multimodal | { COTM, indNegociavel, seg[] } — indNegociavel: 0=No, 1=Yes |
The entire infModal block accepts versaoModal (default "4.00").
compl — Complementary data (optional)
| Field | Type | Description |
|---|---|---|
| xCaracAd, xCaracSer, xEmi | string | Additional characteristic of the transport / of the service / issuer name |
| origCalc, destCalc | string | Origin / destination municipality for freight calculation |
| xObs | string | General observations |
| ObsCont / ObsFisco | array | Free observations of the taxpayer / tax authority: [{ xCampo, xTexto }] |
| fluxo, Entrega | object | Cargo flow (origin/passage/destination/route) and delivery forecast |
* Required field. ⚠ At least one of CNPJ or CPF is required in the group.
/api/cte/cancelCancel CT-e
Cancels an authorized CT-e (event 110111). Requires that the CT-e has been authorized (has a protocol) and is not yet cancelled.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Token of the issuing company |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| chCTe * | string | Access key of the CT-e (44 digits) |
| xJust * | string | Cancellation justification (minimum 15 characters as required by the tax authority) |
| nProt | string | Authorization protocol. Optional: when omitted, uses the protocol registered at issuance |
* Required field.
/api/cte/cceCorrection Letter (CC-e)
Registers an Electronic Correction Letter (event 110110) on an authorized CT-e. The CC-e cannot correct values that impact the tax, registration data that change the issuer/service taker/sender/recipient, or the issuance date. Each correction indicates the group, field and new value.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Token of the issuing company |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| chCTe * | string | Access key of the CT-e (44 digits) |
| infCorrecao[] * | array | Corrections (minimum 1, up to 20) |
| infCorrecao[].grupoAlterado * | string | Changed group (e.g.: "ide", "rem", "dest") |
| infCorrecao[].campoAlterado * | string | Changed field (e.g.: "xNome") |
| infCorrecao[].valorAlterado * | string | New value |
| infCorrecao[].nroItemAlterado | int | Number of the changed item (when the group is a list) |
* Required field. The condition of use (xCondUso) is filled in automatically by the server.
/api/cte/consultConsult the status of the CT-e
Consults the status of the CT-e at the tax authority from the access key. When the CT-e is cancelled (local record), the response reflects the cancellation.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Token of the issuing company |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| chCTe * | string | Access key of the CT-e (44 digits) |
* Required field.
/api/cte/get_listList CT-e (paginated)
Lists the company's CT-e with pagination. Parameters are passed via query string (not in the body). The time filter is optional, but if used, both start_create_time and end_create_time are required.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Issuing company token |
| sign | string | MD5 signature (path includes the query string) |
| timestamp | string | Unix timestamp in seconds |
Query string
| Parameter | Type | Description |
|---|---|---|
| page * | int | Page number (≥ 1) |
| page_size * | int | Page size (1–50) |
| start_create_time | long | Unix timestamp in milliseconds — start (requires end_create_time) |
| end_create_time | long | Unix timestamp in milliseconds — end |
| status | string | Filter by status. Values: "Success" (authorized), "Canceled" (canceled), "Processing" (processing), "Failed" (failed), "Unknown" (unknown) |
* Required field.