/BizEntity
When to Use
- Remove test entities created during development and integration phases
- Delete duplicate entities resulting from data import or migration errors
- Clean up entities with no transaction history that are no longer required
- Comply with data retention policies for entities without financial activity
- Remove entities created in error before any financial transactions occurred
Common Scenarios
- Development Cleanup: Remove test entities from sandbox environments before production deployment
- Data Quality Management: Delete duplicate entities identified during data auditing processes
- Migration Rollback: Remove entities that failed validation during data migration workflows
- Regulatory Compliance: Delete entities upon client request under data protection regulations
- Error Correction: Remove entities created with incorrect fundamental data before transaction processing begins
Prerequisites
- Valid Bearer token with entity deletion permissions
- Entity must exist and be accessible within your account scope
- Entity must have zero transaction history across all associated accounts
- All related accounts must have zero balances and no pending transactions
- No active distribution allocations or corporate action participation
Considerations
- Critical Business Rule: Entities with any BizTransaction records cannot be deleted - this protects financial audit trails and regulatory compliance
- Complete Cascade Deletion: All related objects are permanently removed (Accounts, Addresses, Communications, PaymentDetails, BizEntityParties)
- Irreversible Operation: Deletion is permanent with no recovery mechanism - verify carefully before executing
- Recommended Alternative: For entities with transaction history, use PUT endpoint to update bizEntityStatusID to Inactive (2) instead of deletion
- Data Integrity Protection: 7G platform validates all dependency constraints before allowing deletion to maintain referential integrity
- Performance Consideration: Native IDs (BizEntityID) provide better performance than external ID lookups for deletion operations
- Audit Trail Impact: Consider the impact on reporting and audit trails before removing entities from the system
Description
Permanently removes a business entity and all its associated data from the 7G platform. This operation enforces strict business rules to protect financial integrity and regulatory compliance by preventing deletion of entities with transaction history or active financial relationships.
⚠️ Critical Deletion Restrictions
The 7G platform will reject deletion attempts for entities that have:
- Any BizTransaction Records: Even historical or reversed transactions prevent deletion
- Non-Zero Account Balances: All associated accounts must have zero balances
- Pending Corporate Actions: Active distribution allocations or dividend processing
- Document Attachments: Associated regulatory or compliance documents
- Active Relationships: Parent-child entity relationships or dealer group associations
Recommended Approach: For entities with financial history, use the PUT endpoint to update bizEntityStatusID
to Inactive (2) rather than attempting deletion.
🔄 Safe Deletion Process
For safe entity removal, follow this validation sequence:
- Use GET /BizEntity to verify entity structure and relationships
- Confirm zero balances across all associated accounts
- Verify no transaction history using GET /BizTransaction filtering
- Check for active corporate actions or distributions
- Execute DELETE operation using either native or external ID
⚠️ Recommended Alternative: Status Update Instead of Deletion
For entities with transaction history, use PUT /BizEntity instead of DELETE to maintain financial audit trails and regulatory compliance.
Safe Status Update Workflow:
- GET entity: Retrieve complete current structure using GET /BizEntity?BizEntityID=12345
- Modify status: Update bizEntityStatusID field to desired status:
- Inactive (2): Entity no longer active but maintains complete history for reporting
- Suspended (3): Temporarily restrict transactions while preserving all data
- PUT complete structure: Send entire entity with modified status + ALL existing nested arrays (accounts, addresses, parties, communications, paymentDetails) to prevent data loss
- Verify result: Confirm status change successful and all nested data preserved
Why Status Update is Recommended:
- Preserves Audit Trail: All transaction history, account balances, and distribution records remain accessible for regulatory reporting and compliance audits
- Reversible Operation: Entity can be reactivated (status=1) if deletion was premature - deletion is permanent with no recovery
- Maintains Relationships: Parent-child entity relationships, dealer group associations, and party linkages preserved for historical analysis
- Supports Reporting: Historical reporting and analytics continue to function with inactive entities included in appropriate filters
Use DELETE only for: Test entities, duplicate records from migration errors, entities created in error with zero transaction history and no financial activity.
Required Headers - See Authentication
Header | Value | Description |
---|---|---|
Authorization | {accessToken} | Bearer token for API access |
Version | 2.0 | API version identifier |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
BizEntityID |
integer | Native 7G identifier for direct entity deletion. Fastest performance using primary index for high-frequency operations. | |
ExternalBizEntityId |
string | External system identifier for dual-ID deletion workflows. Slower than BizEntityID due to secondary index lookup. |
Example Requests
# Delete by native 7G ID (fastest performance)
curl -X DELETE 'https://api.7g.com.au/BizEntity?BizEntityID=12345' \
-H 'Authorization: {accessToken}' \
-H 'Version: 2.0'
# Delete by external ID (dual-ID system)
curl -X DELETE 'https://api.7g.com.au/BizEntity?ExternalBizEntityId=EXT-DEV-001' \
-H 'Authorization: {accessToken}' \
-H 'Version: 2.0'
# Safe deletion with verification (recommended workflow)
# Step 1: Verify entity exists and check structure
curl -X GET 'https://api.7g.com.au/BizEntity?BizEntityID=12345' \
-H 'Authorization: {accessToken}' \
-H 'Version: 2.0'
# Step 2: Verify no transaction history
curl -X GET 'https://api.7g.com.au/BizTransaction?BizEntityID=12345' \
-H 'Authorization: {accessToken}' \
-H 'Version: 2.0'
# Step 3: Execute deletion if validation passes
curl -X DELETE 'https://api.7g.com.au/BizEntity?BizEntityID=12345' \
-H 'Authorization: {accessToken}' \
-H 'Version: 2.0'
Response Examples
{
"result": true,
"message": "Entity deleted successfully",
"recordCount": 0,
"data": []
}