Push Transaction to Accounting
POST/api/magento2/integration-instances/:magento2IntegrationInstance/transactions/:txn/push-to-accounting
Push the transaction to the connected accounting system (QuickBooks Online / Xero). Synchronous — returns the updated row inline.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
A Magento 2 invoice is accounted for in SKU.io by the sales order made from its Magento order (or by the SKU.io sales invoice linked to that Magento invoice), and a credit memo by its SKU.io sales credit — so the push syncs that document's journal to the accounting system rather than posting the Magento document a second time. pushed_to_accounting_at is set only once the journal synced or is queued to sync.
Refused with 422 on transaction, naming the reason, when:
- the invoice's Magento order has no SKU.io sales order, or the credit memo has no SKU.io sales credit;
- SKU.io has not posted a journal for that document yet;
- no connected accounting integration syncs that journal (connect QuickBooks Online or Xero, or turn on sales sync);
- the accounting system rejected the journal (its error is included).
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.