Skip to main content
All endpoints in this group return responses wrapped in ApiResponse<T>. See the API Overview for the envelope schema. RPC (Recipiente de Plástico Reutilizable) records track containers that are sent to CEDIS or a store and must be physically returned. A record is “pending” (pendienteRetorno: true) until all containers are returned.

GET /api/rpc/resumen

Returns aggregated KPI counts across all RPC records. The data field is a plain key-value map.

Response fields

data
object
Key-value summary map with the following keys:

Example request

curl -X GET http://localhost:8080/api/rpc/resumen

Example response

{
  "total": 1,
  "fecha": "2026-04-07T14:00:00.000000",
  "data": {
    "total_registradas": 120,
    "total_pendientes": 35,
    "total_completadas": 85,
    "total_entregado": 4800,
    "total_retornado": 4210,
    "total_faltante": 590
  }
}

GET /api/rpc/pendientes

Returns all RPC records where pendienteRetorno is true — containers that have been sent but not yet returned.

Example request

curl -X GET http://localhost:8080/api/rpc/pendientes

Example response

{
  "total": 2,
  "fecha": "2026-04-07T14:00:00.000000",
  "data": [
    {
      "idRpc": 7,
      "numeroCamion": "CAM-001",
      "departamento": "LACTEOS",
      "tipoRpc": "TIPO1",
      "cantidadEntregada": 10,
      "cantidadRetornada": 0,
      "fechaRegistro": "2026-04-07",
      "pendienteRetorno": true
    },
    {
      "idRpc": 9,
      "numeroCamion": "CAM-003",
      "departamento": "FRUTAS",
      "tipoRpc": "TIPO2",
      "cantidadEntregada": 5,
      "cantidadRetornada": 2,
      "fechaRegistro": "2026-04-06",
      "pendienteRetorno": true
    }
  ]
}

GET /api/rpc/completados

Returns all RPC records where the return process is complete (pendienteRetorno is false).

Example request

curl -X GET http://localhost:8080/api/rpc/completados

Example response

{
  "total": 1,
  "fecha": "2026-04-07T14:00:00.000000",
  "data": [
    {
      "idRpc": 3,
      "numeroCamion": "CAM-002",
      "departamento": "VERDURAS",
      "tipoRpc": "CAJA_CARTON",
      "cantidadEntregada": 8,
      "cantidadRetornada": 8,
      "fechaRegistro": "2026-04-05",
      "pendienteRetorno": false
    }
  ]
}

PUT /api/rpc/retorno/{idRpc}

Registers a physical return of containers for a given RPC record. Updates cantidadRetornada and sets pendienteRetorno to false when all containers have been returned.

Path parameters

idRpc
number
required
ID of the RPC control record to update.

Query parameters

cantidadRetornada
number
required
Number of containers being returned in this transaction.

Example request

curl -X PUT "http://localhost:8080/api/rpc/retorno/7?cantidadRetornada=10"

Example response

{
  "total": 1,
  "fecha": "2026-04-07T14:15:00.000000",
  "data": {
    "idRpc": 7,
    "numeroCamion": "CAM-001",
    "departamento": "LACTEOS",
    "tipoRpc": "TIPO1",
    "cantidadEntregada": 10,
    "cantidadRetornada": 10,
    "fechaRegistro": "2026-04-07",
    "pendienteRetorno": false
  }
}

RpcControl object schema

idRpc
number
Auto-generated primary key.
numeroCamion
string
Truck number associated with this RPC record.
departamento
string
Department enum: FRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, or FARMACIA.
tipoRpc
string
RPC type enum: TIPO1, TIPO2, TIPO3, CAJA_CARTON, OTRO, ENTREGA, or DISCREPANCIA.
cantidadEntregada
number
Total quantity of containers delivered. Must be at least 1.
cantidadRetornada
number
Total quantity of containers returned so far.
fechaRegistro
string
Date the record was created, in yyyy-MM-dd format.
pendienteRetorno
boolean
true if containers are still outstanding; false once all have been returned.