/api/v1/accounting/xero/sync
auth: jwt (administrator | view_invoices | submit_invoices)Pull-sync PAID invoices from the active Xero tenant: fetch via `XeroProvider.getInvoices`, normalise to `AccountingInvoice[]`, persist to `Invoices` table (`Source='xero'`) with one `ImportBatches` row per call. Idempotency key = `SHA-256(businessId:xeroTenantId:xeroInvoiceId)`. When `AutoFiscaliseInvoices=1`, newly-inserted eligible invoices are chunked (10) and dispatched as fiscalisation jobs. Returns the `AccountingInvoice[]` plus a summary message including `jobIds=`. HTTP caching disabled.
handlers: AccountingInvoicesController.xeroSync
| name | required | default | description |
|---|---|---|---|
contactId querystring | no | — | Provider-native contact GUID — narrows the result to invoices for that contact. |
modifiedSince queryISO-8601 datetime | no | — | Only invoices updated after this date are returned (passed as `If-Modified-Since` to Xero). |
dateTo queryISO-8601 datetime | no | — | Post-fetch filter on `updatedAt` (Xero has no `dateTo` param). |
page queryinteger | no | — | 1-based page. Omit to auto-paginate. |
pageSize queryinteger | no | — | 1–100. Capped by the provider. |
APIResponseDataList<AccountingInvoice>APIErrorAPIErrorAPIError/api/v1/accounting/sage/sync
auth: jwt (administrator | view_invoices | submit_invoices)Pull-sync invoices from the active Sage connection. Fetches OUTSTANDING / OVERDUE / PAID via three API calls merged client-side, normalises, persists to `Invoices` (`Source='sage'`). Idempotency key = `SHA-256(businessId:sageBusinessId:sageInvoiceId)`. `modifiedSince` is silently ignored (Sage's `sales_invoices` has no date filter). Auto-fiscalisation behaviour matches Xero. HTTP caching disabled.
handlers: AccountingInvoicesController.sageSync
| name | required | default | description |
|---|---|---|---|
contactId querystring | no | — | Sage contact id — narrows the result to one contact. |
modifiedSince queryISO-8601 datetime | no | — | Silently ignored for Sage. |
dateTo queryISO-8601 datetime | no | — | Post-fetch filter on `updatedAt`. |
page queryinteger | no | — | 1-based page. |
pageSize queryinteger | no | — | 1–100. |
APIResponseDataList<AccountingInvoice>APIErrorAPIErrorAPIError/api/v1/accounting/myob/sync
auth: jwt (administrator | view_invoices | submit_invoices)Pull-sync `Closed` invoices from the active MYOB company file. Fetches `/Sale/Invoice/Service` and `/Sale/Invoice/Item` merged by UID, normalises, persists to `Invoices` (`Source='myob'`). Idempotency key = `SHA-256(businessId:myobFileId:myobInvoiceId)`. Auto-fiscalisation behaviour matches Xero. HTTP caching disabled.
handlers: AccountingInvoicesController.myobSync
| name | required | default | description |
|---|---|---|---|
contactId querystring | no | — | MYOB contact UID — narrows the result. |
modifiedSince queryISO-8601 datetime | no | — | Forwarded to MYOB OData `$filter`. |
dateTo queryISO-8601 datetime | no | — | Post-fetch filter on `updatedAt`. |
page queryinteger | no | — | 1-based page. |
pageSize queryinteger | no | — | 1–100. |
APIResponseDataList<AccountingInvoice>APIErrorAPIErrorAPIError