credit-score-cpf — judicial schema (per-process detail)

This is a companion page to the canonical credit-score-cpf — read that first for the merged shape, free-vs-paid scope, and the recommendation rubric. This page covers everything you need to know about the judicial slice: the raw upstream wire format, every per-process field, the severity bucketing your rental-screening handler uses, and what auxiliar’s pipeline actually guarantees on coverage and freshness.

Raw upstream — directd_processo_por_documento

Backed by Direct Data’s ProcessosJudiciaisCompleta endpoint. Returns one envelope of the form {metaDados, retorno: {documentoConsultado, processos[], totalProcessos, observacoes}}, where each item in processos[] is shaped as:

// Raw upstream — apiv3.directd.com.br/api/ProcessosJudiciaisCompleta?TOKEN=...&CPF=...
{
  "metaDados": { "resultadoId": 1, "mensagem": "Sucesso", "consultaUid": "direct-…", "tempoExecucaoMs": 1840 },
  "retorno": {
    "documentoConsultado": "87489953120",
    "totalProcessos": 1,
    "observacoes": null,
    "processos": [
      {
        "numeroProcesso": "0001234-56.2023.8.26.0100",
        "instancia": 1,
        "justicaGratuita": false,
        "segredoJustica": false,
        "processoDigital": true,
        "tutelaAntecipada": false,
        "prioritario": false,
        "orgaoJulgador": {
          "tribunal": "TJSP",
          "comarca": "São Paulo",
          "orgaoResponsavel": "5ª Vara Cível Central",
          "unidadeOrigem": "Foro Central Cível",
          "cidade": "São Paulo",
          "uf": "SP"
        },
        "ambitoJustica": "Justiça Estadual",
        "sistema": "PJe",
        "areaDireito": "Cível",
        "classificacao": {
          "codigoClassificacao": "7",
          "descricao": "Procedimento Comum Cível"
        },
        "assuntos": [
          { "codigoAssunto": "7691", "assunto": "Cobrança de Aluguéis - Sem Despejo", "assuntoPrincipal": true }
        ],
        "dataDistribuicao": "15/04/2023",
        "dataAutuacao": "15/04/2023",
        "partes": [
          { "nomeCompleto": "...", "documento": "...", "polo": "ATIVO",   "posicaoProcessual": "Autor",   "advogados": [/*  */] },
          { "nomeCompleto": "...", "documento": "...", "polo": "PASSIVO", "posicaoProcessual": "Réu",     "advogados": [/*  */] }
        ],
        "valorProcesso": "25000.00",
        "processosRelacionados": [],
        "detalhesStatusProcesso": {
          "statusDetalhes": "Em andamento",
          "dataArquivamento": null,
          "dataTransitoJulgado": null,
          "julgamentos": [],
          "penhoras": []
        }
      }
    ]
  }
}

The auxiliar gateway returns this verbatim under result. Your client merges into the screening shape as:

{
  "judicial": {
    "process_count": 1,                            // <- result.retorno.totalProcessos
    "processes": [
      {
        "numero": "0001234-56.2023.8.26.0100",     // <- processo.numeroProcesso
        "tribunal": "TJSP",                        // <- processo.orgaoJulgador.tribunal
        "ambito": "Justiça Estadual",              // <- processo.ambitoJustica
        "vara": "5ª Vara Cível Central",           // <- processo.orgaoJulgador.orgaoResponsavel
        "comarca_uf": "São Paulo/SP",              // <- comarca + uf joined
        "data_distribuicao": "2023-04-15",         // <- processo.dataDistribuicao (BR-format → ISO)
        "polo_ativo": ["..."],                     // <- partes[?polo=ATIVO].nomeCompleto[]  (PII — internal only)
        "polo_passivo": ["..."],                   // <- partes[?polo=PASSIVO].nomeCompleto[] (PII — internal only)
        "valor_causa": 25000.00,                   // <- processo.valorProcesso (string → float)
        "area_direito": "Cível",                   // <- processo.areaDireito
        "natureza": "Cobrança de Aluguéis - Sem Despejo",  // <- assuntos[?assuntoPrincipal=true].assunto
        "natureza_codigo": "7691",                 // <- assuntos[?assuntoPrincipal=true].codigoAssunto
        "segredo_justica": false,                  // <- processo.segredoJustica
        "status": "Em andamento",                  // <- detalhesStatusProcesso.statusDetalhes
        "transitado": false,                       // <- detalhesStatusProcesso.dataTransitoJulgado != null
        "arquivado": false                         // <- detalhesStatusProcesso.dataArquivamento != null
      }
    ],
    "tier_required": null
  }
}

