Financeiro (Protected)

A fatura pode ser associada a um movimento novo?

Advisory pre-check for the #937 rule, used by the create dialogs.

Always 200: {"ok": true} or {"ok": false, "detail": "<motivo>"}. The dialogs call this while the user is still filling the form, so a refusal is data, not an error — anything that isn't a 200 with ok=false is treated by the frontend as "not checked" and lets the save through.

Deliberately NOT behind INVOICE_ATTACH_RULE_ON_CREATE: the UI may warn about an attach before the server starts refusing it. Company-scoped through get_fatura_by_id, like every other read of an invoice.

Plain def — synchronous pyodbc must not run on the event loop.

get/api/financeiro/invoices/{fatura_id}/attach-check

Path parameters

fatura_idinteger required

Query parameters

valornumber

Valor COM SINAL do movimento a criar (negativo = custo).

Valor COM SINAL do movimento a criar (negativo = custo).

Headers

x-api-tokenstring nullable

Response

Successful Response

{"stackTrail":"paths:/api/financeiro/invoices/{fatura_id}/attach-check:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

Changed in 1 of the 15 revisions of this API.1