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.

The Goods Inventory API is a REST API built with Flask. It exposes two sets of endpoints: public endpoints (no auth required) for the department member lookup flow, and admin endpoints (JWT required) for inventory administration.

Base URL

The default base URL is http://localhost:5000. In production, set VITE_API_URL on the frontend to match your deployed backend URL.
http://localhost:5000

Authentication

Public endpoints require no authentication. Admin endpoints require a Bearer JWT token obtained from POST /api/login. Include it in every admin request:
Authorization: Bearer <access_token>
Requests to protected admin routes without a valid token will receive a 401 Unauthorized response.

Response Format

All responses are JSON. The following HTTP status codes are used:
StatusMeaning
200 OKSuccessful GET request
201 CreatedSuccessful POST request
400 Bad RequestMissing or invalid request parameters
401 UnauthorizedMissing or invalid JWT token
404 Not FoundRequested resource does not exist

CORS

The API is configured to accept requests from any origin. The following header is present on all responses:
Access-Control-Allow-Origin: *
The Authorization header is explicitly exposed to browsers, allowing frontend clients to read it when needed.

Endpoint Index

Public Endpoints

No authentication required.
MethodPathDescription
GET/api/responsables/buscarSearch responsible persons by name
GET/api/ubicaciones/{responsable_id}Get locations for a responsible person
GET/api/items/{ubicacionId}Get items at a location
POST/api/revisionesSubmit a revision comment
POST/api/loginAdmin login, returns JWT

Admin Endpoints

JWT required — include Authorization: Bearer <access_token> in every request.
MethodPathDescription
GET/api/admin/responsables/buscarAdmin: search responsible persons
GET/api/admin/ubicaciones/buscarAdmin: search locations
GET/api/admin/responsables/{id}/ubicacionesAdmin: get locations for a responsible
GET/api/admin/items/{ubicacion_id}Admin: get items at a location
GET/api/admin/locations/{id_location}/revisionsAdmin: get revision history for a location

Build docs developers (and LLMs) love