Cache TTL is 7 days — process metadata rarely changes mid-week. Pair with a tribunal-specific webhook if you need <24h freshness for a fraud-detection pipeline.

Per-process field reference

Every field on each processos[] item, in upstream camelCase order. Use this when your handler needs to map a raw upstream payload to your snake_case merged shape.

Identity + procedural posture

Tribunal + organ

Subject + classification

Dates + status

Parties + lawyers

Financial

Severity bucketing (rental-screening default)

The upstream assunto (or classificacao.descricao) is a free-text Portuguese label drawn from CNJ’s “Tabelas Processuais Unificadas”. There is no built-in numeric severity score — auxiliar surfaces the raw labels and lets your decisioning policy classify. A reasonable default rental-screening bucketing:

Bucket Typical assunto strings Decisioning weight
severe Execução de Título Extrajudicial, Execução Fiscal, Despejo, Cobrança … com Despejo, Falência, Recuperação Judicial, Improbidade Administrativa, Crime contra o Patrimônio likely decline / require fiador
moderate Cobrança … sem Despejo, Inadimplência Contratual, Indenização por Dano Material, Ação Monitória, Busca e Apreensão extra deposit / manual review
light Indenização por Dano Moral (consumidor / vizinhança), Procedimento Comum without prejudicial assunto, Família — Alimentos, traffic / posse-irregular usually safe to ignore

This is your policy, not auxiliar’s policy — the gateway does not pre-classify. Build a small lookup table from assunto strings to your bucket and version-pin it; CNJ’s tabela updates infrequently. Use processo.transitado === true as a strong signal that the matter is closed (transitado em julgado).

The 4-way recommendation rubric on the canonical page folds these buckets into the score × judicial decision matrix.

Process normalization

What you can rely on:

Tribunal coverage

Direct Data’s ProcessosJudiciaisCompleta aggregates from the CNJ DataJud public dataset + per-tribunal direct integrations. Coverage is broad but not 100% of every Brazilian tribunal:

Coverage Tribunals
Reliable TJSP, TJRJ, TJMG, TJRS, TJPR, TJSC, TJBA, TJDFT, TJGO, TJES, TJPE, TJCE, TJPB, TJRN, TJSE, TJAL, TJMA, TJPI, TJMT, TJMS, TJTO, TJRO, TJAC, TJRR, TJAP, TJAM, TJPA — i.e. all 27 state TJs
Reliable TRT 1–24 (all 24 Regional Labour Courts) and TST consolidated rulings
Reliable TRF 1–6 (Federal Regional Courts)
Reliable STJ (Superior Court of Justice)
Partial STF (Supreme Federal Court) — public docket entries surface; sealed (segredo de justiça) processes do not
Partial TJM (military state courts), TRE / TSE (electoral) — surface inconsistently; treat as best-effort
Not covered Foreign courts, extrajudicial procedures, internal arbitral awards

If a tribunal is “Partial” or “Not covered” and the screening matters (e.g. a vendor with material STF activity), pair this call with a tribunal-direct lookup or surface the gap explicitly to the operator. Authoritative source for current Direct Data coverage: https://docs.directd.com.br/ProcessosJudiciaisCompleta (vendor-maintained — re-check before relying on a specific tribunal for compliance-grade screening).

Segredo de justiça

The processo.segredoJustica flag is surfaced when the case is in segredo de justiça but the underlying partes[] are then redacted upstream — you’ll get the case number and tribunal but not party names. Treat this as “exists, can’t read” rather than “doesn’t exist”:

For the merged shape, recommendation rubric, and LGPD posture, return to /data/credit-score-cpf/.

For the other upstream payload shapes (Direct Data Score, Obito, CadastroPessoaFisicaPlus, sancoes_empresa, rating_actions_brazil_recent), see /data/credit-score-cpf-upstream-shapes/.