← HomeFleetPay / Schema

ContraCteTomador

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.

Freight payer of the counter-CT-e (toma4), replacing the contractor CT-e issuer. Two formats only: only cnpj (rest filled from company registry matching exact cnpj) or full details (cnpj, nome, logradouro, numero, bairro, codigo_municipio, municipio, uf, cep; complemento and ie optional). Partial fields fail listing missing attributes. indIEToma comes from ie (with IE 1, ISENTO 2, no ie 9) and cannot be passed separately. null or omitted = not provided.

cnpjstringRequired

Payer's CNPJ (14 positions, with or without punctuation; alphanumeric accepted), with check digits verified.

nomestringOptional

Legal corporate name. Only in the "all fields" form.

maxLength60
iestringOptional

State tax registration (2 to 14 digits; punctuation removed) or ISENTO. Omitted = non-ICMS taxpayer (indIEToma 9). Only in the "all fields" form.

maxLength14
logradourostringOptional
maxLength120
numerostringOptional

Use S/N when the address has no street number.

maxLength20
complementostringOptional
maxLength60
bairrostringOptional
maxLength60
codigo_municipiostringOptional

IBGE code, 7 digits; must belong to uf.

pattern"^\\d{7}$"
municipiostringOptional
maxLength60
ufstringOptional
minLength2
maxLength2
cepstringOptional

8 digits, with or without hyphen.

Original JSON Definition (Portuguese Descriptions)
{
  "type": [
    "object",
    "null"
  ],
  "required": [
    "cnpj"
  ],
  "description": "Quem paga o frete do contra-CT-e (`toma4`), no lugar do emitente do CT-e da contratante. Duas\nformas, e só elas: só o `cnpj` — o resto vem do cadastro da empresa com esse CNPJ exato — ou\ntodos os dados (`cnpj`, `nome`, `logradouro`, `numero`, `bairro`, `codigo_municipio`,\n`municipio`, `uf`, `cep`; `complemento` e `ie` opcionais). Mais que o `cnpj` e menos que todos\nos dados é recusado, com os campos que faltam. `indIEToma` sai da `ie` (com IE `1`, `ISENTO`\n`2`, sem `ie` `9`) e não é aceito informado à parte. `null` ou ausente = não informado.\n",
  "properties": {
    "cnpj": {
      "type": "string",
      "description": "CNPJ do tomador (14 posições, com ou sem pontuação; o alfanumérico é aceito), com os dígitos verificadores conferidos."
    },
    "nome": {
      "type": "string",
      "maxLength": 60,
      "description": "Razão social. Só na forma \"todos os dados\"."
    },
    "ie": {
      "type": "string",
      "maxLength": 14,
      "description": "Inscrição estadual (de 2 a 14 dígitos; a pontuação é removida) ou `ISENTO`. Ausente = não\ncontribuinte do ICMS (`indIEToma` `9`). Só na forma \"todos os dados\".\n"
    },
    "logradouro": {
      "type": "string",
      "maxLength": 120
    },
    "numero": {
      "type": "string",
      "maxLength": 20,
      "description": "Use `S/N` quando o endereço não tem número."
    },
    "complemento": {
      "type": "string",
      "maxLength": 60
    },
    "bairro": {
      "type": "string",
      "maxLength": 60
    },
    "codigo_municipio": {
      "type": "string",
      "pattern": "^\\d{7}$",
      "description": "Código IBGE, 7 dígitos; precisa pertencer à `uf`."
    },
    "municipio": {
      "type": "string",
      "maxLength": 60
    },
    "uf": {
      "type": "string",
      "minLength": 2,
      "maxLength": 2
    },
    "cep": {
      "type": "string",
      "description": "8 dígitos, com ou sem traço."
    }
  }
}