🤖 Prerequisites: a Judit API key (headerapi-key: <YOUR_KEY>), HTTP connectivity to*.production.judit.io. NoAuthorization: Bearer.
Basic Flow
The Judit API operates with both a synchronous and an asynchronous pattern:Asynchronous requests:
-
Create request (
POST /requests) - Starts the query -
Wait for processing (
GET /requests) - The API fetches data from the courts (track status) -
Fetch result (
GET /responses) - Retrieves the processed data
Synchronous requests:
- Create request (
POST /lawsuits) - Starts the query and returns the response immediately
Prerequisites
- Valid API Key (request access from us)
- A tool to make HTTP requests (cURL, Postman, or code)
Environments and Base URLs
The Judit API is built on an architecture split by context to ensure better performance and organization. Before configuring your environment variables, identify the Base URL that corresponds to the module you want to integrate:Complete Example
1. Configure Environment Variables
Note: In the example below, we use the URL for Asynchronous Queries, but remember to replace it with the URL appropriate to your use case, according to the table above.2. Create a Request
3. Check the Request Status
The request
status follows the cycle pending → started → completed. If it is cancelled, it goes through cancelling → cancelled. Keep polling while the status is pending or started, or use the Webhook to be notified.4. Fetch the Results
When the status iscompleted, fetch the results:
Available Query Types
Possible response types by query type
Capa Processual: Informações de capa do processoparties: Party information onlyattachments: List of available attachmentsstep: Case updates
Advanced Filters
For more specific queries by document, you can use filters:Best Practices
1. Use Smart Caching
💡 Best Practice for Asynchronous Queries: If you are making asynchronous requests (via https://requests.production.judit.io), using the cache parameter is strongly recommended. It drastically speeds up webhook response time and optimizes API consumption.
Set the cache_ttl_in_days parameter in your request body to avoid redundant lookups at the courts. This field defines for exactly how many days a result already stored in Judit’s base will be considered valid before forcing a new extraction.
2. Implement Retry with Backoff
Next Steps
- Lawsuit search by CNJ: all parameters, response examples and how attachments work.
- Search by document: CPF, CNPJ, OAB and name, with filters.
- Webhook: receive the result automatically instead of polling the status.
- Errors: HTTP codes,
application_errorand how to handle each one. - Rate limits: per-endpoint limits and retry with backoff.