Skip to main content
POST
/
requests
/
count
Count matching lawsuits and record a count request
curl --request POST \
  --url https://miner.production.judit.io/requests/count \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "kind": "judgement-bond",
  "tribunals": [
    1,
    2
  ],
  "budget_years": [
    2024
  ],
  "natures": [
    "common"
  ]
}
'
{
  "request_id": 123,
  "total_lawsuits": 1,
  "status": "pending",
  "filter": {
    "kind": "judgement-bond",
    "tribunals": [
      123
    ],
    "amount_min": 123,
    "amount_max": 123,
    "budget_years": [
      123
    ],
    "natures": [
      "alimentary"
    ],
    "tags": [
      "precatory_dispatched"
    ]
  }
}

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.

Authorizations

api-key
string
header
required

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_min and amount_max are set, amount_minamount_max.
  • For sentence-execution: budget_years and natures must be absent.
  • For judgement-bond: tags must be absent.
  • amount_tier cannot be used together with amount_min or amount_max.
kind
enum<string>
required
Available options:
judgement-bond,
sentence-execution
amount_min
number

Minimum lawsuit amount filter (cannot be combined with amount_tier)

amount_max
number

Maximum lawsuit amount filter (cannot be combined with amount_tier)

amount_tier
enum<string>
Available options:
0-100k,
100k-250k,
250k-500k,
500k-750k,
750k-1.5M,
1.5M+
tribunals
integer[]
budget_years
integer[]

Only when kind is judgement-bond

natures
enum<string>[]

Only when kind is judgement-bond

Available options:
alimentary,
common
tags
enum<string>[]

Only when kind is sentence-execution

Available options:
precatory_dispatched,
possible_precatory,
possible_approved_calculation
responses_limit
integer

Caps how many lawsuits are included in a find request (/requests/create only).

Required range: x >= 1

Response

Count stored; response includes totals and optional echo of filters.

request_id
integer<int64>
required
total_lawsuits
integer
required
Required range: x >= 0
status
enum<string>
required
Available options:
pending,
completed,
failed
filter
object

Subset of filters returned on GET request (when stored on the entity)