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.
Cached response (
cached_response)When you create a lawsuit or historical query, Judit first checks whether the data already exists in our database. If it does, we return the result immediately — both in the API response and via webhook (if registered) — with the field cached_response: true.In parallel, Judit triggers a fresh fetch against the courts. If anything has changed, you receive a second response with cached_response: false. That is the most up-to-date result.This is why it is normal to receive two seemingly identical webhooks for the same request_id:- The first one comes from cache (
cached_response: true) - The last one is the updated result (
cached_response: false)
🤖 The lawsuit search route operates asynchronously. The client application must make aPOST /requeststo start the search, wait for processing (via Webhook or by pollingGET /requests/{id}), and, when the status iscompleted, capture the data viaGET /responses.
When to use
Forced refresh
The lawsuit must reflect the latest court state — the datalake cache isn’t enough.
Full cover + steps
You need every cover field, all steps, attachments and relationships.
AI summary
Trigger
judit_ia: ["summary"] to get a human-friendly summary ready for your UI.Lawsuits under secrecy
Combine with the Credentials Vault to reach lawsuits that require court login.
If speed beats freshness (e.g. on-screen validation, interactive dashboard), use the Hot Storage Synchronous Query — millisecond response from Judit’s datalake.
Asynchronous flow (overview)
Understanding the Asynchronous Flow
Since data extraction directly from the courts can take a few seconds or minutes (depending on court instability), the Judit API uses an asynchronous request pattern. The flow consists of 3 simple steps:- Create the request: You send the lawsuit number.
- Track the status: You check if the bot has finished the extraction.
- Capture the result: You consume the JSON with the lawsuit data.
Step 1: Creating the Search Request
To initiate a lawsuit search, make aPOST request to the base requests route, sending the desired parameters in the body of the call.
Payload Parameters (Body)
Refer to the table below to configure your search, enable attachments, or trigger Judit AI:| Parameter | Type | Required | Description |
|---|---|---|---|
search.search_type | string | Yes | Defines the entity being searched. For lawsuits, always use "lawsuit_cnj". |
search.search_key | string | Yes | The lawsuit number in the CNJ standard (e.g., "0009999-99.9999.8.26.9999"). |
cache_ttl_in_days | integer | No | Optimizes the search by returning cached data if the lawsuit has already been queried within the last X days. |
with_attachments | boolean | No | If true, Judit will download the lawsuit files. |
judit_ia | array | No | List of AI features applied to the result. Send ["summary"] to receive a humanized summary of the header and case updates. |
search_params.lawsuit_instance | integer | No | Forces the search at a specific instance (e.g., 1 or 2). |
Request Example (POST)
request_id, as you will need it for the next steps.
🚀 Shortcut: Automate with Webhooks (Recommended)If you have a Webhook URL configured, Steps 2 and 3 below are entirely optional.
Instead of programming your application to keep polling the request status, the Judit API will send the found lawsuits incrementally directly to your server as soon as they are captured, finishing the flow with a
request_completed event.👉 Learn how to configure and receive Webhooks hereStep 2: Check the Request Status
To find out whether the extraction has finished, query the request history endpoint passing the ID generated in Step 1:status property changes to "completed".
Step 3: Capture the Result (The Lawsuit)
As soon as the status iscompleted, you can retrieve the complete lawsuit data (and the AI summary, if requested).
Request example (GET)
Response examples
See response examples (3 variants)
See response examples (3 variants)
What you receive back
The return is paginated and contains the Lawsuit Object inside thepage_data array. If you requested Judit AI (use_judit_ia: true), the judit_ia object brings a human-readable summary of the lawsuit + structured listing of parties, classes, subjects and movements.
| Field | Type | Description |
|---|---|---|
request_status | string | Final request status (completed, created, processing). |
page / page_count / all_pages_count / all_count | number | Pagination. |
page_data | array | List of responses — usually 1 per request. |
page_data[].response_type | string | lawsuit, lawsuits, application_error, etc. |
page_data[].response_data | object | Main content — follows the Lawsuit Schema. |
page_data[].cached_response | boolean | true if it came from datalake; false if it came fresh from court. |
Next steps
- 👉 Webhook & Callbacks — receive automatic notifications when the search ends.
- 👉 Hot Storage (sync) — for an immediate response (cached).
- 👉 Has Lawsuits? (true/false) — lightweight boolean gate.
- 👉 Lawsuits Count — only the total.
- 👉 Error Codes — troubleshooting.