Create a find request and enqueue processing
curl --request POST \
--url https://miner.production.judit.io/requests/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"kind": "sentence-execution",
"tribunals": [
1
],
"tags": [
"possible_precatory"
],
"responses_limit": 500
}
'import requests
url = "https://miner.production.judit.io/requests/create"
payload = {
"kind": "sentence-execution",
"tribunals": [1],
"tags": ["possible_precatory"],
"responses_limit": 500
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'sentence-execution',
tribunals: [1],
tags: ['possible_precatory'],
responses_limit: 500
})
};
fetch('https://miner.production.judit.io/requests/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://miner.production.judit.io/requests/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kind' => 'sentence-execution',
'tribunals' => [
1
],
'tags' => [
'possible_precatory'
],
'responses_limit' => 500
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://miner.production.judit.io/requests/create"
payload := strings.NewReader("{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://miner.production.judit.io/requests/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://miner.production.judit.io/requests/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}"
response = http.request(request)
puts response.read_body{
"request_id": 123,
"status": "pending",
"cost": 123
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}API Reference · Miner
Create a lawsuit find
Creates a real find request, debits credits and enqueues async processing. Returns request_id, status pending and cost.
POST
/
requests
/
create
Create a find request and enqueue processing
curl --request POST \
--url https://miner.production.judit.io/requests/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"kind": "sentence-execution",
"tribunals": [
1
],
"tags": [
"possible_precatory"
],
"responses_limit": 500
}
'import requests
url = "https://miner.production.judit.io/requests/create"
payload = {
"kind": "sentence-execution",
"tribunals": [1],
"tags": ["possible_precatory"],
"responses_limit": 500
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'sentence-execution',
tribunals: [1],
tags: ['possible_precatory'],
responses_limit: 500
})
};
fetch('https://miner.production.judit.io/requests/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://miner.production.judit.io/requests/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'kind' => 'sentence-execution',
'tribunals' => [
1
],
'tags' => [
'possible_precatory'
],
'responses_limit' => 500
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://miner.production.judit.io/requests/create"
payload := strings.NewReader("{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://miner.production.judit.io/requests/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://miner.production.judit.io/requests/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"sentence-execution\",\n \"tribunals\": [\n 1\n ],\n \"tags\": [\n \"possible_precatory\"\n ],\n \"responses_limit\": 500\n}"
response = http.request(request)
puts response.read_body{
"request_id": 123,
"status": "pending",
"cost": 123
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}Authorizations
Replace with the actual API key requirement for your Miner API deployment.
Body
application/json
Mirrors requestLawsuitsInputSchema in @judit-io/miner-shared (strict object).
Cross-field rules (enforced server-side):
- If both
amount_minandamount_maxare set,amount_min≤amount_max. - For
sentence-execution:budget_yearsandnaturesmust be absent. - For
judgement-bond:tagsmust be absent. amount_tiercannot be used together withamount_minoramount_max.
Available options:
judgement-bond, sentence-execution Minimum lawsuit amount filter (cannot be combined with amount_tier)
Maximum lawsuit amount filter (cannot be combined with amount_tier)
Available options:
0-100k, 100k-250k, 250k-500k, 500k-750k, 750k-1.5M, 1.5M+ Only when kind is judgement-bond
Only when kind is judgement-bond
Available options:
alimentary, common Only when kind is sentence-execution
Available options:
precatory_dispatched, possible_precatory, possible_approved_calculation Caps how many lawsuits are included in a find request (/requests/create only).
Required range:
x >= 1Was this page helpful?