batch_idpath · stringRequiredBatch UUID returned by POST /fiscal/cte-subcontratacao/lote.
Constraints
{
"type": "string",
"format": "uuid"
}Parameters, data structure and responses from the versioned contract.
/fiscal/cte-subcontratacao/lote/{batch_id}Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
Batch status and one row per access key (or leg). The report is saved after each processed key, so you can see issued documents while the batch is still running. Batch status is processing, done or failed; each row's status is pending, emitted, duplicated or failed.
Each emitted row includes counter_cte_id, the counter-CT-e UUID for GET /fiscal/cte/{cte_uuid}, polling and DACTE, and, for legs, documento_financeiro (the leg document accepted by GET /carriers/parcelas-repasse/{documento}). A failure after the provider accepts the document is returned as emitted with financeiro: failed, never as failed without counter_cte_id.
[
{
"oauth2": []
},
{
"chaveApi": []
}
]batch_idpath · stringRequiredBatch UUID returned by POST /fiscal/cte-subcontratacao/lote.
{
"type": "string",
"format": "uuid"
}200 HTTP ResponseThe batch and the result for each access key.
application/jsondataobjectRequiredenvironmentobjectOptionalX-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.
404 HTTP ResponseBatch does not exist or belongs to another carrier (lote_nao_encontrado).
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 de subcontratação"
],
"summary": "Acompanhar um lote de contra-CT-e",
"operationId": "getContraCteBatch",
"description": "O estado do lote e **uma linha por chave** (ou por perna). O relatório é gravado a cada\nchave processada: no meio do lote você já vê o que foi emitido. `status` do lote é\n`processing`, `done` ou `failed`; o de cada linha é `pending`, `emitted`, `duplicated` ou\n`failed`.\n\nCada linha `emitted` traz o `counter_cte_id` — o UUID do contra-CT-e para\n`GET /fiscal/cte/{cte_uuid}`, polling e DACTE — e, nas pernas, o `documento_financeiro`\n(o documento da perna, aceito em `GET /carriers/parcelas-repasse/{documento}`). Uma falha\n**depois** de o provedor aceitar o documento vem como `emitted` com `financeiro: failed`,\nnunca como `failed` sem `counter_cte_id`.\n",
"parameters": [
{
"$ref": "#/components/parameters/ContraCteBatchId"
}
],
"responses": {
"200": {
"description": "O lote e o resultado por chave.",
"headers": {
"X-Request-Id": {
"$ref": "#/components/headers/RequestId"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContraCteLoteEnvelope"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"description": "Lote inexistente ou de outra transportadora (`lote_nao_encontrado`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorEnvelope"
}
}
}
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"method": "GET",
"path": "/fiscal/cte-subcontratacao/lote/{batch_id}"
}