← HomeFleetPay / Schema

CteTripInput

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.

trip_starts_atstring | null · dateOptional
trip_ends_atstring | null · dateOptional
trip_distance_kminteger | nullOptional
minimum0
maximum99999
cargo_sh_codestring | nullOptional
pattern"^\\d{4}$"
cargo_type_codeinteger | nullOptional
minimum1
maximum12
toll_valuenumber | null · doubleOptional
minimum0
fuel_valuenumber | null · doubleOptional
minimum0
driver_freight_valuenumber | null · doubleOptional

What the driver receives for this trip, in Brazilian reais. This is the amount declared by the CIOT to ANTT (vlrFrete) and the transfer recorded by the financial system, never the price charged to the payer, which is the CT-e's valores.total.

Optional in most cases. When omitted, the transfer is calculated from the driver's rule (percentage of freight, daily rate or per-delivery amount, according to the band covering the NF-e destination postal code), and the CIOT declares that amount.

It becomes required when calculation is not possible, and the CIOT remains pending until it is provided: the driver's rule is "Valor Informado pela Empresa" (amount supplied by the company), the driver has no linked transfer rule, or no band in the rule covers the destination postal code.

Original JSON Definition (Portuguese Descriptions)
{
  "type": [
    "object",
    "null"
  ],
  "properties": {
    "trip_starts_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "trip_ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "trip_distance_km": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 99999
    },
    "cargo_sh_code": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{4}$"
    },
    "cargo_type_code": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 12
    },
    "toll_value": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0
    },
    "fuel_value": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0
    },
    "driver_freight_value": {
      "description": "O que o **motorista** recebe por esta viagem, em reais. É o valor que o CIOT\ndeclara à ANTT (`vlrFrete`) e o repasse que o financeiro registra — nunca o preço\ncobrado do tomador, que é o `valores.total` do CT-e.\n\n**Opcional na maioria dos casos.** Omitido, o repasse é calculado pela regra do\nmotorista (percentual sobre o frete, diária ou valor por entrega, conforme a faixa\nque cobre o CEP de destino da NF-e), e é esse número que o CIOT declara.\n\nPassa a ser **obrigatório** quando não há de onde calcular, e o CIOT fica pendente\naté ser informado: a regra do motorista é \"Valor Informado pela Empresa\", o\nmotorista não tem regra de repasse vinculada, ou nenhuma faixa da regra cobre o CEP\nde destino.\n",
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "exclusiveMinimum": 0
    }
  }
}