/api/v1/businesses/:businessId/accounting/sage100/sync
auth: apikeyOn-premise Sage 100 agent push. Headless agent POSTs a batch of normalised `AccountingInvoice[]` for the business; the helper inserts → dedupes → auto-fiscalises (when the flag is on). API key must have `scope=sage100` (enforced by `requireScope`); empty array is allowed (used by the agent's first-run dry-run wizard).
handlers: AccountingAgentSyncController.syncSage100
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. Must match the API key's `BusinessId`. |
Authorization headerstring | yes | — | `ApiKey <key>` — validated by `requireApiKey` against `ApiKeys.KeyHash`. |
invoices bodyPushInvoice[] | yes | — | Array of pushed invoices. Each entry mirrors `AccountingInvoice` with optional `posSaleId`/`posRegisterId`/`originalPosSaleId`/`cashierId`/payment `tenders[]`. Empty array allowed. |
APIResponseDataObject<PushInvoicesResponse>APIErrorAPIError/api/v1/businesses/:businessId/accounting/sage300/sync
auth: apikeyOn-premise Sage 300 agent push. Same shape as the Sage 100 endpoint but scope-bound to `sage300`.
handlers: AccountingAgentSyncController.syncSage300
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
Authorization headerstring | yes | — | `ApiKey <key>`. |
invoices bodyPushInvoice[] | yes | — | Array of pushed invoices. |
APIResponseDataObject<PushInvoicesResponse>APIErrorAPIError/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/amicus/sync
auth: apikeyOn-premise AMICUS agent push. Scope-bound to `amicus`. Per-row register→till routing (null till → sign-but-don't-print), `PosSaleId` persisted on `Invoices`, refund referent resolution via `originalPosSaleId`. Supports split-tender (one payment with `tenders[]`). Unrouted invoices return `outcomes[].outcome='register_unmapped'` and fire `AMICUS_RECEIPT_UNROUTED` audit.
handlers: AccountingAgentSyncController.syncAmicus
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
Authorization headerstring | yes | — | `ApiKey <key>`. |
invoices bodyPushInvoice[] | yes | — | Array of pushed invoices. Each may carry `posSaleId`, `posRegisterId`, `originalPosSaleId`, `cashierId`, and split-tender `payments[].tenders[]`. |
APIResponseDataObject<PushInvoicesResponse>APIErrorAPIError/api/v1/businesses/:businessId/accounting/sync/status
auth: jwt (administrator | view_invoices | submit_invoices)Return the last-push timestamp per on-premise source (sage100, sage300, sage200evolution, amicus) for the business. Reads `ImportBatches.CreatedAt` per source via `findLatestCreatedAtBySources`; null when the source has never pushed.
handlers: AccountingAgentSyncController.status
| name | required | default | description |
|---|---|---|---|
businessId pathuuid | yes | — | Target business UUID. |
APIResponseDataObject<PushStatusResponse>APIError