← HomeFleetPay / Schema

CteServiceInput

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.

cfopstring | nullOptional
minLength4
maxLength4
nat_opstring | nullOptional
maxLength60
tp_servinteger | nullOptional

Service type (ide/tpServ): 0 normal, 1 subcontracting, 2 onward carriage, 3 intermediate onward carriage. The platform does not issue type 4 (linked to multimodal transport), which returns 422. Types 1, 2 and 3 require cte_anterior.chave and payer 4 (Other); for types 2 and 3, the draft route must cover the leg performed, not the full trip in the previous CT-e. These checks reject the request before submission, for every provider.

minimum0
maximum3
ind_ie_tomaintegerRequired
1 · 2 · 9
retirastringRequired
"0" · "1"
x_det_retirastring | nullOptional
maxLength160
Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "required": [
    "ind_ie_toma",
    "retira"
  ],
  "properties": {
    "cfop": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 4,
      "maxLength": 4
    },
    "nat_op": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 60
    },
    "tp_serv": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 3,
      "description": "Tipo de serviço (`ide/tpServ`): `0` normal, `1` subcontratação, `2` redespacho, `3`\nredespacho intermediário. O `4` (vinculado a multimodal) não é emitido pela plataforma\ne responde `422`. Nos tipos 1, 2 e 3 a emissão exige `cte_anterior.chave` e tomador\n`4` (Outros); nos tipos 2 e 3 a rota do rascunho precisa ser o trecho executado, não a\nviagem inteira do CT-e anterior — recusas antes do envio, para todo provedor.\n"
    },
    "ind_ie_toma": {
      "type": "integer",
      "enum": [
        1,
        2,
        9
      ]
    },
    "retira": {
      "type": "string",
      "enum": [
        "0",
        "1"
      ]
    },
    "x_det_retira": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 160
    }
  }
}