📄 Document Resource

Document and statement management with secure file handling

Document management system for files, statements, and compliance documents. Handle file uploads, downloads, metadata management, and automated statement generation.

8
Endpoints
File+Meta
Management
Statements
Generation
Secure
Storage

Usage Notes

When

  • Upload and manage files for entities
  • Generate investor statements and reports
  • Store compliance documents with metadata

Requirements

  • Valid Bearer token with document permissions

Notes

  • Documents link to BizEntity, Organisation, or Product
  • Supports file upload/download with secure storage
  • Statement generation with configurable parameters

Description

Document manages file storage, metadata, and statement generation for the 7G platform. Links documents to entities with visibility and access controls.

Available Endpoints

Document Operations

POST Create Document Register document with metadata and type classification
GET Get Documents Retrieve documents with entity associations and metadata
PUT Update Document Update document metadata and properties
DELETE Delete Document Remove document from system

File Operations

POST Upload File Upload files with automatic validation and secure storage
GET Download File Download file content from document storage
PUT Update File Replace file content for existing document

Statement Generation

POST Generate Statement Generate statements with date ranges and entity filtering

Core Data Transfer Objects

DocumentDTO POST, PUT, GET Document endpoints Document metadata structure (16 properties) including type classification, file metadata, entity associations (BizEntity, Organisation), security settings, portal visibility flags, and public access controls
public class DocumentDTO
{
    public int DocumentID { get; set; }
    public string? ExternalDocumentId { get; set; }
    public int DocumentTypeID { get; set; }
    public string? Name { get; set; }
    public string? Code { get; set; }
    public string? Description { get; set; }
    public string? Password { get; set; }
    public short? Ordinal { get; set; }
    public int? ProductID { get; set; }
    public string? ExternalProductId { get; set; }
    public int? BizEntityID { get; set; }
    public string? ExternalBizEntityId { get; set; }
    public int? OrganisationID { get; set; }
    public string? ExternalOrganisationId { get; set; }
    public bool ShowInDocumentsInPortal { get; set; }
    public bool IsPublic { get; set; }
}
StatementDTO Statement generation endpoint Statement generation parameters (19 properties) with statement type, entity filters (Product, Investment/SecurityCode, CorporateAction, BizEntity, Organisation, Account), date ranges, exclude filter, per-investment flag and code identification.
public class StatementDTO
{
    public int StatementTypeID { get; set; }
    public int? ProductID { get; set; } = 0;
    public string? ExternalProductId { get; set; }
    public int? InvestmentID { get; set; } = 0;
    public string? ExternalInvestmentId { get; set; }
    public string? SecurityCode { get; set; }
    public int? CorporateActionID { get; set; } = 0;
    public string? ExternalCorporateActionId { get; set; }
    public int? BizEntityID { get; set; } = 0;
    public string? ExternalBizEntityId { get; set; }
    public int? OrganisationID { get; set; } = 0;
    public string? ExternalOrganisationId { get; set; }
    public DateOnly? FromDate { get; set; }
    public DateOnly? ToDate { get; set; }
    public string? Code { get; set; }
    public int? AccountID { get; set; } = 0;
    public string? ExternalAccountId { get; set; }
    public StatementExcludeFilters ExcludeFilter { get; set; } = StatementExcludeFilters.None;
    public bool SeparateStatementPerInvestment { get; set; } = true; // defaults to true: one statement per investment held, combined into a single returned PDF. Setting it to false returns 400.
}
StatementExcludeFilters excludeFilter on POST /Document/Statement Enum sent as an integer: 0 None (default), 1 NoMovementsInPeriod (omit investments with no transactions in the period), 2 NoHoldingsInPeriod (omit investments not held at any point in the period)
public enum StatementExcludeFilters
{
    None = 0,                // default, no filtering
    NoMovementsInPeriod = 1, // omits investments with no transactions in the period
    NoHoldingsInPeriod = 2   // omits investments not held at any point in the period
}

Business Rules & Constraints

File Management & Validation

  • File type validation: Supported formats include PDF, DOC, DOCX, XLSX, PNG, JPG, JPEG with MIME type verification
  • Document metadata: Each document includes type classification, name, description, and optional password protection
  • Entity associations: Documents can be linked to BizEntity, Organisation, or Product records via ID references

Statement Generation

  • Date range parameters: Statement generation accepts optional FromDate and ToDate parameters for period filtering
  • Entity filtering: Supports BizEntity, Organisation, Investment, Product, CorporateAction and Account scoping via ID parameters. Investments can also be targeted by SecurityCode
  • One statement per investment: Transaction Statements produce one statement per investment held, combined into a single returned PDF. separateStatementPerInvestment defaults to true; setting it to false returns 400 because a combined statement across all investments is not yet supported
  • Exclude filters: excludeFilter (0 = None, 1 = NoMovementsInPeriod, 2 = NoHoldingsInPeriod) omits investments with no transactions, or not held at any point, within the FromDate/ToDate period
  • Statement types: StatementTypeID determines the generated report format and content structure
  • Code identification: Optional Code parameter for statement reference tracking and retrieval

Document Properties & Controls

  • Portal visibility: ShowInDocumentsInPortal flag controls whether document appears in investor portal views
  • Public access: IsPublic flag determines document accessibility without authentication requirements
  • Password protection: Optional Password field enables document-level access restrictions
  • Ordinal sequencing: Ordinal property supports custom document ordering within entity document lists

Integration & Cross-Resource Dependencies

  • BizEntity linkage: Documents can be associated with BizEntity records via BizEntityID or ExternalBizEntityId
  • Organisation linkage: Documents can be associated with Organisation records via OrganisationID or ExternalOrganisationId
  • Product linkage: Documents can be associated with Product records via ProductID or ExternalProductId
  • External system integration: ExternalDocumentId supports external document management system synchronization and idempotency

Document Management Workflows

Document resource integrates with the broader 7G ecosystem, providing secure file storage, statement generation, and document management across investor and organisational operations.

📊

Report Integration

Generated reports from Report resource can be stored as Document records with metadata linkage for retrieval and distribution.

🏢

BizEntity Document Association

Documents link to BizEntity records for investor-specific file management, supporting document storage with entity associations and portal visibility controls.

💰

Transaction & Distribution Documentation

Documents can be categorized and managed alongside transaction and distribution operations for organized record-keeping and investor communications.