Financeiro (Protected)

Criar movimento de receita

Changed on

Criar um movimento de receita.

O campo lucro é definido como 1 por defeito.

Plain def, NOT async def: the body is blocking pyodbc, which on the event loop stalls every other request on this worker (the 2026-07-08 reconnect-herd incident — docs/claude/10-api-patterns.md; same note on get_vehicles above and routes/toc.py::create_invoice). FastAPI runs def handlers in a threadpool. Became load-bearing when the #931 counterparty check added two more round-trips to the invoice-attach path.

post/api/financeiro/movements/profit

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/profit
  • 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.

Response

Successful Response

IDinteger required
ValorTotalnumber required
ValorIvanumber nullable required
Descriçãostring required
Matrículainteger nullable required
Fornecedorinteger nullable required
MétodoPagamentointeger nullable required
Pagoboolean required
DataPagamentostring date-time nullable required
NrFaturastring nullable required
DataFaturastring date-time nullable required
Rubricainteger required
ATCUDinteger nullable required
IgnoraAtcudboolean nullable required
maininteger nullable required
lucroboolean nullable required
DataRegistostring date-time nullable required
RubricaDescricaostring nullable required
ViaturaMatriculastring nullable required
ViaturaIDinteger nullable required
MetodoPagamentoDescricaostring nullable required
FaturaGstring nullable required
ClienteNomestring nullable required
ClienteIDinteger nullable required
DocumentoIDinteger nullable required
DocumentoNomestring nullable
invoice_split_syncobject nullable
counterparty_warningobject nullable
documents_removedinteger[] nullable
invoice_linksobject[] nullable
split_parent_idinteger nullable
split_parent_pagoboolean nullable
split_children_countinteger nullable
split_children_totalnumber nullable
row_versioninteger nullable

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status