Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.judit.io/llms.txt

Use this file to discover all available pages before exploring further.

New CNPJ format (IN 2229/24)Judit already accepts the new alphanumeric CNPJ format in compliance with the Brazilian Federal Revenue Normative Instruction No. 2229/2024.
  • Zero effort: no changes are required in your integration.
  • Test environment: use the document A1B2C3D4/E5F6-68 to validate the flow and receive a mock lawsuit in response.
The Lawsuits Count Synchronous Query returns only the total of lawsuits in the Judit datalake matching the given criteria. No listing, no pagination — just the number. Perfect for dashboards, risk scoring and volume-driven decisions.
🤖 Endpoint: POST https://lawsuits.production.judit.io/lawsuits/count. The response is synchronous (HTTP 200 with { "total": <number> }) and supports the same filter object as the Hot Storage Query — tribunal, side, classes, subjects, claim amount, dates, etc.

When to use

Risk score and tiering

”≥ 5 labor lawsuits, defendant side, last 3 years = high risk.” In one call.

Portfolio dashboards

How many lawsuits does each portfolio client accumulate? Ping all of them in parallel in milliseconds.

Exposure limits

Decide credit limits or insurance policies based on lawsuit counts per class.

Pre-check before Hot Storage

Knowing the result is “0” before requesting a full list saves payload billing.
To just check whether there is a lawsuit (boolean), use POST /lawsuits with page_size: 1. For the full lawsuit list, use POST /lawsuits (Hot Storage).

Step 1: Create the query (POST)

POST https://lawsuits.production.judit.io/lawsuits/count

Payload examples

{
    "search": {
        "search_type": "cpf",
        "search_key": "999.999.999-99"
    }
}

Payload parameters

ParameterTypeRequiredDescription
search.search_typestringYescpf, cnpj, oab, name, lawsuit_cnj or rji.
search.search_keystringYesDocument or name to count.
search.response_typestringYesUse "lawsuits".
search.search_params.filterobjectNoFilters (same shape as Hot Storage).

Supported filters (search_params.filter)

FilterTypeBehavior
sideenumActive, Passive, Interested, Unknown.
party_namesstring[]Filter by party exact name.
party_documentsstring[]Filter by party CPF/CNPJ.
FilterTypeBehavior
distribution_date_gte / _ltedatetimeDistribution-date window.
last_step_date_gte / _ltedatetimeLast-step-date window.
FilterTypeBehavior
tribunals{ keys, not_equal }Includes (false) or excludes (true) the tribunals. List at Coverage.
classification_codes / classification_names{ keys, not_equal }Official CNJ class codes/names.
subject_codes / subject_names{ contains, not_contains }Official CNJ subject codes/names.
FilterTypeBehavior
amount_gtenumberMinimum claim amount.
amount_ltenumberMaximum claim amount.
Fields state and secrecy_level only appear in the response — they don’t work as input filters here. To filter by secrecy, read secrecy_level on the Hot Storage response.

Request example

curl -X POST 'https://lawsuits.production.judit.io/lawsuits/count' \
  --header 'api-key: '"$JUDIT_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "search": {
      "search_type": "cpf",
      "search_key": "999.999.999-99"
    }
  }'

Step 2: Read the response

Response
{
    "total": 12
}
FieldTypeDescription
totalnumberNumber of lawsuits matching the filters.
Without filters, total brings all datalake lawsuits linked to the queried document/name. Apply filters to tier by category (e.g. “labor on defendant side”, “civil with amount above $100k”).

Patterns and tips

For large portfolios, fire calls in parallel (10-50 simultaneous) — the route is synchronous and lightweight. Respect your plan limits.
Want more than the total number? Combine with POST /lawsuits/synthetic to receive buckets per tribunal, class, phase, side, etc. — also synchronous.
Define thresholds (>= 5 lawsuits = high tier) in your code and pass granular filters to the endpoint to refine. For example, count only labor lawsuits for a pre-employment check, or only civil with amount above $50k for credit.
Cache total by (document, hash of filters). Refresh every N hours per criticality. If you need fresh court data, use POST /requests.

Next steps