Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/Goods-Inventory/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint lets any user record a revision comment for a storage location. The server timestamps the revision automatically and updates the location’s last_revision_date. It is called at the end of the department member inventory check flow, after the user has reviewed all items at a location.

Request

Method: POST
Path: /api/revisiones
Auth: None
Content-Type: application/json

Body Parameters

id_location
integer
required
The id_location of the storage location being revised. Must correspond to an existing location record.
comment
string
required
A free-text comment describing the outcome of the revision (e.g. the condition of items, any discrepancies noted).

Request Example

curl -X POST http://localhost:5000/api/revisiones \
  -H "Content-Type: application/json" \
  -d '{"id_location": 3, "comment": "Todos los equipos presentes y en buen estado"}'

Response

201 — Created

Returned when the revision is successfully recorded.
message
string
A confirmation message indicating the revision was saved.
{ "message": "Revisión registrada correctamente" }

400 — Bad Request

Returned when either id_location or comment is missing from the request body.
error
string
A description of the validation error.
{ "error": "id_location y comment son requeridos" }

Side Effects

Submitting a revision performs two write operations:
  1. Inserts a new Revision record with id_location, the provided comment, and a server-generated date_time_revision timestamp.
  2. Updates the corresponding Location record, setting last_revision_date to the same timestamp.
This means subsequent calls to GET /api/ubicaciones/{responsable_id} will reflect the new last_revision_date and last_revision values for the revised location.

Build docs developers (and LLMs) love