Skip to main content

Documentation 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.

Destinations (destinos) are the named locations — offices, workshops, warehouses, or departments — that serve as delivery points for material dispatches. Because employees must be linked to a destination, and dispatches are directed to a destination, this is a foundational reference table that should be populated before other data is entered. Manage all destinations at the /destinos route.

Data Model

The destination record is intentionally minimal:
FieldTypeConstraintsDescription
id_destinointegerPrimary key, auto-generatedUnique numeric identifier for the destination
nombrestringRequired, max 50 charsHuman-readable name for the location

Features

Simple CRUD Table

The destinations list displays all location names in a clean table. Records can be created, edited, and deleted directly from the table via inline dialogs.

Referenced by Employees

Every employee record requires a valid fk_id_destino. The employee creation form populates its destination dropdown from this table.

Referenced by Dispatches

Material dispatch records target a specific destination, allowing you to track where inventory was sent and to whom.

Delete Confirmation

Attempting to delete a destination that is currently assigned to employees or dispatches may be prevented by the backend to preserve referential integrity.
Set up your destinations before creating employees or processing dispatches. The employee form’s destination dropdown and the dispatch routing both depend on this table being populated.

API Reference

All endpoints operate on the /destinos resource and return or accept JSON.

List Destinations

GET /destinos
Destino[]
Returns an array of all destination records.
GET /destinos
Response
[
  { "id_destino": 1, "nombre": "Sede Principal" },
  { "id_destino": 2, "nombre": "Almacén Norte" },
  { "id_destino": 3, "nombre": "Taller de Mantenimiento" }
]

Get Single Destination

GET /destinos/:id
Destino
Returns a single destination by its id_destino.
GET /destinos/2

Create Destination

POST /destinos
Destino
Creates a new destination. The id_destino is assigned by the server.
POST /destinos
Content-Type: application/json

{
  "nombre": "Oficina Regional Sur"
}

Update Destination

PUT /destinos/:id
Destino
Updates the name of an existing destination. All employees and dispatches referencing this destination will reflect the updated name automatically.
PUT /destinos/2
Content-Type: application/json

{
  "nombre": "Almacén Norte (Ampliado)"
}

Delete Destination

DELETE /destinos/:id
void
Permanently removes a destination record.
DELETE /destinos/2

Field Validation

nombre
string
required
Human-readable name for the delivery location. Must be between 1 and 50 characters. Use a name that is recognizable to dispatchers and warehouse staff, such as "Taller Eléctrico" or "Oficina de Compras".

Build docs developers (and LLMs) love