Skip to main content

Save Reconciliation Baselines

PUT 

/api/ledger/close/baselines

Save the full set of baselines for one kind (and, for trial_balance, one accounting connection) under one written reason. Baselines record differences between SKU.io and the accounting provider (or between A/R / A/P and their open documents) that were already there before SKU.io's books started, each with a written reason, so the month-end close checks flag only new differences. They are reporting only: nothing is posted, and nothing sent to the provider changes.

Required scope: accounting:write

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

Body:

  • kind (required) — trial_balance or control_account.
  • connection_id (integer) — required for trial_balance: an accounting connection that supports trial-balance reconciliation. Ignored for control_account.
  • reason (required, string, 3–2000 chars) — why these differences are carried; kept with each baseline, and with any baseline this save clears.
  • as_of_date (optional, Y-m-d, trial_balance only) — the day the amounts were measured at; send the as_of_date the proposal returned. Defaults to the day before your first open month. Saving the same amount at a different day re-records it at that day.
  • accounts (required, array, may be empty, max 500) — the baselines to hold:
    • accounts.*.account_code (required, string, max 64, distinct) — the account code, or receivable / payable for control_account.
    • accounts.*.account_name (nullable string, max 255).
    • accounts.*.amount (required, number) — the carried difference, SKU.io minus provider (or ledger minus documents). 0 clears the account.

Accounts left out are cleared; an empty list clears them all. An unchanged amount keeps its existing row; a changed one supersedes it. The as-of date is set by the server (the day before the accounting start date, or the payment-posting start date). A baseline only applies to periods ending after its as-of date. Returns the refreshed overview (same shape as List Reconciliation Baselines).

Authentication: Bearer token. Requires the accounting settings permission.

Request​

Responses​

OK

Response Headers
    Content-Type