Skip to main content

Base URL

All endpoints are served from:
http://localhost:8080/api
This is a local development server. There is no production base URL configured in this project.

Authentication

This API does not use token-based authentication. Requests are sent directly to the server without any Authorization header or API key.

Response format

All endpoints (except /api/dashboard and a few CEDIS utility routes) wrap their response in a common ApiResponse<T> envelope:
total
number
Number of records returned. For list responses this equals the array length; for single-object responses this is 1.
fecha
string
ISO 8601 timestamp of when the response was generated (e.g. "2026-04-07T14:32:00.123").
data
T
The actual response payload — either a single object or an array of objects depending on the endpoint.

Example successful response

{
  "total": 2,
  "fecha": "2026-04-07T14:32:00.123456",
  "data": [
    {
      "idInventario": 1,
      "codigoBarras": "7501055300418",
      "descripcion": "Leche entera 1L",
      "cantidad": 48,
      "fechaCaducidad": "2026-04-14",
      "lote": "L-001",
      "fechaLlegada": "2026-04-07",
      "division": "PERECEDEROS",
      "departamento": "LACTEOS"
    }
  ]
}

Example curl pattern

curl -X GET http://localhost:8080/api/inventario \
  -H "Content-Type: application/json"

Resource groups

Dashboard

Aggregated KPI summary: expired items, items expiring soon, total inventory, reception counts, and pending RPC returns.

Inventario

Browse and filter the full inventory by expiry date, barcode, division, or department.

Recepciones CEDIS

Register and query truck-based CEDIS receptions including product details, discrepancies, and RPC data.

Ordenes de Compra

Create, retrieve, validate, and update the status of purchase orders.

RPC

Track reusable plastic container (RPC) returns: pending, completed, and bulk summaries.

Discrepancias

Record and list reception discrepancies when received quantities differ from expected.

HTTP status codes

StatusMeaning
200 OKRequest succeeded.
400 Bad RequestValidation failed or an invalid enum value was provided.
404 Not FoundThe requested resource does not exist (returned inline by some endpoints).
500 Internal Server ErrorAn unexpected server-side error occurred.

Error response format

Errors are wrapped in the same ApiResponse<T> envelope. The data field contains an error object:
{
  "total": 1,
  "fecha": "2026-04-07T14:35:10.456789",
  "data": {
    "error": "No value present",
    "timestamp": "2026-04-07T14:35:10.456789"
  }
}
For validation errors (400), the data field is a map of field names to error messages:
{
  "total": 1,
  "fecha": "2026-04-07T14:35:10.456789",
  "data": {
    "numeroCamion": "El número de camión es obligatorio",
    "totalEsperado": "El total esperado debe ser mayor a 0"
  }
}

Enum values

Several fields accept or return enum strings. Valid values are:
EnumValues
DivisionPERECEDEROS, NO_PERECEDEROS
DepartamentoFRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, FARMACIA
EstadoOrdenVIGENTE, EXPIRADA, CERRADA
EstadoRecepcionACEPTADA, RECHAZADA, PENDIENTE, PARCIAL, CERRADA
TipoRpcTIPO1, TIPO2, TIPO3, CAJA_CARTON, OTRO, ENTREGA, DISCREPANCIA