Get Case
Retrieves complete information about a case by its ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | Unique identifier of the case |
Response
Returns the case with:
id: Unique case identifiername: Case nameplaintiffName: Plaintiff name (injured party)defendantName: Defendant name (at-fault party)attorneyName: Attorney nameside: Which party the attorney represents (plaintiffordefense)organizationId: Organization ID (if associated)status: Current case statuscreatorId: ID of the creator (API key or user)created: Creation timestampupdated: Last modification timestamp
Examples
- Go
- TypeScript
import (
"context"
"github.com/silentwitness/go-sdk"
)
response, err := silentwitness.Cases.Get(ctx, "case_abc123def456")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Case: %s\n", response.Case.Name)
fmt.Printf("Plaintiff: %s\n", response.Case.PlaintiffName)
fmt.Printf("Defendant: %s\n", response.Case.DefendantName)
fmt.Printf("Attorney: %s\n", response.Case.AttorneyName)
fmt.Printf("Side: %s\n", response.Case.Side)
fmt.Printf("Status: %s\n", response.Case.Status)
import { getCase } from "@silentwitness/typescript-sdk";
const response = await getCase("case_abc123def456");
console.log(`Case: ${response.case.name}`);
console.log(`Plaintiff: ${response.case.plaintiffName}`);
console.log(`Defendant: ${response.case.defendantName}`);
console.log(`Attorney: ${response.case.attorneyName}`);
console.log(`Side: ${response.case.side}`);
console.log(`Status: ${response.case.status}`);
Errors
| Code | Description |
|---|---|
NOT_FOUND | Case does not exist or not accessible |
PERMISSION_DENIED | Case belongs to a different account |
UNAUTHENTICATED | Invalid or missing API key |