leg_refstring | nullOptionalYour label for identifying the leg in the report (results[].ref contains the ctes.i.pernas.j path).
maxLength64Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
A leg of the contracting company's CT-e. If omitted, motorista/placa inherit the batch values; valor is required when the batch does not use valores.frete_bruto. Two legs with the same route segment under the same key are rejected.
leg_refstring | nullOptionalYour label for identifying the leg in the report (results[].ref contains the ctes.i.pernas.j path).
maxLength64motoristaobjectOptionalplacastringOptionalpattern"^[A-Za-z]{3}[0-9][A-Za-z0-9][0-9]{2}$"valornumber | nullOptionalminimum0.01origemobjectOptionaldestinoobjectOptionaltipo_servicointeger | nullOptionalLeg service type; when absent, inherits from the access-key entry, then the batch (default 1). For 2/3, the leg requires origem and destino.
1 · 2 · 3 · null{
"type": "object",
"description": "Um trecho do CT-e da contratante. `motorista`/`placa` ausentes herdam os do lote; `valor`\né obrigatório quando o lote não usa `valores.frete_bruto`. Duas pernas com o mesmo trecho\nna mesma chave são recusadas.\n",
"properties": {
"leg_ref": {
"type": [
"string",
"null"
],
"maxLength": 64,
"description": "Rótulo seu para reconhecer a perna no relatório (`results[].ref` traz o caminho `ctes.i.pernas.j`)."
},
"motorista": {
"type": "object",
"properties": {
"cpf": {
"type": "string",
"pattern": "^\\d{11}$"
}
}
},
"placa": {
"type": "string",
"pattern": "^[A-Za-z]{3}[0-9][A-Za-z0-9][0-9]{2}$"
},
"valor": {
"type": [
"number",
"null"
],
"minimum": 0.01
},
"origem": {
"$ref": "#/components/schemas/ContraCteLoteRota"
},
"destino": {
"$ref": "#/components/schemas/ContraCteLoteRota"
},
"tipo_servico": {
"type": [
"integer",
"null"
],
"enum": [
1,
2,
3,
null
],
"description": "Tipo de serviço da perna; ausente herda o da chave e depois o do lote (padrão `1`). Em `2`/`3` a perna precisa de `origem` e `destino`."
}
}
}