Reordenar regras automáticas
POST/automatic-rules/reorder
Rewrites position for one (company_id, scope) group so it matches ordered_ids (first → position 1). Requires scope finance.automatic_rules.write. ordered_ids must be the COMPLETE ordered set for that group — a partial or foreign set is rejected (422). Idempotent via X-Idempotency-Key. Answers 200 { data: { ordered_ids } }.
Requisição
Respostas
- 200
- 400
- 401
- 403
- 409
- 422
- 429
- 500
Positions rewritten. Echoes the ids in the order they now hold.
Malformed JSON body.
Missing / invalid / expired / revoked token.
Token lacks the finance.automatic_rules.write scope.
X-Idempotency-Key reused with a different body.
Schema validation failure; company_id not in the tenant; or ordered_ids is not the exact set for (company, scope).
Rate limit exceeded for this token. Reads and writes have separate budgets, both on a 1-hour sliding window. The response carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After — wait out Retry-After rather than retrying immediately.
Unhandled server error.