Sweep every uncategorized expense in the firm and assign a category from the existing list using AI classification.
Documentation Index
Fetch the complete documentation index at: https://docs.contazen.ro/llms.txt
Use this file to discover all available pages before exploring further.
category_id is often null. This endpoint sweeps every such row and assigns a category from the firm’s existing list — system defaults plus custom categories, merged. Existing categorizations are never overwritten.
Call repeatedly until remaining = 0. Each call processes up to cap expenses (a server-side constant returned in the response), so a large backlog can be drained in controlled passes rather than a single long-running request.
write permission on expenses.
BATCH_MAX_PER_CALL), so very large values are clamped silently. Omit for “process up to the server cap.”| Field | Meaning |
|---|---|
processed | Expenses inspected this call. |
categorized | Expenses that received a category_id. |
skipped | Classifier declined to assign a category (low confidence or no obvious match in the firm’s list). |
errors | Per-row failures — logged server-side, retryable on next call. |
remaining | Uncategorized expenses still queued. Stop when this hits 0. |
batch_size | Expenses per classifier call (informational). |
cap | Hard ceiling per invocation (informational). |
write permission on expensesai_unavailable — classifier call failed; safe to retryai_not_configured — AI categorization is not enabled on this deploymentUse your API key (sk_live_xxx or sk_test_xxx)
Optional override for the per-call cap. The server still
enforces its own BATCH_MAX_PER_CALL ceiling, so very
large values are silently clamped.
Batch run summary
Expenses inspected this call.
Expenses that received a category.
Classifier declined to assign a category (low confidence or no match).
Per-row failures (logged server-side).
Uncategorized expenses still in the queue. Call again until 0.
Expenses per classifier call (server constant).
Hard ceiling per invocation (server constant).