xmlstringRequiredCT-e XML, raw or base64-encoded. Accepts cteProc (with protocol) or CTe.
maxLength2097152Parameters, data structure and responses from the versioned contract.
/fiscal/cte-emitidosTechnical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
Submits to FleetPay the XML of a CT-e issued by your own carrier. This brings the document into the platform's operational and financial workflow: service, delivery and receivable.
Previously, this path depended on an external XML storage partner: our process fetched the document from that service. That process operates on a single CNPJ, so it serves only one company.
Here, your system submits the document, authenticated with your credentials. The document follows the same processing as before; only the delivery source changes.
Three forms are available, choose one:
application/json with the xml field: raw XML or base64. Encoding is detected from the content; no flag is required.multipart/form-data with the arquivo field.Accepts cteProc (with protocol) or raw CTe, up to 2 MB.
No additional payload is needed. FleetPay reads the access key, issue date, issuer (your carrier), freight service payer (using the toma code, whether sender, dispatcher, receiver, recipient or the toma4 group), route (origin and destination, including onward carriage), service amount and the transported NF-e access key.
The operation is idempotent by access key. The first submission returns 201; subsequent submissions return 200 with first_reception: false and do not reprocess the document. Network retries and nightly reprocessing do not create duplicate services or errors.
cnpj_carrier is read from the XML emit group and must match the authenticated carrier. A CT-e from another company is rejected. The contracting carrier's CT-e, used as the source for your counter-CT-e, is submitted through POST /fiscal/cte-subcontratacao.
[
{
"oauth2": []
},
{
"chaveApi": []
}
]No parameters declared for this operation.
Required
application/jsonxmlstringRequiredCT-e XML, raw or base64-encoded. Accepts cteProc (with protocol) or CTe.
maxLength2097152multipart/form-dataarquivostring · binaryRequiredCT-e XML, up to 2 MB.
200 HTTP ResponseDocument previously delivered. The operation is idempotent: nothing is reprocessed and first_reception is false.
application/jsondataobjectRequiredenvironmentobjectRequiredX-Request-IdCall correlation identifier.
201 HTTP ResponseCT-e received for the first time and forwarded for processing.
application/jsondataobjectRequiredenvironmentobjectRequiredX-Request-IdCall correlation identifier.
400 HTTP ResponseInvalid payload.
X-Request-IdCall correlation identifier.
401 HTTP ResponseFleetPay API key missing or invalid.
X-Request-IdCall correlation identifier.
403 HTTP ResponseFiscal scope disabled for the key, or no active carrier associated with the key.
X-Request-IdCall correlation identifier.
422 HTTP ResponseInvalid payload, outstanding requirement or business rule.
X-Request-IdCall correlation identifier.
429 HTTP ResponsePer-carrier limit exceeded.
X-Request-IdCall correlation identifier.
Retry-AfterSeconds until another attempt.
500 HTTP ResponseInternal failure without operational integration details.
X-Request-IdCall correlation identifier.
{
"tags": [
"CT-e emitidos"
],
"summary": "Entregar um CT-e emitido pela sua transportadora",
"description": "Entrega à FleetPay o XML de um CT-e que a **sua própria transportadora emitiu**. É por\naqui que o documento entra no fluxo operacional e financeiro da plataforma: vira serviço,\nentrega e recebível.\n\n## Por que existe\n\nAté aqui esse caminho dependia de um parceiro externo de armazenamento de XML: um\nprocesso nosso ia buscar o documento lá e trazia para dentro. Aquele processo opera sobre\num único CNPJ, então atende uma empresa e mais nenhuma.\n\nAqui quem entrega é o **seu sistema**, autenticado pela sua credencial. O documento segue\nexatamente o mesmo processamento de sempre — o que muda é quem traz.\n\n## Como enviar\n\nTrês formas, escolha uma:\n\n- `application/json` com o campo `xml` — o XML cru **ou em base64**. A codificação é\n detectada pelo conteúdo; não há flag a acertar.\n- `multipart/form-data` com o campo `arquivo`.\n\nAceita o `cteProc` (com protocolo) ou o `CTe` cru, até 2 MB.\n\n## O que a FleetPay lê do XML\n\nVocê não monta payload nenhum — o XML basta. São lidos: a chave de acesso, a data de\nemissão, o emitente (a sua transportadora), o **tomador do frete** (pelo código `toma`,\nseja ele remetente, expedidor, recebedor, destinatário ou o grupo `toma4`), a rota\n(origem e destino, inclusive nos casos de redespacho), o valor da prestação e a chave da\nNF-e transportada.\n\n## Reenviar é seguro\n\nA operação é **idempotente pela chave de acesso**. O primeiro envio responde `201`; os\nseguintes respondem `200` com `first_reception: false` e **não reprocessam** o documento.\nRetry de rede e reprocessamento noturno não criam serviço duplicado nem erro.\n\n## Só o CT-e em que você é a emitente\n\nO `cnpj_carrier` é lido do grupo `emit` do XML e precisa ser o da transportadora\nautenticada. Um CT-e de outra empresa é recusado — o CT-e da contratante, que dá origem\nao seu contra-CT-e, entra por `POST /fiscal/cte-subcontratacao`.\n",
"operationId": "receiveEmittedCte",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmittedCteInput"
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"arquivo"
],
"properties": {
"arquivo": {
"type": "string",
"format": "binary",
"description": "XML do CT-e, até 2 MB."
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/EmittedCteAlreadyKnown"
},
"201": {
"$ref": "#/components/responses/EmittedCteAccepted"
},
"400": {
"$ref": "#/components/responses/ValidationFailed"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"422": {
"$ref": "#/components/responses/ValidationOrBusinessRuleFailed"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"method": "POST",
"path": "/fiscal/cte-emitidos",
"parameters": []
}