Skip to main content

Get Sales Order Accounting Transaction

GET 

/api/sales-orders/:salesOrder/accounting

Gets the accounting transaction (invoice journal) generated for a sales order, including its lines with nominal codes and tax rates, any child transactions, and a summary of its parent batch transaction. Returns data: null when no accounting transaction has been generated for the order yet.

Required scope: orders:read

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

Authentication: Requires Bearer token.

Response fields:

  • id (integer), transaction_date (date-time), reference (string): The order number the transaction posts against.
  • type (object): name (e.g. sales_order_invoice), link_type / link_id (the source record), link_type_label (human-friendly label), link_route (in-app path to the source record).
  • name (string|null): The counterparty name (customer).
  • integration_invoice_number_override (string|null): Invoice number override used when posting to the accounting integration.
  • is_tax_included (boolean), total (number).
  • parent_type (object): Summary of the parent batch transaction; all values are null when the transaction has no parent.
  • children (array): Child transactions in the same structure (e.g. fulfillment journals), empty when none.
  • last_synced_at (date-time|null) and link (string|null): Last sync time and deep link into the connected accounting system, present when an accounting integration is connected.
  • last_sync_error (string|object|null): The most recent sync error, if any.
  • is_sync_enabled (boolean): Whether this transaction is allowed to sync.
  • is_type_sync_enabled (boolean): Whether this transaction type is enabled in the accounting sync settings.
  • lines (array): id, type (debit or credit), nominal_code {id, code, name}, description, quantity, amount (unit amount), subtotal (amount x quantity), tax_amount, tax {id, name, rate} (null when no tax rate applies), created_at, updated_at.
  • status (string): toSync, synced, hasErrors, submissionInProgress, or ineligibleToSync.
  • is_locked (boolean): Locked transactions cannot be regenerated or edited.
  • is_batchable (boolean), created_at, updated_at.

Path parameters:

  • salesOrder (required): Sales order ID.

Request

Responses

OK

Response Headers
    Content-Type