Endpoint Details
- URL:
/api/v0/taxes/{tax_id}
- Method:
DELETE
- Authentication: Required (API Key Authentication)
- Content-Type:
application/json
Authentication
This endpoint requires API key authentication using:x-client-key
: Your API client keyx-client-secret
: Your API client secret
Path Parameters
Parameter | Type | Description | Required |
---|---|---|---|
tax_id | string | Unique identifier for the tax | Yes |
Response
Success Response (204 No Content)
When a tax is successfully deleted, the API returns a204 No Content
status with an empty response body. This indicates that the tax has been permanently removed.
Confirmation Response (200 OK)
Some implementations may return a confirmation response:Example Requests
Error Responses
Safety Considerations
Irreversible Action: Once a tax is deleted, it cannot be recovered. All configuration data will be permanently lost.
Application Impact: Deleting a tax may affect applications that reference it. Ensure proper cleanup before deletion.
Pre-Deletion Checklist
1
Verify Tax Status
Ensure the tax is inactive and not currently being used in transactions.
2
Check Application Associations
Verify that no applications are associated with this tax.
3
Review Transaction History
Check if the tax has been used in historical transactions that may need references.
4
Backup Configuration
Export tax configuration details in case you need to recreate it later.
5
Notify Stakeholders
Inform relevant team members about the tax deletion, especially if it affects shared resources.
Alternative Actions
Before deleting a tax, consider these alternatives:Deactivate Instead of Delete
Deactivate Instead of Delete
Safer Option: Deactivate the tax by setting Benefits:
active: false
instead of deleting it.- Preserves historical configuration
- Can be reactivated if needed later
- Maintains referential integrity
- Safer than permanent deletion
Remove Application Associations
Remove Application Associations
Gradual Cleanup: Remove application associations first, then delete after validation.Use Cases:
- Gradual migration to new tax configurations
- Testing impact before full deletion
- Staged cleanup process
Archive Tax Configuration
Archive Tax Configuration
Export Before Delete: Save tax configuration for future reference.
Validation Before Deletion
Safety Checks
Active Status Check
Active Status Check
- Safe: Tax is inactive (
active: false
) - Unsafe: Tax is still active and may be used in new transactions
- Recommendation: Deactivate tax first, wait for confirmation, then delete
Application Association Check
Application Association Check
- Safe: Tax has no associated applications (
apps: []
) - Unsafe: Tax is associated with one or more applications
- Recommendation: Remove all application associations before deletion
Recent Activity Check
Recent Activity Check
- Safe: Tax hasn’t been used recently or was created long ago
- Warning: Recently created or recently used taxes
- Recommendation: Review usage patterns before deletion
Historical Usage Check
Historical Usage Check
- Consider: Whether historical transactions reference this tax
- Impact: Deletion won’t affect historical data but may impact reporting
- Recommendation: Verify reporting systems can handle missing tax references
Batch Operations
Cleanup Scenarios
Best Practices
Safety First
Safety First
- Always validate tax status and associations before deletion
- Implement confirmation steps for deletion operations
- Use batch operations carefully with proper error handling
- Consider deactivation as an alternative to deletion
Audit and Logging
Audit and Logging
- Log all tax deletions with user information and timestamps
- Maintain records of deleted taxes for audit purposes
- Document reasons for deletion in audit logs
- Implement approval workflows for production deletions
Impact Assessment
Impact Assessment
- Review applications that may be affected by tax deletion
- Check for any hardcoded references to specific tax IDs
- Verify that reporting systems can handle missing tax references
- Test deletion operations in staging environments first
Recovery Planning
Recovery Planning
- Export tax configurations before deletion for potential recovery
- Maintain backups of critical tax data
- Document tax configurations in external systems
- Consider soft deletion for critical tax configurations
Use Cases
Business Scenarios
Business Restructuring
Remove obsolete tax configurations during company reorganization
Regulatory Changes
Delete tax rates that are no longer legally valid
System Migration
Clean up old tax configurations after migrating to new systems
Development Cleanup
Remove test and development tax configurations from production
Compliance Requirements
Remove tax configurations that don’t meet current compliance standards
Data Governance
Maintain clean tax data by removing unused configurations
Security Considerations
Tax deletions affect financial calculations and should be carefully controlled with proper authentication, authorization, and audit logging.
Access Control
Access Control
- Only authenticated applications can delete taxes they have access to
- Tax deletions are scoped to the business of the authenticated application
- Consider implementing role-based permissions for tax deletion operations
Audit Requirements
Audit Requirements
- Log all tax deletions with detailed information
- Track who deleted taxes, when, and why
- Maintain historical records for compliance and investigation purposes
Business Continuity
Business Continuity
- Ensure tax deletions don’t break critical business processes
- Validate that applications can handle missing tax references gracefully
- Implement proper error handling for deleted tax scenarios
Rate Limiting
This endpoint is subject to the standard API rate limits:- Production: 1000 requests per hour per API key
- Development: 100 requests per hour per API key
Related Endpoints
POST /api/v0/taxes
- Create a new taxGET /api/v0/taxes
- List all taxesGET /api/v0/taxes/{id}
- Fetch specific tax detailsPATCH /api/v0/taxes/{id}
- Update tax configuration