/watchlist/cases/searchSearch watchlist cases
Requires case.read. Only cases visible to the caller (own + shared) are returned; archived cases are excluded. Also how the "Monitored" tab of a company's case list is populated (filter by watchlistEntityIds).
Overview
Requires case.read. Only cases visible to the caller (own + shared) are returned; archived cases are excluded. Also how the "Monitored" tab of a company's case list is populated (filter by watchlistEntityIds).
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 |
|---|---|
$filterobject (free-form) Optional | Exact-match field filters, e.g. {"status": "ACTIVE"}. |
$likeobject (free-form) Optional | Case-insensitive substring filters, e.g. {"name": "trip"}. |
$skipinteger Optional | minimum 0 |
$sortobject (free-form) Optional | Field to +1/-1 (ascending/descending), e.g. {"created": -1}. |
$limitinteger Optional | 0 to 100 |
{
"$filter": {
"watchlistEntityIds": "CPWLE0exampledemo0001"
},
"$skip": 0,
"$limit": 10
}Example request
Replace CASEPRIMUS_API_KEY with your key.
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl -X POST "$BASE/watchlist/cases/search" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "$filter": { "watchlistEntityIds": "CPWLE0exampledemo0001" }, "$skip": 0, "$limit": 10 }'
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/watchlist/cases/search", { method: "POST", headers: { "Content-Type": "application/json", "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, body: JSON.stringify({ "$filter": { "watchlistEntityIds": "CPWLE0exampledemo0001" }, "$skip": 0, "$limit": 10 }), }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "POST", BASE + "/watchlist/cases/search", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, json={ "$filter": { "watchlistEntityIds": "CPWLE0exampledemo0001", }, "$skip": 0, "$limit": 10, }, ) data = res.json()
Responses
| Field | Description |
|---|---|
recordsFilteredinteger | |
recordsarray of object | |
_idstring | |
numberinteger | |
accountIdstring | |
watchlistEntityIdsarray of string | Every watchlist entity this case is linked to - the same real-world case can be tracked against more than one company. |
caseIdentifierobject | |
snapshotobject (free-form) or null | |
riskLevelenum | VERY_HIGHHIGHMODERATELOWUNCLASSIFIED |
statusenum | ACTIVEPENDING_BACKOFFICE_REVIEWREJECTEDARCHIVED |
reviewedAtinteger (int64) or null | |
sharedWitharray of object | |
createdinteger (int64) | |
createdBystring or null | |
updatedinteger (int64) or null | |
updatedBystring or null |
{
"recordsFiltered": 1,
"records": [
{
"_id": "CPWLC0exampledemo0001",
"number": 200001,
"accountId": "CPA0exampledemo0001",
"watchlistEntityIds": [
"CPWLE0exampledemo0001"
],
"caseIdentifier": {
"courtType": "DC",
"cnr": "DLCT010012342020"
},
"snapshot": {
"parties": {
"petitioner": "Acme Traders Pvt Ltd",
"respondent": "Jane Doe"
},
"court": "District Court, Delhi",
"stage": "Arguments"
},
"riskLevel": "MODERATE",
"status": "ACTIVE",
"reviewedAt": null,
"sharedWith": [],
"created": 1757000000000,
"createdBy": "CPU0exampledemo0001",
"updated": null,
"updatedBy": null
}
]
}{
"recordsFiltered": 0,
"records": []
}Error responses share one shape, listed on Rate limits & errors.