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 returns the complete revision history for a specific location, sorted by date_time_revision descending (newest first). It is used by the admin location-detail view to show the audit trail of all inspections carried out at that location.

Request

  • Method: GET
  • Path: /api/admin/locations/{id_location}/revisions
  • Auth: Bearer JWT

Path Parameters

id_location
integer
required
Primary key of the location whose revision history should be returned.

Request Example

curl "http://localhost:5000/api/admin/locations/3/revisions" \
  -H "Authorization: Bearer <token>"

Response

200 — Success

Returns an array of revision records ordered newest-first. An empty array [] is returned when no revisions have been recorded for the location.
[
  {
    "id": 7,
    "id_location": 3,
    "date_time_revision": "2024-11-15T10:30:00",
    "comment": "Todo en orden"
  },
  {
    "id": 3,
    "id_location": 3,
    "date_time_revision": "2024-10-02T14:15:00",
    "comment": "Falta etiqueta en balanza"
  }
]
id
integer
Primary key of the revision record.
id_location
integer
Foreign key referencing the location this revision belongs to.
date_time_revision
string
ISO 8601 timestamp recording when the inspection was carried out.
comment
string
Free-text comment left by the inspector describing the outcome of the inspection. May be null when no comment was provided.

404 — Location Not Found

Returned when no record matching id_location exists.
{ "error": "Location not found" }
To submit new revisions, use the public POST /api/revisiones endpoint — revision creation is intentionally available without authentication so that department members can record inspections without needing admin credentials.

Build docs developers (and LLMs) love