/api/v1/accounting/xero/tax-mappings
auth: jwt (administrator)List all Xero tax-type to V-SDC tax-label mappings for the business (active and inactive). Active rows ordered first, then alphabetically. `isActive: boolean` per row so the admin UI can surface a Restore action on soft-deleted entries.
handlers: XeroTaxMappingsController.list
No parameters.
APIResponseDataList<TaxRateMappingDTO>/api/v1/accounting/xero/tax-mappings/auto-map
auth: jwt (administrator)Fetch Xero `/TaxRates` from the active tenant + V-SDC `/status`, then return match suggestions with `needsReview` flags + alternatives. Does NOT persist — the admin confirms each suggestion via PUT. Rate-limited (10/min open bucket).
handlers: XeroTaxMappingsController.autoMap
No parameters.
APIResponseDataObject<XeroTaxMappingAutoMapResponse>APIErrorAPIError/api/v1/accounting/xero/tax-mappings
auth: jwt (administrator)Create or update one Xero tax-type to V-SDC label mapping (MERGE on (businessId, 'xero', providerTaxType)). Re-activates an existing inactive row instead of inserting a duplicate. Fires `XERO_TAX_MAPPING_UPDATED` audit.
handlers: XeroTaxMappingsController.upsert
| name | required | default | description |
|---|---|---|---|
providerTaxType bodystring | yes | — | Xero tax-type code (e.g. `OUTPUT2`, `ZERORATED`). Trimmed, 1–100 chars. |
providerTaxName bodystring | null | no | — | Human-readable Xero tax name for display. |
providerRate bodynumber | null | no | — | Xero rate percent. |
vsdcTaxLabel bodystring | yes | — | Target V-SDC tax label (must be one of `F/N/P/E/T/A/B/C/D`). |
vsdcRate bodynumber | null | no | — | V-SDC rate percent for display. |
APIResponseDataObject<TaxRateMappingDTO>APIError/api/v1/accounting/xero/tax-mappings/:providerTaxType
auth: jwt (administrator)Soft-delete a Xero tax mapping — sets `IsActive=0`. Row is retained for history and can be re-activated via the restore endpoint. Idempotent.
handlers: XeroTaxMappingsController.remove
| name | required | default | description |
|---|---|---|---|
providerTaxType pathstring | yes | — | Xero tax-type code to deactivate. |
empty/api/v1/accounting/xero/tax-mappings/:providerTaxType/restore
auth: jwt (administrator)Re-activate a previously soft-deleted Xero tax mapping (`IsActive=0` → `1`). Idempotent.
handlers: XeroTaxMappingsController.restore
| name | required | default | description |
|---|---|---|---|
providerTaxType pathstring | yes | — | Xero tax-type code to re-activate. |
empty