CasePrimus.aiby Attestr
Documentation menu
POST/case-lookup/summarize

Generate an AI case summary and risk level, on demand

CasePrimus's AI summarization - resolves every order's document itself and produces a case summary, risk justification, and risk level, for a case that's only been looked up via POST /case-lookup, not added to the watchlist.

Overview

CasePrimus's AI summarization - resolves every order's document itself and produces a case summary, risk justification, and risk level, for a case that's only been looked up via POST /case-lookup, not added to the watchlist. Takes the searchId from that lookup (or GET /case-lookup/{searchId}) - reads the already-fetched case details straight off that record rather than re-fetching live. Returns immediately with an _id - poll GET /case-lookup/summarize/{id} for the result. Every call starts a new summary (use this again to regenerate) - the most recently generated one for a case is also returned as latestSummary on POST /case-lookup and GET /case-lookup/{searchId} themselves, so a customer doesn't need to keep track of summary ids across requests. Requires case.write.

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
searchId
string
Required

The _id returned by POST /case-lookup or GET /case-lookup/{searchId}.

Body: Success
{
  "searchId": "CPCSH0exampledemo0001"
}

Example request

Replace CASEPRIMUS_API_KEY with your key.

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

curl -X POST "$BASE/case-lookup/summarize" \
  -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "searchId": "CPCSH0exampledemo0001"
  }'

Responses

200Summarization job queued (or completed immediately for a case with no orders to read).
FieldDescription
_id
string
status
enum
PENDINGCOMPLETEFAILED
Response 200
{
  "_id": "CPCSS0exampledemo0001",
  "status": "PENDING"
}
400Malformed input, or the underlying case lookup failed.
403Caller lacks the case.write permission.

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