# GetDocumentTypes - Advanced Documentation ## Overview `GetDocumentTypes()` - Returns every document type lookup entry configured for the current company, flat (folder hierarchy is expressed via `DocumentFolderInfo` children, not via nested `DocumentTypeInfo` - see type shapes). Includes inactive/archived types if any exist; there is currently no `IsActive` flag filter server-side, so filter client-side if needed. ## Common Use Resolving a human type name (e.g. "Demo") to the `ID` required by `AddClaimDocuments`/`SaveClaimDocument`'s `Document.Type.ID`. Match `Name` case-insensitively; type names are unique per company but not globally. ```javascript const types = await SecureApi.GetDocumentTypes(); const demo = types.find(t => t.Name.toLowerCase() === "demo"); ``` ## Cross-References | Need | Use | |------|-----| | Add documents to a claim | `SecureApi.AddClaimDocuments(ParentID, Documents)` | | Add documents to a contact | `SecureApi.AddContactDocuments(ParentID, Documents)` | | Save a single claim document | `SecureApi.SaveClaimDocument(Document)` |