This page is a comprehensive reference for every REST endpoint consumed by the Corpointa frontend. Endpoints and their request/response shapes have been extracted directly from the frontend API modules inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/EricMartinez758/corpointa-frontend/llms.txt
Use this file to discover all available pages before exploring further.
src/features/*/api/. All endpoints (except POST /auth/login and POST /auth/refresh-token) require a valid Authorization: Bearer <token> header — see the Authentication page for how to obtain a token.
Authentication
POST /auth/login
Authenticate a user and receive a JWT.
The user’s national ID number (e.g.
"V-12345678").The user’s plaintext password.
Signed JWT to include as
Authorization: Bearer <token> on subsequent requests.Authenticated user object:
id_usuario, cedula, nombre1, apellido1, correo, rol.POST /auth/refresh-token
Exchange an existing (non-expired) token for a new one. No request body required — pass the current token in the Authorization header.
A freshly issued JWT with a new expiry.
Dashboard
GET /dashboard/stats
Returns a single aggregated statistics object used to populate the home dashboard. No query parameters or request body.
Total number of distinct material records in the catalogue.
Total number of stock records (one per material).
Count of materials whose current stock level is at or below their configured minimum (
stock_minimo).Number of control perceptivo (goods received) entries recorded in the current calendar month.
Number of dispatch (salida) records recorded in the current calendar month.
Monthly movement summary for the chart. Each element contains:
The most recent dispatch records. Each element contains:
Aggregated stock quantity broken down by category. Each element contains:
Materials
Materials are the core inventory items managed by Corpointa.GET /materiales
Returns the full list of materials, including joined categoria_nombre and medida_nombre fields.
Response: Material[]
GET /materiales/:id
Returns a single material record by its primary key.
Response: Material
POST /materiales
Creates a new material record.
Name or description of the material. Maximum 50 characters.
Foreign key referencing the material’s category (
id_categoria).Foreign key referencing the unit of measure (
id_medida).Optional physical storage location. Maximum 30 characters.
Material object, including its generated id_material.
PUT /materiales/:id
Updates an existing material. Accepts the same body fields as POST /materiales.
Response: The updated Material object.
DELETE /materiales/:id
Deletes a material by its primary key.
Response: 204 No Content
Control Perceptivo (Entries / Receipts)
Control perceptivo records represent goods-received notes — the formal record of materials arriving from a supplier.GET /controles-perceptivos
Returns the list of all control perceptivo headers.
Response: ControlPerceptivo[]
GET /controles-perceptivos/:id
Returns a single control perceptivo with its full detalles (line items) array.
Response: ControlPerceptivo — includes:
id_control,numero_control,numero_nota_entrega,fecha_controlfk_id_proveedor,proveedor_nombrenumero_requerimiento,numero_orden_compra,observacion,fotodetalles[]— each item:id_detalle_control,fk_id_material,material_descripcion,cantidad
POST /controles-perceptivos
Creates a new goods-received note, including its line items in a single request.
The unique control number for this receipt (e.g.
"ACTA 001-2025").ISO 8601 date string for the receipt date (e.g.
"2024-11-15").Foreign key referencing the supplier (
id_proveedor).The delivery note number from the supplier. Optional.
Internal requisition number. Optional.
Purchase order number. Optional.
Free-text observations or notes. Optional.
Array of line items. Each object must include:
fk_id_material(number, required) — primary key of the material receivedcantidad(number, required) — quantity receivedfoto(string, optional) — Base64-encoded image of the product
ControlPerceptivo object.
Dispatches (Salidas)
Dispatch records track outbound material movements — materials leaving the warehouse.GET /salidas
Returns the list of all dispatch records.
Response: Salida[] — each item includes id_salida, numero_salida, fecha_salida, existencia_validada, motivo_solicitud, fk_id_empleado_recibe, fk_id_gerente_finanzas, fk_id_presidente, observacion.
POST /salidas
Creates a new dispatch record, including its material line items in a single request.
The unique dispatch number (e.g.
"SAL-001").ISO 8601 date of the dispatch.
Foreign key of the employee receiving the materials (
id_empleado).Array of line items. Each object must include:
fk_id_existencia(number, required) — primary key of the stock record (id_existencia)cantidad_solicitada(number, required) — quantity requestedcantidad_entregada(number, required) — quantity actually deliveredobservacion(string, optional) — line-item note
Whether stock levels were verified before dispatch. Defaults to
false.Reason or justification for the dispatch. Optional.
Free-text observations. Optional.
Salida object.
GET /salidas/:id/pdf
Generates and streams an official dispatch note (acta de salida) as a PDF binary.
You must set
responseType: 'blob' on this request. The frontend uses window.URL.createObjectURL to trigger a file download named acta-salida-{id}.pdf. When calling this endpoint outside the browser (e.g. from a backend service), save the binary response body directly to a file.Content-Type: application/pdf).
Stock (Existencias)
Existencias track current stock levels for every material, plus the configured minimum and maximum thresholds.GET /existencias
Returns the complete stock list.
Response: Existencia[] — each item includes id_existencia, fk_id_material, material_descripcion, cantidad_actual, stock_minimo, stock_maximo.
PUT /existencias/:id
Updates the minimum and maximum stock thresholds for a stock record. Current stock (cantidad_actual) is managed automatically by the backend when entries and dispatches are recorded.
The minimum acceptable stock level. Triggers the low-stock alert when
cantidad_actual falls to or below this value.The maximum stock level target.
Existencia object.
Catalogs
The following resources follow a standard CRUD pattern. All supportGET /<resource> (list), POST /<resource> (create), PUT /<resource>/:id (update), and DELETE /<resource>/:id (delete), unless noted otherwise.
Categories — /categorias
| Method | Path | Description |
|---|---|---|
GET | /categorias | List all categories → Categoria[] |
GET | /categorias/:id | Get single category → Categoria |
POST | /categorias | Create category — body: { nombre: string } |
PUT | /categorias/:id | Update category — body: { nombre: string } |
DELETE | /categorias/:id | Delete category → 204 |
Category name. Maximum 50 characters.
Units of Measure — /unidades-medidas
| Method | Path | Description |
|---|---|---|
GET | /unidades-medidas | List all units → UnidadMedida[] |
GET | /unidades-medidas/:id | Get single unit → UnidadMedida |
POST | /unidades-medidas | Create unit — body: { nombre: string } |
PUT | /unidades-medidas/:id | Update unit — body: { nombre: string } |
DELETE | /unidades-medidas/:id | Delete unit → 204 |
Unit name (e.g.
"Kilogramo", "Metro", "Unidad"). Maximum 50 characters.Destinations — /destinos
Destinations represent internal departments or cost centres that receive dispatched materials.
| Method | Path | Description |
|---|---|---|
GET | /destinos | List all destinations → Destino[] |
GET | /destinos/:id | Get single destination → Destino |
POST | /destinos | Create destination — body: { nombre: string } |
PUT | /destinos/:id | Update destination — body: { nombre: string } |
DELETE | /destinos/:id | Delete destination → 204 |
Destination name. Maximum 50 characters.
Suppliers — /proveedores
| Method | Path | Description |
|---|---|---|
GET | /proveedores | List all suppliers → Proveedor[] |
GET | /proveedores/:id | Get single supplier → Proveedor |
POST | /proveedores | Create supplier |
PUT | /proveedores/:id | Update supplier |
The suppliers API module does not include a
DELETE endpoint.Supplier company name. Maximum 100 characters.
Tax ID (RIF) or national ID number of the supplier. Maximum 30 characters.
Contact telephone number. Maximum 30 characters.
Employees — /empleados
| Method | Path | Description |
|---|---|---|
GET | /empleados | List all employees → Empleado[] |
GET | /empleados/:id | Get single employee → Empleado |
POST | /empleados | Create employee |
PUT | /empleados/:id | Update employee |
DELETE | /empleados/:id | Delete employee → 204 |
Employee’s full name. Maximum 200 characters.
Foreign key referencing the employee’s assigned destination/department (
id_destino).National ID number. Optional. Maximum 30 characters.
Contact telephone number. Optional. Maximum 30 characters.
Whether the employee is currently active. Included in
PUT requests; defaults to true on creation.Users
System user accounts that can log into Corpointa. The backend routes use/users (not /usuarios).
| Method | Path | Description |
|---|---|---|
GET | /users | List all users → Usuario[] |
GET | /users/:id | Get single user → Usuario |
POST | /users | Create user |
PUT | /users/:id | Update user |
DELETE | /users/:id | Delete user → 204 |
National ID — used as the login identifier. Maximum 30 characters.
First given name. Maximum 50 characters.
First family name. Maximum 50 characters.
Second given name. Optional. Maximum 50 characters.
Second family name. Optional. Maximum 50 characters.
Password. Minimum 6 characters. Required on
POST; optional on PUT (omit to leave unchanged).Whether the user account is enabled. Defaults to
true.Audit Log
The audit log (bitacoras) is an append-only record of all state-changing actions performed in the system. It is read-only from the frontend — records are created server-side automatically.
GET /bitacoras
Returns all audit log entries.
Response: Bitacora[]
| Field | Type | Description |
|---|---|---|
id_bitacora | number | Primary key. |
fk_id_usuario | number | null | ID of the user who performed the action. |
nombre1 | string | null | First name of the acting user (denormalised). |
apellido1 | string | null | First surname of the acting user (denormalised). |
cedula | string | null | National ID of the acting user (denormalised). |
fecha_hora | string | ISO 8601 timestamp of the action. |
accion | string | Action type, e.g. "CREATE", "UPDATE", "DELETE". |
tabla_afectada | string | Name of the database table that was modified. |
id_registro_afectado | string | number | null | Primary key of the affected record. |
descripcion | string | null | Human-readable description of the change. |