Repair Facilitator Tax
POST/api/ledger/facilitator-tax/repair
Starts a background repair that posts, for each requested month and channel, the reclass entry the impact report proposes: it moves marketplace-facilitator tax out of Sales Tax (and squares the accounts the settlement codes landed on). Each row is recomputed when it runs, so re-running posts only what is still owed. An earlier repair entry in scope whose journal failed to post is queued again (reported with outcome retried) rather than posted twice. A month whose settlement tax pair is half-classified (impact row incomplete_settlement_tax) is skipped with outcome needs_review. Months on or before the lock date follow the locked-period policy (redate: the entry is dated into the first open period; block: the month is skipped).
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
- periods (required array, 1–36 items): months to repair, each YYYY-MM, no duplicates.
- integration_instance_ids (optional array of integers): limit the repair to these channels; an earlier repair entry for another channel that failed to post is not retried. Omit for every marketplace-facilitator channel.
- counter_accounts (optional object): per channel,
{"<integration_instance_id>": <nominal_code_id>}— the account that channel's payments deposited to, used for tax the documents credited to Sales Tax that no settlement code accounts for. It must be a bank account or a clearing account (a current asset with "clearing" in its name; the status endpoint'scounter_account_optionslists them). A row that needs one and has none is skipped. The receivable, payable, Sales Tax and facilitator clearing accounts, and every other account type, are refused.
Refused with 422 when the clearing treatment is not adopted, no Sales Tax account is mapped, sales or settlement documents are still waiting to post, a counter account is invalid, or another adoption or repair is running.
Returns the id of the background job to poll for progress.
Authentication: Requires Bearer token (signed-in user session; not available to Personal Access Tokens). Requires the accounting.sync permission.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.