/api/v1/accounting/sage200evolution/tax-mappings
auth: jwt (administrator)List all Sage 200 Evolution tax-mappings for the business (`Provider='sage200evolution'`). The path-param `:id` everywhere else in this surface is the Sage `idTaxRate` (the provider tax type).
handlers: Sage200EvolutionTaxMappingsController.list
No parameters.
APIResponseDataList<TaxRateMappingDTO>/api/v1/accounting/sage200evolution/tax-mappings/:id
auth: jwt (administrator)Upsert a single Sage 200 Evolution mapping. `:id` is the Sage `idTaxRate` (provider tax type). Body carries the V-SDC label + optional metadata.
handlers: Sage200EvolutionTaxMappingsController.upsert
| name | required | default | description |
|---|---|---|---|
id pathstring | yes | — | Sage `idTaxRate` — the provider tax type. |
providerTaxName bodystring | null | no | — | Human-readable Sage tax name. |
providerRate bodynumber | null | no | — | Sage tax rate percent. |
vsdcTaxLabel bodystring | yes | — | V-SDC label. |
vsdcRate bodynumber | null | no | — | V-SDC rate percent. |
APIResponseDataObject<TaxRateMappingDTO>APIError/api/v1/accounting/sage200evolution/tax-mappings/:id
auth: jwt (administrator)Soft-delete a Sage 200 Evolution mapping (`IsActive=0`). Idempotent.
handlers: Sage200EvolutionTaxMappingsController.remove
| name | required | default | description |
|---|---|---|---|
id pathstring | yes | — | Sage `idTaxRate`. |
empty/api/v1/accounting/sage200evolution/tax-mappings/:id/restore
auth: jwt (administrator)Re-activate a deactivated Sage 200 Evolution mapping (`IsActive=1`). Note: uses POST (unlike the Xero/Sage/MYOB restore endpoints which use PATCH). Idempotent.
handlers: Sage200EvolutionTaxMappingsController.restore
| name | required | default | description |
|---|---|---|---|
id pathstring | yes | — | Sage `idTaxRate`. |
empty/api/v1/businesses/:businessId/accounting/sage200evolution/sync
auth: apikeyOn-premise Sage 200 Evolution agent push. Scope-bound to `sage200evolution`. Per-row register→till routing via `Tills.PosRegisterId`; unrouted invoices return `outcomes[].outcome='register_unmapped'` and fire `SAGE200_RECEIPT_UNROUTED` audit. Supports advance-sale deposits (one `AccountingInvoicePayment` per `_etblInvoiceDeposits` row, fan-out to N `NormalizedInvoicePayment`s).
handlers: AccountingAgentSyncController.syncSage200Evolution
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
Authorization headerstring | yes | — | `ApiKey <key>`. |
invoices bodyPushInvoice[] | yes | — | Array of pushed invoices. Deposit rows arrive as separate payments under the same invoice. |
APIResponseDataObject<PushInvoicesResponse>APIErrorAPIError/api/v1/businesses/:businessId/accounting/sage200evolution/register-manifest
auth: apikeySage 200 Evolution register discovery. The agent posts its warehouse (`WhseMst`) and till snapshot. The cloud upserts one `Locations` row per warehouse keyed on the warehouse code and auto-accepts every newly created one, then upserts one `Tills` row per register keyed on `PosRegisterId` with a null `MachineId` (no hostname is available to auto-bind a print agent). Existing rows are not overwritten apart from source-wins renames and till moves. Fires `SAGE200_MANIFEST_RECEIVED` plus per-row rename/move audits.
handlers: AccountingAgentSyncController.registerSage200EvolutionManifest
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. Must match the API key's `BusinessId`; a mismatch is rejected with 403. |
Authorization headerstring | yes | — | `ApiKey <key>` — validated by `requireApiKey` against the stored key hash. |
capturedAt bodynumber | yes | — | Epoch-ms time the agent captured the snapshot. |
warehouses body{ code: string; name: string }[] | yes | — | Sage 200 warehouses. |
tills body{ posRegisterId: string; tillName: string; warehouseCode: string }[] | yes | — | Sage 200 tills. A till whose warehouse cannot be resolved is skipped. |
APIResponseDataObject<Sage200RegisterManifestResponse>APIErrorAPIErrorAPIErrorAPIError/api/v1/accounting/sage200evolution/tax-mappings/seed-from-agent
auth: apikeySage 200 Evolution agent tax-rate seed. The sales agent posts its `dbo.TaxRate` snapshot on startup and whenever a push response carries `requestTaxRateSeed`. Every not-yet-confirmed code is written as a PROPOSAL (`UnmappedTaxTypes`) with its name and rate; nothing is auto-confirmed into `TaxRateMappings`. Already-confirmed codes are skipped unless the source rate or name has drifted, in which case the mapping is deactivated for admin review. The business comes from the API key (no path businessId); only `requireApiKey` runs, with no scope check.
handlers: Sage200EvolutionTaxMappingsController.seedFromAgent
| name | required | default | description |
|---|---|---|---|
Authorization headerstring | yes | — | `ApiKey <key>` — validated by `requireApiKey` against the stored key hash. |
taxRates body{ code: string; name?: string|null; fiscalLabel?: string|null; rate?: number|null }[] | yes | — | Rows from `dbo.TaxRate`. `code` is the `idTaxRate`. `fiscalLabel` is accepted by the schema. |
APIResponseDataObject<{ proposed: { code: string; name: string|null; rate: number|null }[]; alreadyMapped: number; driftDetected: number }>APIErrorAPIError/api/v1/accounting/sage200evolution/tax-mappings/request-seed
auth: jwt (administrator)Admin request for a Sage 200 Evolution tax-rate re-seed. Sets an in-memory per-business flag; the next Sage 200 Evolution agent push response carries `requestTaxRateSeed: true`, prompting the agent to call seed-from-agent again. Business is taken from the JWT. Fires `SAGE200_TAX_MAPPING_SEED_REQUESTED`.
handlers: Sage200EvolutionTaxMappingsController.requestSeed
No parameters.
APIResponseDataObject<{ requested: true }>APIErrorAPIErrorAPIError