Skip to main content

Preview Bill Sync Change

POST 

/api/accounting/bill-sync/preview

Preview what a proposed expense bill mode and start date would do to existing expense bills, for the whole connection or for one supplier. Writes nothing.

Required scope: accounting:write

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

Every bill in scope is counted in exactly one bucket. Without supplier_id the scope is every supplier that has no rule of its own on the connection.

Request fields:

  • mode (required) - send, provider_owned or sku_only.
  • start_date (optional, Y-m-d) - the proposed start date.
  • supplier_id (optional, integer) - preview one supplier's rule instead of the connection setting. Must be an existing supplier.
  • connection_id (optional, integer) - defaults to the first Xero / QuickBooks connection.

Response fields:

  • total - expense bills in scope.
  • already_linked - already in the provider; they stay linked.
  • would_send - would be sent.
  • possible_duplicates - look like a bill the provider already has; they wait for a person (see List Waiting Bill Duplicates).
  • before_start_date - dated before the start date and left alone.
  • not_sent - stay in SKU.io under a mode that does not send.
  • message - the counts as one plain sentence.

Returns 422 when there is no Xero or QuickBooks connection or a field is invalid.

Authentication: Requires Bearer token. Scope: accounting (read/write). The user must hold the Manage bill sync permission (accounting.bill_sync).

Request​

Responses​

OK

Response Headers
    Content-Type