Skip to main content

Push Credit Memo to Accounting

POST 

/api/magento2/integration-instances/:magento2IntegrationInstance/credit-memos/:memoId/push-to-accounting

Push one Magento 2 credit memo to the connected accounting system — the same action as Push Transaction to Accounting with type=credit_memo, without the type query string. Requires the integrations.sync permission.

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