Financeiro (Protected)

Criar movimento com divisão por centros de custo

Changed on

Create a cost movement split across multiple PVs as cost centers.

Plain def, NOT async def: the body is blocking pyodbc with no awaits at all, so on the event loop it stalls every other request on this worker (the 2026-07-08 reconnect-herd incident — docs/claude/10-api-patterns.md; same note on /movements/cost). It became load-bearing when #937's invoice rule started reading the invoice and its other movements on this path.

post/api/financeiro/movements/cost-center

Request

  • Base URL
    https://api.multigest.pt (the document declares no server; this is the origin it was published from)
  • URL
    https://api.multigest.pt/api/financeiro/movements/cost-center
  • Auth
    API key in header x-api-token and API key in header x-origin-verify

Headers

x-api-tokenstring nullable

Request body

ValorTotalnumber required

Can be negative (cost) or positive (profit)

ValorIvanumber nullable
Descriçãostring required
Matrículainteger nullable
Fornecedorinteger nullable
MétodoPagamentointeger nullable
NrFaturastring nullable
DataFaturastring date-time nullable
Rubricainteger required
ATCUDinteger nullable

Invoice ID (Faturas.ID) to link to this movement

lucrointeger nullable

Override lucro value (0 or 1). If None, backend auto-calculates based on vehicle status.

Pagointeger nullable

0 = parent registered but not yet paid, 1 = paid. When omitted, backend derives from MétodoPagamento.

include_own_splitboolean

Also create a child movement in the ORIGIN PV for its own remaining share. Its value is derived by the backend from the total minus the destinations — never sent by the client.

Response

Successful Response

unknown required

Changes