DELETE
/BizEntity
Usage Notes
When
- Remove test entities from development environments
- Delete duplicate entities from data migration errors
- Clean up entities created in error with no transaction history
Requirements
- Entity must have zero transaction history
- Entity must have zero account balances
- No active distributions involving this entity
Notes
- Deletion cascades to accounts, addresses, parties, communications, payment details
- Deletion is permanent with no recovery mechanism
- Alternative: use PUT to set bizEntityStatusID to Inactive (2) instead
Description
Permanently deletes a BizEntity and all associated data. Only works when no transaction history or non-zero balances exist. Consider setting status to Inactive as reversible alternative.
Validation Before Deletion: Verify the entity has zero transactions using GET /BizTransaction before attempting deletion.
Recommended Alternative: For entities with transaction history, use PUT /BizEntity to update
bizEntityStatusID to Inactive (2) or Suspended (3) instead. This preserves audit trails and allows reactivation if needed.
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. |
BizEntityID
Native 7G identifier for direct entity deletion. Fastest performance using primary index for high-frequency operations.
ExternalBizEntityId
External system identifier for dual-ID deletion workflows. Slower than BizEntityID due to secondary index lookup.
Example Requests
bash
# 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
json
{
"result": true,
"message": "Entity deleted successfully",
"recordCount": 0,
"data": []
}