CasePrimus.aiby Attestr
Documentation menu
POST/case-lookup

Look up a case by its identifier

Direct case-number/CNR lookup - one-time, on-demand, not tied to any watchlist entity.

Overview

Direct case-number/CNR lookup - one-time, on-demand, not tied to any watchlist entity. The required identifier fields depend on courtType, see CaseIdentifier. Every order on the case is tagged with an orderId (stable for this search) - use it with POST /case-lookup/orders/download to get that order's document. attachment is always null on this response - the raw court-site reference is never exposed directly, only orderId is. The full result (including this searchId) is stored so the order downloads can look orders up later without re-running the lookup - see CasePrimusCaseSearchHistory. latestSummary is the most recently generated AI summary for this case (see POST /case-lookup/summarize), or null if none has ever been generated - a fresh lookup/refresh doesn't clear a previously generated summary. Requires case.write (no resource to scope a team override against, same as /watchlist/cases).

Auth API keyPermission case.writeContent-Type application/json
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.

Request body

FieldDescription
caseIdentifier
object
Required
courtType
enum
Required
DCSCHCCCNCLTNCLATGSTATDRTDRATCESTAT
cnr
string
Optional

DC, SC, HC only.

registrationNumber
string
Optional

Format depends on courtType - see the description above.

filingNumber
string
Optional

NCLT/NCLAT/GSTAT only.

diaryNumber
string
Optional

SC, DRT, DRAT, CESTAT only.

establishmentCode
string
Optional

Bench/tribunal code - required for HC (when not using cnr) and every tribunal court type.

caseType
string
Optional

Required alongside registrationNumber for most court types. Valid values depend on courtType; list them with GET /case-lookup/case-types.

Body: Success
{
  "caseIdentifier": {
    "courtType": "DC",
    "cnr": "DLCT010012342020"
  }
}

Example request

Replace CASEPRIMUS_API_KEY with your key.

Request
BASE="https://api.caseprimus.ai/api/caseprimus/v1"

curl -X POST "$BASE/case-lookup" \
  -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "caseIdentifier": {
      "courtType": "DC",
      "cnr": "DLCT010012342020"
    }
  }'

Responses

200Case details found.
Response 200
{
  "searchId": "CPCSH0exampledemo0001",
  "latestSummary": null,
  "cnr": "DLCT010012342020",
  "courtType": "DC",
  "parties": {
    "petitioner": "Acme Traders Pvt Ltd",
    "respondent": "Jane Doe"
  },
  "court": "District Court, Delhi",
  "stage": "Arguments",
  "filingDate": "10-01-2020",
  "orders": [
    {
      "orderId": "a1b2c3d4e5f6",
      "number": "3",
      "orderDate": "16-05-2017",
      "judge": "Hon'ble Judge Example",
      "orderType": null,
      "attachment": null
    }
  ]
}
400Malformed caseIdentifier for the given courtType.
403Caller lacks the case.write permission.
500The underlying case lookup failed.
Response 500
{
  "httpStatusCode": 500,
  "code": 60406,
  "message": "Could not look up this case right now, please try again shortly",
  "appError": true
}

Error responses share one shape, listed on Rate limits & errors.