← HomeFleetPay / Schema

ContraCteLoteItem

Structure preserved from the versioned API contract.

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

chavestringRequired

Contracting carrier's CT-e access key (44 digits, valid check digit). Do not repeat the same key within the batch.

minLength44
maxLength44
valornumber | nullOptional

Counter-CT-e amount for this key (per-document mode). Mutually exclusive with valores.frete_bruto.

minimum0.01
tipo_servicointeger | nullOptional

Service type for this key (1 subcontracting, 2 onward carriage, 3 intermediate onward carriage); if omitted, inherits the batch value. For 2/3, the key (or batch) must provide origem and destino.

1 · 2 · 3 · null
Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "required": [
    "chave"
  ],
  "properties": {
    "chave": {
      "type": "string",
      "minLength": 44,
      "maxLength": 44,
      "description": "Chave de acesso do CT-e da contratante (44 dígitos, DV válido). Não repita a mesma chave no lote."
    },
    "valor": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0.01,
      "description": "Valor do contra-CT-e desta chave (modo por documento). Exclusivo com `valores.frete_bruto`."
    },
    "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 desta chave (`1` subcontratação, `2` redespacho, `3` redespacho intermediário); ausente herda o do lote. Em `2`/`3` a chave (ou o lote) precisa de `origem` e `destino`."
    },
    "pernas": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/components/schemas/ContraCteLotePerna"
      }
    }
  }
}