# GetClaim - Advanced Documentation ## When to Use **Direct lookup when you already have a ClaimID.** If you don't have a ClaimID, use `SearchClaimsExtended` or `SearchClaimsBySystemFieldString` to find one first. ## What's Included Returns a `ClaimInfo` with the claim itself: - `Staff` - all staff assignments (including departed firm members) - `AdHocFields` - claim-level custom fields (filtered by user role permissions) - `ClaimGroup` - group/synopsis - `Claimant` - claimant info (Lead info reduced to ID only) ## What's NOT Included The claim no longer carries its child collections. Each has its own endpoint: | Removed from the claim | Get it with | |------------------------|-------------| | Contacts and their ad hoc fields | `GetClaimContacts(ClaimID)` | | Notes | `GetClaimNotes(ClaimID)` | | Tasks | `GetClaimTasks(ClaimID)` | | Ledger entries (billing rates redacted for users without ViewBillingRates) | `GetClaimLedgerEntries(ClaimID)` | | Requests | `GetClaimRequests(ClaimID)` | | Disbursals | `GetClaimDisbursals(ClaimID)` | | Invoices | `GetClaimInvoices(ClaimID)` | | Lists | `GetClaimLists(ClaimID)` | Contacts are changed with `SaveClaimContact` and `DeleteClaimContact`; saving the claim never adds, updates or deletes them. The `Claimant` property is a full `BaboContactInfo` and does include date of birth. ## 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" }; const notes = await SecureApi.GetClaimNotes(771360); const tasks = await SecureApi.GetClaimTasks(771360); 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: notes.length, taskCount: tasks.length }; } ``` ## Cross-References | Need | Use Instead | |------|-------------| | Contacts only | `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 requests | `GetClaimRequests(ClaimID)` | | Only disbursals | `GetClaimDisbursals(ClaimID)` | | Only invoices | `GetClaimInvoices(ClaimID)` | | Only lists | `GetClaimLists(ClaimID)` | | Find claim by name/text | `SearchClaimsExtended(Filter)` or `SearchClaimsBySystemFieldString(Field, Filter)` | | Bulk/aggregate queries | `GetFirmAdvancedSearchesClaim` then `GetAdvancedSearchResults` |