Skip to main content

Re-map Unsynced Journal Entries

POST 

/api/product-account-rules/remap

After changing rules, move existing journal entries onto the accounts the rules now give. Only entries that are not synced to your accounting integration (QuickBooks Online / Xero) and not in a locked period are changed; each is re-derived from its source document and rewritten in place (same entry id and status). Lines with a manual account re-map are kept, and an entry whose manual re-map would be lost is skipped.

Required scope: accounting:write

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

Authentication: Requires Bearer token with the accounting:write scope.

Request body fields:

  • dry_run (boolean, required) — true returns the counts only; false starts the re-map in the background.

Dry-run response (data): eligible (entries the re-map would change), skipped_synced (already synced — never changed), skipped_locked (in a locked period — never changed), skipped_other (mid-sync, failed, needing attention or batched — left alone), skipped_frozen (issued invoices — they keep the revenue and discount accounts they were issued with), skipped_unsupported (inventory assembly entries — their lines do not record which product they belong to, so they are not re-mapped). eligible is exact: each candidate entry is re-derived in memory through the same builder the re-map uses and compared with its stored lines. Up to 2,000 candidates are checked; past that estimated is true and eligible is a lower bound ("at least"). candidates (unsynced entries with a product line — every entry the run will visit) and evaluated (candidates checked) say how much was checked. The skipped counts are estimates.

Real run response (data): tracked_job_id — poll GET /api/tracked-job-logs/{trackedJobLog} for progress and the final counts.

Request​

Responses​

OK

Response Headers
    Content-Type