biterp

get_credit_card_statement_reconciliation

Referência da tool get_credit_card_statement_reconciliation do MCP Server do bitERP (Conciliação da fatura de cartão).

Get Credit Card Statement Reconciliation · Conciliação da fatura de cartão

Somente leituraDestrutivaIdempotenteMundo aberto
SimNãoSimNão

Descrição

A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.

Returns the reconciliation of one credit card statement: the statement value in bitERP (biterp_total) next to what the bank charged (summary.bank_total), the counts per situation, and the statement lines filtered by situation with cursor-based pagination. A pending line is a bank debit without a card purchase; card_match says whether a purchase recorded by hand matches it (exact = Confere, amount_mismatch = Valor diferente, ambiguous = Vários, none = Sem compra). A line recorded by hand with its purchase counts as reconciled even before the bank line arrives (summary.manual_reconciled_count), so a difference between biterp_total and bank_total comes from pending lines or from those manual lines. bank_source none = the card has no bank data to reconcile. A future statement has no lines and is refused. Read only.

Parâmetros

ParâmetroTipoObrigatórioDescrição
tenantstringSimDefines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely.
card_account_idstring (UUID)SimThe credit card account ID. Find it with list_financial_accounts (type credit_card).
statement_idstring (UUID)SimThe statement ID (statement_id from get_credit_card_open_statement or list_credit_card_statements)
statusstringNãoLines to return: pending (default), reconciled, ignored, or all (every line that is not ignored) Valores: all, pending, reconciled, ignored.
originstringNãomanual = only the lines recorded by hand in bitERP with a card purchase (combine with status=reconciled to list them) Valores: manual.
cursorstringNãoCursor for pagination. Use next_cursor from the previous response.
limitintegerNãoMax lines per page (default 10, max 100)

Resposta

O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).

CampoTipoDescrição
card_account_idstring (UUID)—
statementobject—
statement.statement_idstring (UUID)—
statement.record_numberintegerTenant-scoped sequential number of the statement payable, shown in bitERP as CPG-<n> for Brazilian companies (prefix depends on the tenant country)
statement.phasestringValores: open, future, in_correction, closed.
statement.period_startstring (date)—
statement.period_endstring (date)—
statement.closes_onstring (date)—
statement.due_datestring (date)—
statement.biterp_totalstring ou nullThe statement value in bitERP: the forming total while open or in correction, the statement amount once closed; null when unknown
statement.awaiting_closeboolean—
bank_sourcestringWhere the bank data of the card comes from: connection, ofx, import (PDF) or none (no bank data: nothing to reconcile) Valores: connection, ofx, import, none.
summaryobject—
summary.transaction_countintegerLines of the statement that are not ignored
summary.reconciled_countinteger—
summary.pending_countintegerConfere + Valor diferente + Vários + Sem compra
summary.ignored_countinteger—
summary.pending_amountstring—
summary.reconciled_amountstring—
summary.exact_match_countintegerPending lines with one manual purchase that matches (Confere)
summary.manual_reconciled_countintegerReconciled lines recorded by hand in bitERP: they count as reconciled even without a bank line (list them with origin=manual)
summary.bank_line_countintegerLines that came from bank data (OFX, bank connection or PDF import), not ignored
summary.bank_reconciled_countinteger—
summary.bank_totalstringWhat the bank charged in the statement (minus the sum of the bank lines, positive = debt): compare it with biterp_total
summary.bank_last_posted_onstring (date) ou nullDay of the last bank line of the statement
statusstringSituation filter applied to lines Valores: all, pending, reconciled, ignored.
linesarray de objetos—
lines[].idstring (UUID)The card line: pass it as transaction_id to reconcile_credit_card_line or create_credit_card_purchase_from_line
lines[].posted_onstring (date)—
lines[].amountstringNegative = debit (purchase, fee), positive = credit
lines[].namestring ou null—
lines[].sourcestringmanual, ofx, integration (bank connection) or another origin
lines[].transfer_idstring (UUID) ou nullSet on a transfer leg (statement payment or advance payment)
lines[].card_purchaseobject ou nullThe card purchase this line belongs to; null when the line has no purchase
lines[].card_installmentobject ou nullInstallment the bank connection says the line is; null otherwise
lines[].card_refundobject ou nullThe purchase this credit line refunds; null when unlinked
lines[].card_matchobject ou nullOnly on pending bank lines: the manual card purchase that may be the same purchase. Null otherwise
lines[].ignored_atstring (date-time) ou null—
lines[].ignored_by_namestring ou null—
has_next_pageboolean—
next_cursorstring ou null—

Exemplo de chamada

Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "get_credit_card_statement_reconciliation",
        "arguments": {
            "tenant": "minha-empresa",
            "card_account_id": "<uuid>",
            "statement_id": "<uuid>"
        }
    }
}

Nesta página