DELETE

/Investment

Usage Notes

When

  • Remove test investments from development environments
  • Delete cancelled investment options before launch
  • Clean up duplicate records from data migration

Requirements

  • No transactions, price records, or distribution history
  • All InvestmentPrice records must be deleted first

Notes

  • Investments with transaction history cannot be deleted
  • Deletion is permanent with no recovery mechanism
  • Alternative: set IsActive=false to maintain audit trail

Description

Permanently deletes an investment. Delete all InvestmentPrice records first. Consider setting IsActive=false as reversible alternative when audit trail preservation matters.

Required Headers - See Authentication

HeaderValueDescription
Authorization{accessToken}Bearer token for API access
Version2.0API version identifier

Query Parameters

Parameter Type Required Description
ProductID >
integer
Native 7G product identifier for ownership validation during deletion.
ExternalProductId >
string
Client product reference for ownership validation during deletion.
InvestmentID >
int
Native 7G investment identifier (most efficient deletion method).
ExternalInvestmentId >
string(50)
Client investment identifier (requires ProductID or ExternalProductId for scoping).
ProductID
integer
Native 7G product identifier for ownership validation during deletion.
ExternalProductId
string
Client product reference for ownership validation during deletion.
InvestmentID
int
Native 7G investment identifier (most efficient deletion method).
ExternalInvestmentId
string(50)
Client investment identifier (requires ProductID or ExternalProductId for scoping).

Parameter Options

Choose one of these identification methods:

  • Option 1: investmentID only (most efficient)
  • Option 2: productID + externalInvestmentId
  • Option 3: externalProductId + externalInvestmentId
  • Option 4: productID + investmentID (for additional validation)

Note: All combinations validate product ownership before deletion.

Example Requests

bash
# Delete investment by ID only
curl -X DELETE 'https://api.7g.com.au/Investment?InvestmentID=12345' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0'

# Delete by product ID and investment ID (recommended for validation)
curl -X DELETE 'https://api.7g.com.au/Investment?ProductID=100&InvestmentID=12345' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0'

# Delete by external IDs combination
curl -X DELETE 'https://api.7g.com.au/Investment?ExternalProductId=FUND-001&ExternalInvestmentId=INV-001' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0'

# Delete by product ID and external investment ID
curl -X DELETE 'https://api.7g.com.au/Investment?ProductID=100&ExternalInvestmentId=INV-001' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0'

Response Examples

json
{
  "result": true,
  "message": "Investment deleted successfully",
  "recordCount": 0,
  "data": null
}