/case-lookup/recentRecent case-number lookups
Last 10 DISTINCT cases looked up by anyone on this account (account- wide, not per-user) - one row per case, not per fetch: searching (or Discovery-candidate "Fetch Live Data"-ing) the same case again updates fetchCount/lastFetchedAt on the same row rather than adding a new one.
Overview
Last 10 DISTINCT cases looked up by anyone on this account (account- wide, not per-user) - one row per case, not per fetch: searching (or Discovery-candidate "Fetch Live Data"-ing) the same case again updates fetchCount/lastFetchedAt on the same row rather than adding a new one. Shown inline on the Live Case Lookup page in place of a separate history page. caseIdentifier is the original request object (courtType + whichever identifier field that court type needed) - it's what makes a row clickable, resubmitting the exact same lookup rather than guessing one back together from query's display label. Requires case.read.
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Example request
Replace CASEPRIMUS_API_KEY with your key.
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl "$BASE/case-lookup/recent" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/case-lookup/recent", { 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/recent", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, ) data = res.json()
Responses
| Field | Description |
|---|---|
_idstring | |
querystring | |
caseIdentifierobject | |
courtTypeenum | DCSCHCCCNCLTNCLATGSTATDRTDRATCESTAT |
cnrstring | DC, SC, HC only. |
registrationNumberstring | Format depends on courtType - see the description above. |
filingNumberstring | NCLT/NCLAT/GSTAT only. |
diaryNumberstring | SC, DRT, DRAT, CESTAT only. |
establishmentCodestring | Bench/tribunal code - required for HC (when not using cnr) and every tribunal court type. |
caseTypestring | Required alongside registrationNumber for most court types. Valid values depend on courtType; list them with GET /case-lookup/case-types. |
resultCountinteger or null | |
fetchCountinteger | How many times this case has been fetched (Live Case Lookup or a Discovery candidate's Fetch Live Data - same underlying row either way). |
lastFetchedAtinteger | Epoch ms of the most recent fetch - what the UI actually sorts/displays by. |
createdinteger | Epoch ms of the FIRST fetch. |
[
{
"_id": "CPCSH0exampledemo0001",
"query": "DLCT010012342020",
"caseIdentifier": {
"courtType": "DC",
"cnr": "DLCT010012342020"
},
"resultCount": 1,
"fetchCount": 3,
"lastFetchedAt": 1757000000000,
"created": 1756000000000
}
]Error responses share one shape, listed on Rate limits & errors.