/watchlist/casesAdd a case to the watchlist
Adds a case to the watchlist, either manually or by confirming a match from a case search (pass its result as snapshot).
Overview
Adds a case to the watchlist, either manually or by confirming a match from a case search (pass its result as snapshot). If the same case is already tracked, identified by its case identifier, the entity is linked to the existing record instead of creating a duplicate, and the response has linkedExisting true. On accounts where the CasePrimus team reviews new cases, a newly created case starts as PENDING_BACKOFFICE_REVIEW instead of ACTIVE until it is reviewed. Requires case.write.
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Request body
| Field | Description |
|---|---|
caseIdentifierobject Required | |
courtTypeenum Required | DCSCHCCCNCLTNCLATGSTATDRTDRATCESTAT |
cnrstring Optional | DC, SC, HC only. |
registrationNumberstring Optional | Format depends on courtType - see the description above. |
filingNumberstring Optional | NCLT/NCLAT/GSTAT only. |
diaryNumberstring Optional | SC, DRT, DRAT, CESTAT only. |
establishmentCodestring Optional | Bench/tribunal code - required for HC (when not using cnr) and every tribunal court type. |
caseTypestring Optional | Required alongside registrationNumber for most court types. Valid values depend on courtType; list them with GET /case-lookup/case-types. |
watchlistEntityIdstring or null Optional | |
snapshotobject (free-form) or null Optional | One matched record from POST .../discover, or the whole result of POST /case-lookup - carried into the new case for context (court, parties, risk level, ...). Omit for a fully manual add. |
sharedWitharray of object Optional | |
typeenum Required | teamuser |
idstring Required | A team ID when type is 'team', a user ID otherwise. |
{
"caseIdentifier": {
"courtType": "DC",
"cnr": "DLCT010012342020"
},
"watchlistEntityId": "CPWLE0exampledemo0001"
}Example request
Replace CASEPRIMUS_API_KEY with your key.
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl -X POST "$BASE/watchlist/cases" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "caseIdentifier": { "courtType": "DC", "cnr": "DLCT010012342020" }, "watchlistEntityId": "CPWLE0exampledemo0001" }'
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/watchlist/cases", { method: "POST", headers: { "Content-Type": "application/json", "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, body: JSON.stringify({ "caseIdentifier": { "courtType": "DC", "cnr": "DLCT010012342020" }, "watchlistEntityId": "CPWLE0exampledemo0001" }), }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "POST", BASE + "/watchlist/cases", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, json={ "caseIdentifier": { "courtType": "DC", "cnr": "DLCT010012342020", }, "watchlistEntityId": "CPWLE0exampledemo0001", }, ) data = res.json()
Responses
| Field | Description |
|---|---|
_idstring | |
statusenum | ACTIVEPENDING_BACKOFFICE_REVIEW |
linkedExistingboolean | true if this case was already tracked and this call just linked watchlistEntityId to it. |
{
"_id": "CPWLC0exampledemo0001",
"status": "ACTIVE",
"linkedExisting": false
}{
"httpStatusCode": 400,
"code": 60400,
"message": "Watchlist entity does not exist",
"appError": true
}Error responses share one shape, listed on Rate limits & errors.