---
title: "Definir as faturas associadas a um movimento"
method: PUT
path: "/api/financeiro/movements/{movement_id}/invoices"
tags: ["Financeiro (Protected)"]
---

# Definir as faturas associadas a um movimento

`PUT /api/financeiro/movements/{movement_id}/invoices`

Replace the whole invoice set for a movement.

A set-REPLACE, not add/remove: the dialog edits the set as a unit, and a
replace is idempotent under a double-submit, so a retry cannot
double-allocate. Over-allocation (per invoice and per movement) is refused
in the DB layer inside the same transaction that writes.

## Path parameters

- `movement_id` integer, required

## Headers

- `x-api-token` string, nullable

## Request body

- MovementInvoicesRequest — Replace a movement's whole invoice set (#763).
  - `links` MovementInvoiceLink[] — Conjunto completo de faturas associadas. Lista vazia remove todas.
    - `fatura_id` integer, required — Faturas.ID
    - `amount` number, nullable — Valor alocado a esta fatura (positivo). Vazio = valor total do movimento.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/8492136eefc5/schema)
