Skip to main content

Generate Sales Order Accounting Transaction

POST 

/api/sales-orders/:salesOrder/generate-accounting-transaction

Generates — or regenerates — the accounting transaction (invoice journal) for a sales order from its current lines and financial data. Use this after correcting an order to refresh the journal without waiting for the next scheduled accounting sync.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Behavior:

  • No request body is required.
  • The response returns the generated transaction with its lines and nominal codes. Tax rate details, parent/children, and accounting-integration sync metadata are not expanded on this response — fetch GET /api/sales-orders/{salesOrder}/accounting for the fully expanded transaction.
  • Regeneration replaces the transaction's lines to match the order's current state.

Path parameters:

  • salesOrder (required): Sales order ID.

Requires permission: sales_orders.update

Request

Responses

OK

Response Headers
    Content-Type