GET
/case-lookup/case-typesList case types and benches for a court type
Returns the options for the lookup form's court-specific fields.
Overview
Returns the options for the lookup form's court-specific fields. The identifier you need to provide (establishmentCode, caseType, and so on) varies by courtType. District Courts return an empty array: no bench or case type is needed, the CNR alone is enough. Requires case.read.
Auth API keyPermission case.read
Send your API key in the
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Parameters
| Name | In | Description |
|---|---|---|
courtTypestring Required | query | DCHCSCCCNCLTNCLATGSTATDRTDRATCESTAT |
Example request
Replace CASEPRIMUS_API_KEY with your key.
Request
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl "$BASE/case-lookup/case-types?courtType=DC" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/case-lookup/case-types?courtType=DC", { method: "GET", headers: { "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "GET", BASE + "/case-lookup/case-types?courtType=DC", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, ) data = res.json()
Responses
200Valid options for this court type.
| Field | Description |
|---|---|
statestring or null | |
courtstring or null | |
benchstring or null | |
establishmentCodestring or null | |
caseTypesarray of object | |
namestring | |
codestring |
Response 200
[
{
"state": "Delhi",
"court": "High Court of Delhi",
"bench": "Principal Bench",
"establishmentCode": "DLHC01",
"caseTypes": [
{
"name": "Civil Writ Petition",
"code": "CWP"
}
]
}
]403Caller lacks the case.read permission.
Error responses share one shape, listed on Rate limits & errors.