/api/v1/accounting/myob/start
auth: jwt (administrator)Begin a MYOB AccountRight Live OAuth2 authorisation flow. Generates PKCE + state, returns the MYOB authorisation URL. Rate-limited (10/min open bucket).
handlers: MyobAuthController.start
No parameters.
APIResponseDataObject<MyobStartResponse>APIErrorAPIError/api/v1/accounting/myob/callback
auth: noneMYOB OAuth callback. Validates state, exchanges the code, upserts a MyobConnections row per discovered company file, then 302-redirects (desktop) or serves a 200 text/html bridge page (mobile) opening `vsms://auth/myob/{success|failure}`.
handlers: MyobAuthController.callback
| name | required | default | description |
|---|---|---|---|
code querystring | no | — | OAuth authorisation code returned by MYOB. |
state querystring | no | — | PKCE state issued by `/start`. |
error querystring | no | — | Set by MYOB on failure or user denial. |
redirecttext/html/api/v1/accounting/myob/status
auth: jwtMYOB connection summary — whether a connection exists, the file list, and the current `autoFiscaliseInvoices` flag.
handlers: MyobAuthController.status
No parameters.
APIResponseDataObject<MyobStatusResponse>APIError/api/v1/accounting/myob/files
auth: jwtList every MYOB company file authorised for the caller's business, each carrying `isActive` indicating the current sync target.
handlers: MyobAuthController.listFiles
No parameters.
APIResponseDataList<MyobFileSummary>/api/v1/accounting/myob/files/:myobFileId/activate
auth: jwt (administrator)Switch the active MYOB company file for the caller's business. Fires `MYOB_FILE_ACTIVATED` audit.
handlers: MyobAuthController.activateFile
| name | required | default | description |
|---|---|---|---|
myobFileId pathstring | yes | — | MYOB company file ID (1–100 chars). |
APIResponseDataObject<MyobFileSummary>APIError/api/v1/accounting/myob/connection
auth: jwt (administrator)Soft-deactivate all MYOB connections for the caller's business (`IsActive=0`). Rows are retained for history. Fires `MYOB_DISCONNECTED` audit.
handlers: MyobAuthController.disconnect
No parameters.
APIResponseDataObject<{ deactivatedCount: number }>/api/v1/accounting/myob/tax-mappings
auth: jwt (administrator)List all MYOB tax-mappings for the business (`Provider='myob'`). Mirrors `/accounting/sage/tax-mappings`.
handlers: MyobTaxMappingsController.list
No parameters.
APIResponseDataList<TaxRateMappingDTO>/api/v1/accounting/myob/tax-mappings/auto-map
auth: jwt (administrator)Pull MYOB tax codes + V-SDC `/status` and return match suggestions. Does NOT persist. Rate-limited (10/min open bucket).
handlers: MyobTaxMappingsController.autoMap
No parameters.
APIResponseDataObject<MyobTaxMappingAutoMapResponse>APIError/api/v1/accounting/myob/tax-mappings
auth: jwt (administrator)Create or update one MYOB tax-mapping. Fires `MYOB_TAX_MAPPING_UPDATED` audit.
handlers: MyobTaxMappingsController.upsert
| name | required | default | description |
|---|---|---|---|
providerTaxType bodystring | yes | — | MYOB tax-code (e.g. `GST`, `FRE`). |
providerTaxName bodystring | null | no | — | Human-readable MYOB tax name. |
providerRate bodynumber | null | no | — | MYOB tax rate. |
vsdcTaxLabel bodystring | yes | — | V-SDC label. |
vsdcRate bodynumber | null | no | — | V-SDC rate percent. |
APIResponseDataObject<TaxRateMappingDTO>APIError/api/v1/accounting/myob/tax-mappings/:providerTaxType
auth: jwt (administrator)Soft-delete a MYOB tax-mapping (`IsActive=0`). Idempotent.
handlers: MyobTaxMappingsController.remove
| name | required | default | description |
|---|---|---|---|
providerTaxType pathstring | yes | — | MYOB tax-code to deactivate. |
empty/api/v1/accounting/myob/tax-mappings/:providerTaxType/restore
auth: jwt (administrator)Re-activate a deactivated MYOB tax-mapping (`IsActive=1`). Idempotent.
handlers: MyobTaxMappingsController.restore
| name | required | default | description |
|---|---|---|---|
providerTaxType pathstring | yes | — | MYOB tax-code to re-activate. |
empty/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. Runs in the background: replies `202 { runId }` at once and stores the outcome on the run. The finished run's `result` is the old synchronous body: `data` is now an empty list, `totalRows` the fetched count and `message` the counters string.
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. |
APIResponseDataObject<BackgroundRunAcceptedDTO>APIErrorAPIErrorAPIErrorAPIError