# GetClaim - Advanced Documentation ## When to Use **Direct lookup when you already have a ClaimID.** This is the heaviest claim endpoint - it returns everything. If you don't need notes, prefer `GetClaimWithoutNotes` (same data minus notes). If you don't have a ClaimID, use `SearchClaimsExtended` or `SearchClaimsBySystemFieldString` to find one first. ## What's Included Returns a complete `ClaimInfo` with ALL associated data: - `Staff` - all staff assignments (including departed firm members) - `Notes` - all claim notes (can be very large - hundreds of entries) - `ClaimContacts` - claim contacts, each already carrying its own ad hoc fields (see below) - `LedgerEntries` - financial records (rates may be redacted - see below) - `Tasks` - all tasks with status - `Documents` - document list with metadata - `AdHocFields` - claim-level custom fields (filtered by user role permissions) - `Disbursals` - settlement disbursals - `Invoices` - billing invoices - `ClaimGroup` - group/synopsis - `Claimant` - claimant info (Lead info reduced to ID only) - `Requests` - records requests ## ClaimContacts Are Identity Only `ClaimContacts` IS returned by this endpoint, and each entry already carries its own `AdHocFields`. A separate call is not required to get claim contacts with their ad hoc fields. What each entry does NOT carry is full contact detail. The `Contact` property on each entry is a `BaboContactInfoStrict`, which has only `ID`, `Name`, `IsPerson` and `Picture`. It has no date of birth, address, phone or email. Asking this endpoint for a claim contact's birthday will not answer the question - use `GetContactByID(ContactID)` for the full contact record. The `Claimant` property is different: it is a full `BaboContactInfo` and does include date of birth. ## Billing Rate Redaction Users without the **ViewBillingRates** permission see redacted financial data on time-based ledger entries: - `HourlyRate` set to 0 - `Total` set to 0 - `Reduction` preserved as-is This is enforced server-side. The AI agent should be aware that zeroed-out rates may indicate permission filtering, not actual zero values. ## Staff: All Associated vs Active Only This endpoint returns ALL staff ever associated with the claim, including those who have left the firm. `GetClaimStaff(ClaimID)` only returns currently active firm members. For comprehensive case review, use this endpoint. For current team composition, use `GetClaimStaff`. ## Script Example ```javascript async () => { const claim = await SecureApi.GetClaim(771360); if (!claim) return { error: "Claim not found or access denied" }; return { id: claim.ID, name: claim.Name, status: claim.Status, type: claim.ClaimType?.Name, incidentDate: claim.IncidentDate, staff: claim.Staff?.map(s => ({ name: s.Staff?.Name, role: s.StaffRole?.Name })), noteCount: claim.Notes?.length ?? 0, documentCount: claim.Documents?.length ?? 0, taskCount: claim.Tasks?.length ?? 0, ledgerTotal: claim.LedgerEntries?.length ?? 0 }; } ``` ## Cross-References | Need | Use Instead | |------|-------------| | Claim without notes (faster) | `GetClaimWithoutNotes(ClaimID)` | | Contacts only, smaller payload | `GetClaimContacts(ClaimID)` | | Full contact detail (date of birth, address, phone) | `GetContactByID(ContactID)` | | Only active staff | `GetClaimStaff(ClaimID)` | | Only notes | `GetClaimNotes(ClaimID)` | | Only ledger entries | `GetClaimLedgerEntries(ClaimID)` | | Only documents | `GetClaimDocuments(ClaimID)` | | Find claim by name/text | `SearchClaimsExtended(Filter)` or `SearchClaimsBySystemFieldString(Field, Filter)` | | Bulk/aggregate queries | `GetFirmAdvancedSearchesClaim` then `GetAdvancedSearchResults` |