PUT
/Document/File
When to Use
Document File Replacement & Version Management - Use this endpoint to replace existing document files with updated versions while maintaining audit trails and compliance requirements. Essential for:
- Statement Corrections and Reissues: Replace member statements with corrected information due to calculation errors, missing transactions, or regulatory requirement changes while maintaining complete audit trails
- Compliance Document Updates: Update KYC/AML documentation with renewed identification, updated beneficial ownership declarations, or revised regulatory forms while preserving access history
- Entity Document Maintenance: Replace trust deeds, corporate constitutions, or investment mandates with updated versions reflecting structural changes, regulatory amendments, or legal modifications
- Draft to Final Document Progression: Convert temporary or draft documents to final versions, replacing preliminary content with legally binding, approved documentation for member records
- Regulatory Compliance Updates: Replace documents to meet changing ASIC, ATO, or AUSTRAC requirements including updated disclosure statements, compliance certificates, or regulatory notifications
- Error Correction and Quality Assurance: Replace documents containing errors, corrupted content, or formatting issues with corrected versions while maintaining complete change documentation
Prerequisites
- Document Modification Permissions: Valid Bearer token with 'ModifyDocuments' permission and specific authorization to update the document type, associated entities, and security classification
- Existing File Content Requirement: Target document must have existing file content to replace - use POST /Document/File for initial uploads to documents without existing files
- Version Control Authorization: User must have appropriate role-based permissions to modify documents with the specified security classification and entity associations
- Replacement File Validation: New file must meet organizational standards including approved formats, size limits, content validation, and security scanning requirements
- Audit Trail Requirements: System must have adequate logging capacity to record complete replacement history including user identity, timestamps, file characteristics, and business justification
- Retention Policy Compliance: Replacement must comply with document retention policies - some documents under legal hold or regulatory review may have restricted modification capabilities
Considerations
- Permanent Content Replacement: PUT operation completely replaces existing file content with no version history - previous file version is permanently removed and cannot be recovered through the API
- Australian Privacy Act Impact: File replacement may affect personal information handling requirements - ensure new content maintains Privacy Act 1988 compliance and appropriate data classification
- Regulatory Notification Requirements: Replacing certain compliance documents may require notification to ASIC, ATO, or AUSTRAC - verify regulatory obligations before document replacement
- Member Communication Impact: Replacing member statements or communications may require disclosure to affected members per consumer protection laws and organizational policies
- Audit Trail and Change Documentation: System creates comprehensive audit records including replacement reason, user authorization, file comparison, and business impact - essential for compliance verification
- Security Scanning and Validation: Replacement files undergo complete security scanning including virus detection, malware analysis, and content validation - failed scans reject the replacement operation
Description
Replaces the existing file content of a document record with new binary file data. This operation completely overwrites the previous file content and updates the document metadata with new file information.
Secure File Replacement & Version Control Process
- Document & Permission Validation: System verifies document exists, has current file content, user has modification permissions, and document is not under legal hold restrictions
- Comprehensive Security Scanning: Replacement file undergoes virus scanning, malware detection, content analysis, and format validation using enterprise security infrastructure
- Audit Trail Creation: Complete audit record created including original file metadata, replacement justification, user authorization, and timestamp before any changes
- Secure Content Replacement: Previous file securely deleted from encrypted storage, replacement file stored with AES-256 encryption, and metadata updated with new file characteristics
- Post-Replacement Validation: System validates successful storage, updates access permissions, triggers any required notifications, and confirms audit trail completion
⚠️ Permanent Operation: File replacement is irreversible. Previous versions cannot be recovered. Ensure proper authorization and backup procedures before replacement.
POST vs PUT Behavior: Unlike POST /Document/File (which performs upsert: update OR create), PUT strictly requires an existing document record and performs update-only operations. Use POST for initial uploads or when document existence is uncertain; use PUT for explicit file replacement when you need guaranteed update-only semantics.
Required Headers - See Authentication
| Header | Value | Description |
|---|---|---|
| Content-Type | multipart/form-data | Request content type for file uploads |
| Authorization | {accessToken} | Bearer token for API access |
| Version | 2.0 | API version identifier |
Request Body (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
DocumentID |
integer | The native 7G identifier for the document record with existing file content to replace. | |
ExternalDocumentId |
string | Your external system identifier for the document record with existing file content to replace. | |
file |
binary | The binary file content to replace the existing file. Supports various formats depending on document type and system configuration. |
DocumentID
The native 7G identifier for the document record with existing file content to replace.
ExternalDocumentId
Your external system identifier for the document record with existing file content to replace.
file
The binary file content to replace the existing file. Supports various formats depending on document type and system configuration.
🔒 Compliance & Risk Management
- Permanent Replacement: Previous file versions are permanently deleted and cannot be recovered through API or system recovery
- Regulatory Impact: Replacing compliance documents may require regulatory notification and member disclosure per Australian financial services law
- Audit Requirements: Complete audit trail maintained for 7+ years including replacement reason, authorization, and business impact assessment
- Privacy Obligations: Replacement files inherit Privacy Act 1988 obligations - ensure appropriate data handling and security measures
Example Requests
bash
# Replace file in document by ID
curl -X PUT 'https://api.7g.com.au/Document/File' \
-H "Authorization: {accessToken}" \
-H "Version: 2.0" \
-F "DocumentID=12345" \
-F "file=@/path/to/updated_statement.pdf"
# Replace file in document by external ID
curl -X PUT 'https://api.7g.com.au/Document/File' \
-H "Authorization: {accessToken}" \
-H "Version: 2.0" \
-F "ExternalDocumentId=INV-STMT-2024-001" \
-F "file=@/path/to/corrected_document.pdf"Response Examples
json
{
"result": true,
"message": "File uploaded successfully",
"recordCount": 1,
"data": {
"documentID": 12345,
"externalDocumentId": null,
"documentTypeID": 1,
"name": "Investor Statement Q4 2024",
"code": "INV-STMT-Q4-2024",
"description": "Quarterly investment statement (corrected)",
"password": null,
"ordinal": 1,
"productID": 100,
"externalProductId": null,
"bizEntityID": 5678,
"externalBizEntityId": null,
"organisationID": null,
"externalOrganisationId": null,
"showInDocumentsInPortal": true,
"isPublic": false
}
}