Skip to main content

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.

Not yet available to API tokens

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​

OK

Response Headers
    Content-Type