CasePrimus.aiby Attestr
Documentation menu
GET/case-lookup/{searchId}

Read back a previously looked-up case

Reads back a case you looked up earlier, exactly as it was stored.

Overview

Reads back a case you looked up earlier, exactly as it was stored. No new lookup is made. Any order you already downloaded comes back with a freshly signed, short-lived download url (valid for 300 seconds) and downloadedAt; an order that was never downloaded has attachment null, as in a fresh lookup. To get current live data instead, call POST /case-lookup again with the same caseIdentifier (a refresh): that updates this record (lastFetchedAt and fetchCount) rather than creating a new one. Requires case.read.

Auth API keyPermission case.read
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.

Parameters

NameInDescription
searchId
string
Required
pathThe id returned when the resource was created.

Example request

Replace CASEPRIMUS_API_KEY with your key.

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

curl "$BASE/case-lookup/SEARCH_ID" \
  -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"

Responses

200The stored case details, as last fetched.
Response 200
{
  "searchId": "CPCSH0exampledemo0001",
  "lastFetchedAt": 1757000000000,
  "fetchCount": 2,
  "latestSummary": {
    "_id": "CPCSS0exampledemo0001",
    "status": "COMPLETE",
    "riskLevel": "MODERATE",
    "caseSummary": "A commercial dispute currently at the arguments stage.",
    "riskJustification": "Multiple interim orders indicate active contestation, but no adverse final order yet.",
    "orderSummaries": [],
    "error": null,
    "generatedAt": 1757000000000
  },
  "cnr": "DLCT010012342020",
  "courtType": "DC",
  "orders": [
    {
      "orderId": "a1b2c3d4e5f6",
      "number": "3",
      "orderDate": "16-05-2017",
      "attachment": "https://files.example.com/dlct010012342020-9f8e7d6c5b4a.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=300&X-Amz-Signature=...",
      "downloadedAt": 1757000000000
    },
    {
      "orderId": "b2c3d4e5f6a1",
      "number": "4",
      "orderDate": "20-05-2017",
      "attachment": null,
      "downloadedAt": null
    }
  ]
}
400This search record does not exist.
Response 400
{
  "httpStatusCode": 400,
  "code": 60436,
  "message": "This search record does not exist",
  "appError": true
}
403Caller lacks the case.read permission.

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