CasePrimus.aiby Attestr
Documentation menu
POST/watchlist/cases/search

Search 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).

Auth API keyPermission case.readContent-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
$filter
object (free-form)
Optional

Exact-match field filters, e.g. {"status": "ACTIVE"}.

$like
object (free-form)
Optional

Case-insensitive substring filters, e.g. {"name": "trip"}.

$skip
integer
Optional

minimum 0

$sort
object (free-form)
Optional

Field to +1/-1 (ascending/descending), e.g. {"created": -1}.

$limit
integer
Optional

0 to 100

Body: Success
{
  "$filter": {
    "watchlistEntityIds": "CPWLE0exampledemo0001"
  },
  "$skip": 0,
  "$limit": 10
}

Example request

Replace CASEPRIMUS_API_KEY with your key.

Request
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
  }'

Responses

200Matching cases.
FieldDescription
recordsFiltered
integer
records
array of object
_id
string
number
integer
accountId
string
watchlistEntityIds
array of string

Every watchlist entity this case is linked to - the same real-world case can be tracked against more than one company.

caseIdentifier
object
snapshot
object (free-form) or null
riskLevel
enum
VERY_HIGHHIGHMODERATELOWUNCLASSIFIED
status
enum
ACTIVEPENDING_BACKOFFICE_REVIEWREJECTEDARCHIVED
reviewedAt
integer (int64) or null
sharedWith
array of object
created
integer (int64)
createdBy
string or null
updated
integer (int64) or null
updatedBy
string or null
Response 200
{
  "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
    }
  ]
}
403Caller lacks the case.read permission.

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