biterp

update_receivable

Referência da tool update_receivable do MCP Server do bitERP (Contas a receber).

Update Receivable · Contas a receber

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

Updates one internal accounts receivable record. Only the provided fields are changed. Field editability is decided by the record status alone, not by whether allocations exist: status pending or overdue accepts every field (an overdue receivable stays fully editable even when partly settled); status paid or partial accepts only notes and financial_category_id among the fields this tool exposes (the REST API additionally allows metadata); status cancelled, missing or unrecognized rejects every field. To change anything else on a paid or partial receivable, undo, reverse or unallocate its settlements until no settled amount is left - a single undo or a partial reversal may leave the record in partial and still restricted, because the status is recalculated from the allocations that remain.

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.
idstring (UUID)SimThe UUID of the receivable to update. A cancelled receivable - or one whose status is missing or unrecognized - rejects every field; one whose status is paid or partial accepts notes and financial_category_id.
customer_idstring (UUID)NãoNew customer ID. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
financial_account_idstring (UUID)NãoNew financial account ID (must be active). Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
payment_method_idstring (UUID)NãoNew payment method ID. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
financial_category_idstring (UUID)NãoFinancial category ID. Still accepted while the receivable status is paid or partial (but not when cancelled).
reference_codestring ou nullNãoNew reference code (null to clear, must be unique per tenant). Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
amountdecimal (string ou number)NãoNew amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, cannot be less than already allocated total. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
discount_amountdecimal (string ou number)NãoNew discount amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
surcharge_amountdecimal (string ou number)NãoNew surcharge amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
issue_datestringNãoNew issue date as calendar date YYYY-MM-DD. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
due_datestringNãoNew due date as calendar date YYYY-MM-DD. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
descriptionstringNãoNew description. Rejected while the receivable status is paid, partial or cancelled, or if that status is missing or unrecognized.
notesstringNãoNew notes. Still accepted while the receivable status is paid or partial (but not when cancelled).

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
idstring (UUID)—
tenant_idstring (UUID)—
record_numberinteger—
customer_idstring (UUID) ou null—
customerobject ou null—
customer.idstring (UUID)—
customer.legal_namestring—
customer.trade_namestring ou null—
customer.tax_idstring ou null—
customer.tax_id_typestring ou null—
customer.country_codestring—
financial_account_idstring (UUID)—
financial_accountobject ou null—
financial_account.idstring (UUID)—
financial_account.namestring—
financial_account.reference_codestring ou null—
financial_account.typestringValores: checking, savings, cash, digital_wallet, gateway, credit_card.
payment_method_idstring (UUID) ou null—
payment_methodobject ou null—
payment_method.idstring (UUID)—
payment_method.codestring—
payment_method.titlesobject—
financial_category_idstring (UUID) ou null—
financial_categoryobject ou null—
financial_category.idstring (UUID)—
financial_category.namestring—
financial_category.codestring ou null—
account_scope_maskobject—
account_scope_mask.counterpartyboolean—
account_scope_mask.categoryboolean—
account_scope_mask.balanceboolean—
reference_codestring ou null—
statusstringValores: pending, partial, paid, overdue, cancelled.
amountstring—
discount_amountstring—
surcharge_amountstring—
issue_datestring (date)—
due_datestring (date)—
paid_atstring (date-time) ou null—
installment_group_idstring (UUID) ou null—
installment_numberinteger ou null—
installment_countinteger ou null—
descriptionstring ou null—
notesstring ou null—
metadataobject—
created_by_user_idstring (UUID) ou null—
updated_by_user_idstring (UUID) ou null—
deleted_by_user_idstring (UUID) ou null—
created_atstring (date-time)—
updated_atstring (date-time)—
deleted_atstring (date-time) ou null—
sales_order_idstring (UUID) ou null—
sales_orderobject ou null—
sales_order.idstring (UUID)—
sales_order.reference_codestring ou null—
sales_order.record_numberinteger—
sales_order.statusstringValores: draft, confirmed, cancelled.
invoice_idstring (UUID) ou null—
invoiceobject ou null—
invoice.idstring (UUID)—
invoice.reference_codestring ou null—
invoice.record_numberinteger—
invoice.statusstringValores: draft, finalized, cancelled.
invoice.invoice_datestring (date)—
parent_receivable_idstring (UUID) ou null—
parentany ou null—
typestringValores: standard, interest, fine.
_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": "update_receivable",
        "arguments": {
            "tenant": "minha-empresa",
            "id": "<uuid>"
        }
    }
}

Nesta página