chave_cte_originalstringRequiredAccess key (44 digits) of the contracting company's CT-e.
minLength44maxLength44Parameters, data structure and responses from the versioned contract.
/fiscal/cte/contraTechnical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
Issues the subcontracted carrier's CT-e against the contracting company's CT-e, referencing its key in infDocAnt and naming the contracting company as the service payer.
tipo_servico sets the counter-CT-e's ide/tpServ: 1 subcontracting (default), 2 onward carriage, 3 intermediate onward carriage. For onward carriage, the route is the segment performed, not the contracting company's entire trip: 2 and 3 require origem and destino (400 validacao if missing). A segment identical to the original CT-e's entire trip returns 422 contra_cte_invalido (redespacho_exige_rota); an original CT-e linked to multimodal transport returns 422 contra_cte_invalido (origem_incompativel_com_tipo). The tax rule is resolved using the segment's route and service type.
The payload is concise: provide the original CT-e key (which must already have arrived in the Monitor DFe inbox), the driver (by CPF), the vehicle (by license plate) performing the segment, and the freight amount — the transfer to the driver. Sender, recipient, cargo, route and taxation are read from the original CT-e XML.
valor_frete is optional: without it, the carrier's pricing rule suggests the segment amount. A 202 response requires polling at /cte/{cte_uuid}/consulta.
[
{
"oauth2": []
},
{
"chaveApi": []
}
]No parameters declared for this operation.
Required
application/jsonchave_cte_originalstringRequiredAccess key (44 digits) of the contracting company's CT-e.
minLength44maxLength44motoristaobjectRequiredplacastringRequiredVehicle license plate (Brazilian format, e.g. ABC1D23 or ABC1234).
valor_fretenumber · doubleOptionalDriver transfer amount for the leg. Optional.
minimum0.01tipo_servicointeger | nullOptionalCounter-CT-e ide/tpServ: 1 subcontracting (default), 2 onward carriage, 3 intermediate onward carriage.
1 · 2 · 3 · nullorigemobjectOptionaldestinoobjectOptional202 HTTP ResponseIssuance accepted or outcome still inconclusive.
application/jsondataobjectRequiredenvironmentobjectRequiredX-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"
],
"summary": "Emitir contra-CT-e (subcontratação ou redespacho)",
"description": "Emite o CT-e da transportadora **subcontratada** contra o CT-e da contratante, referenciando\na chave dele em `infDocAnt` e com a contratante como tomador.\n\n`tipo_servico` diz o `ide/tpServ` do contra-CT-e: `1` subcontratação (padrão), `2`\nredespacho, `3` redespacho intermediário. No redespacho a rota é o **trecho** executado,\nnão a viagem da contratante: `2` e `3` exigem `origem` e `destino` (`400` `validacao`\nsem eles); um trecho igual à viagem inteira do CT-e original responde `422`\n`contra_cte_invalido` (`redespacho_exige_rota`), e um CT-e original vinculado a\nmultimodal, `422` `contra_cte_invalido` (`origem_incompativel_com_tipo`). A regra de\ntributação é resolvida pela rota do trecho e pelo tipo.\n\nO payload é enxuto: informe a **chave do CT-e original** (que já precisa ter chegado pela\ncaixa do Monitor DFe), o **motorista** (por CPF) e o **veículo** (por placa) que executam o\ntrecho, e o **valor do frete** — o repasse ao motorista. Remetente, destinatário, carga,\nrota e tributação são lidos do XML do CT-e original.\n\n`valor_frete` é opcional: sem ele, a regra de precificação da transportadora sugere o valor\ndo trecho. Uma resposta 202 exige polling em `/cte/{cte_uuid}/consulta`.\n",
"operationId": "issueContraCte",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"chave_cte_original",
"motorista",
"placa"
],
"properties": {
"chave_cte_original": {
"type": "string",
"minLength": 44,
"maxLength": 44,
"description": "Chave de acesso (44 dígitos) do CT-e da contratante."
},
"motorista": {
"type": "object",
"required": [
"cpf"
],
"properties": {
"cpf": {
"type": "string",
"pattern": "^[0-9]{11}$",
"description": "CPF do motorista que executa o trecho (somente dígitos)."
}
}
},
"placa": {
"type": "string",
"description": "Placa do veículo (padrão brasileiro, ex. ABC1D23 ou ABC1234)."
},
"valor_frete": {
"type": "number",
"format": "double",
"minimum": 0.01,
"description": "Valor do repasse ao motorista pelo trecho. Opcional."
},
"tipo_servico": {
"type": [
"integer",
"null"
],
"enum": [
1,
2,
3,
null
],
"description": "`ide/tpServ` do contra-CT-e: `1` subcontratação (padrão), `2` redespacho, `3` redespacho intermediário."
},
"origem": {
"$ref": "#/components/schemas/ContraCteLoteRota"
},
"destino": {
"$ref": "#/components/schemas/ContraCteLoteRota"
}
}
}
}
}
},
"responses": {
"202": {
"description": "Emissão aceita ou com resultado ainda não conclusivo.",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/RequestId"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CteIssueEnvelope"
}
}
}
},
"400": {
"$ref": "#/components/responses/Erro400"
},
"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/contra",
"parameters": []
}