Use Rule For All Flagged Products
POST/api/product-account-map/anomalies/use-rule
Hand every flagged product of one account type back to the account rules. The work runs in the background as a tracked job ("Clearing overrides to use account rules: <type>"): for every current anomaly of that type (not just one page) whose account comes from the product's own override while an account rule would otherwise apply, the override is cleared and the product's rule assignment is recomputed in bounded chunks, so it posts to the rule's account from now on. Running it again picks up any overrides still left.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Anomalies you kept (dismissed) are not anomalies and are left alone, as are flagged products no rule covers — they keep their override. Journal entries already posted keep their accounts; use Re-map Unsynced Entries to bring unsynced entries onto the new accounts. Each cleared override is recorded in the product's activity log.
Authentication: Requires Bearer token with the accounting:write scope and the manage-accounting-settings permission.
Request body fields:
account_type(string, required) — sales, cogs, inventory, inventory_in_transit, accrued_purchases or discount.
Response (data): tracked_job_id — the tracked job to poll at GET /api/tracked-job-logs/{trackedJobLog} (its results.overrides_cleared is the final count), or null when nothing qualifies; products — how many flagged products will have their override cleared (0 when nothing qualifies).
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
Response Headers
Unprocessable Entity
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.