Endpoint Details
- URL:
/api/v0/taxes/{tax_id}
- Method:
PATCH
- 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 |
Request Body
All fields are optional - only provide the fields you want to update.Optional Fields
Field | Type | Description | Validation |
---|---|---|---|
name | string | Tax name (e.g., “VAT”, “Sales Tax”, “GST”) | 1-100 characters |
description | string | Detailed description of the tax | Max 255 characters |
percentage | number | Tax percentage rate (e.g., 15.5 for 15.5%) | 0-100, numeric |
active | boolean | Whether the tax is currently active | Boolean |
appIds | string[] | Array of application IDs to associate with this tax | Array of valid UUIDs |
Request Schema
Response
Success Response (200 OK)
Error Responses
Example Requests
Update Types
Rate Changes
Standard Rate Updates
Standard Rate Updates
- Use Case: Regulatory changes, government rate adjustments
- Impact: Affects all future transactions using this tax
- Consideration: May require notification to affected applications
Emergency Rate Changes
Emergency Rate Changes
- Use Case: Immediate regulatory changes, temporary rate adjustments
- Best Practice: Update description to document reason and effective date
- Monitoring: Track applications using this tax for impact assessment
Status Management
Deactivating Taxes
Deactivating Taxes
- Use Case: Discontinuing tax rates, temporary suspension
- Impact: Prevents tax from being used in new transactions
- Cleanup: Consider removing application associations when deactivating
Reactivating Taxes
Reactivating Taxes
- Use Case: Restoring previously used tax rates
- Verification: Ensure tax rate is still current and compliant
- Testing: Validate in staging environment before production activation
Application Management
Adding Applications
Adding Applications
- Preserves Existing: Maintains current application associations
- Validation: Ensures applications belong to the same business
- Impact: New applications can immediately use this tax rate
Removing Applications
Removing Applications
- Selective Removal: Remove specific applications while preserving others
- Impact: Affected applications lose access to this tax rate
- Validation: Ensure removed applications have alternative tax configurations
Replacing Applications
Replacing Applications
- Complete Replacement: Replace all current associations with new list
- Use Case: Major application restructuring, business reorganization
- Caution: Verify all current applications have alternative tax configurations
Validation Rules
Name Validation
Name Validation
- Length: 1-100 characters when provided
- Uniqueness: Should be unique within business context
- Clarity: Use descriptive names that indicate purpose and jurisdiction
Percentage Validation
Percentage Validation
- Range: 0-100% (inclusive)
- Precision: Supports decimal places for precise rates
- Validation: Must be a valid number when provided
Description Validation
Description Validation
- Length: Maximum 255 characters when provided
- Content: Should explain tax purpose, jurisdiction, or recent changes
- Optional: Can be null or empty string
Application Validation
Application Validation
- Format: Must be valid UUID v4 format
- Ownership: Applications must belong to the same business
- Existence: Applications must exist and be accessible
Business Logic
Update Behavior
Partial Updates: Only fields provided in the request body are updated. Omitted fields remain unchanged.
Application Association: When updating
appIds
, the entire application list is replaced. To add/remove specific applications, first retrieve current associations.Impact Assessment
Rate Change Impact
Rate Change Impact
- Future Transactions: All future transactions using this tax will use the new rate
- Active Invoices: Existing draft invoices may be affected depending on implementation
- Payment Links: Active payment links using this tax will calculate with new rate
Status Change Impact
Status Change Impact
- Deactivation: Prevents tax from being used in new transactions
- Application Behavior: Applications should handle inactive tax gracefully
- Existing Data: Historical transactions remain unchanged
Application Changes
Application Changes
- Access Control: Applications gain or lose access to tax immediately
- Validation: Existing transactions using removed applications remain valid
- Migration: Consider data migration when removing applications
Use Cases
Regulatory Compliance
Update tax rates to comply with new government regulations
Business Restructuring
Modify application associations during business reorganization
Seasonal Adjustments
Activate or deactivate seasonal tax rates
Rate Corrections
Fix incorrect tax rates or update descriptions
Application Migration
Move tax configurations between applications during system updates
Compliance Updates
Update tax descriptions to include compliance notes or regulatory references
Best Practices
1
Backup Before Changes
Always retrieve and backup current tax configuration before making changes:
2
Validate Changes
Validate update data before sending to API:
3
Document Changes
Always update description when making significant changes:
4
Test in Staging
Test tax updates in staging environment before production:
5
Monitor Impact
Monitor applications after tax updates to ensure proper functionality:
Security Considerations
Tax updates affect financial calculations and should be carefully controlled with proper authentication and audit logging.
Access Control
Access Control
- Only authenticated applications can update taxes they have access to
- Tax updates are scoped to the business of the authenticated application
- Consider implementing role-based permissions for tax modifications
Audit Trail
Audit Trail
- Log all tax updates with user information and timestamps
- Track what changed, when, and why for compliance purposes
- Maintain historical records of tax rate changes
Impact Control
Impact Control
- Implement approval workflows for production tax changes
- Test tax updates in staging environments
- Monitor application behavior after tax updates
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 detailsDELETE /api/v0/taxes/{id}
- Delete tax