POST /api/transacciones/:id/reabrir
Reopens a transaction that is in the cerrado state, setting its status back to abierto. The existing monto_pagado is preserved so that previously paid amounts are not charged again — only the new monto_pendiente will need to be settled.
Authentication: Required
Required role: Any authenticated user
You can only reopen transactions whose
estado is cerrado. Calling this endpoint on an abierto or pendiente transaction returns a 400 error.Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <token> | Yes |
Path parameters
| Parameter | Type | Description |
|---|---|---|
| id | number | The transaction ID |
Response
Success (200)
Returns the updated transaction object withestado set to abierto.
Transaction ID.
Updated status — always
abierto after a successful reopen.Preserved amount from previous payments — not reset.
Total amount (unchanged until new items are added).
Timestamp of the reopen action.
Error responses
| Status | Description |
|---|---|
| 400 | Transaction is not in cerrado state |
| 401 | Unauthorized |
| 404 | Transaction not found |
Example
monto_total and create a fresh monto_pendiente that needs to be paid.