biterp

reverse_payable_settlement

Referência da tool reverse_payable_settlement do MCP Server do bitERP (Contas a pagar).

Reverse Payable Settlement · Contas a pagar

Somente leituraDestrutivaIdempotenteMundo aberto
NãoSimNãoNã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.

REVERSES a settlement with a counter-entry: the money left and came back (duplicate payment refunded, returned transfer or cheque, chargeback), so the bank statement keeps BOTH lines. Accepts manual and reconciled settlements, total or partial. To simply erase a wrongly registered payment, use reverse_payable_payment instead. Not for credit card statements (type card_statement): their payment is unlinked only in the bitERP web app (CARD_STATEMENT_UNDO_USE_STATEMENT_FLOW).

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.
payable_idstring (UUID)SimThe payable ID
transaction_idstring (UUID)SimThe settled financial transaction ID to reverse
reversal_datestringSimDate the money came back (YYYY-MM-DD). Becomes posted_at of the counter-entry.
amountdecimal (string ou number)NãoOptional partial reversal amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted; defaults to the full settled amount
reasonstringNãoOptional reason, stored on the reversal transaction and its memo
financial_transaction_idstring (UUID)NãoOptional existing statement line to link as the reversal, instead of generating a counter-entry

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
payableobject—
payable.idstring (UUID)—
payable.tenant_idstring (UUID)—
payable.record_numberinteger—
payable.supplier_idstring (UUID) ou null—
payable.supplierobject ou null—
payable.financial_account_idstring (UUID)—
payable.financial_accountobject ou null—
payable.payment_method_idstring (UUID) ou null—
payable.payment_methodobject ou null—
payable.financial_category_idstring (UUID) ou null—
payable.financial_categoryobject ou null—
payable.account_scope_maskobject—
payable.purchase_invoice_idstring (UUID) ou null—
payable.purchase_invoiceobject ou null—
payable.parent_payable_idstring (UUID) ou null—
payable.parentobject ou null—
payable.statement_payable_idstring (UUID) ou null—
payable.typestringValores: standard, interest, fine, bank_fee, refund, chargeback, card_statement.
payable.reference_codestring ou null—
payable.statusstringValores: pending, partial, paid, overdue, cancelled.
payable.amountstring—
payable.discount_amountstring—
payable.surcharge_amountstring—
payable.issue_datestring (date)—
payable.due_datestring (date)—
payable.paid_atstring (date-time) ou null—
payable.installment_group_idstring (UUID) ou null—
payable.installment_numberinteger ou null—
payable.installment_countinteger ou null—
payable.descriptionstring ou null—
payable.notesstring ou null—
payable.metadataobject—
payable.created_by_user_idstring (UUID) ou null—
payable.updated_by_user_idstring (UUID) ou null—
payable.deleted_by_user_idstring (UUID) ou null—
payable.created_atstring (date-time)—
payable.updated_atstring (date-time)—
payable.deleted_atstring (date-time) ou null—
payable.remaining_amountstring—
payable.settlementsarray de objetos—
payable.hidden_settlementsarray de objetos—
payable.charge_titlesarray de objetos—
payable.offsetsarray de objetos—
payable.reversible_manual_paymentsarray de objetos—
reversal_transaction_idstring (UUID)—
reversal_allocation_idstring (UUID)—
financial_account_idstring (UUID)—
remaining_amountstring—
_tenantobject—
_tenant.idstring (UUID)—
_tenant.slugstring—
_tenant.company_namestring—

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": "reverse_payable_settlement",
        "arguments": {
            "tenant": "minha-empresa",
            "payable_id": "<uuid>",
            "transaction_id": "<uuid>",
            "reversal_date": "2026-01-15"
        }
    }
}

Nesta página