Skip to main content
Most endpoints in this group return responses wrapped in ApiResponse<T>. The truck listing and close endpoints return their own shapes — details are noted per endpoint. See the API Overview for the envelope schema.

GET /api/recepciones/cedis/camiones

Returns a list of all trucks that have at least one reception record, along with a total count and the response timestamp.
This endpoint does not use the ApiResponse<T> wrapper. It returns its own envelope.

Response fields

data
object[]
Array of truck summary objects. The exact fields within each object depend on the service projection.
total
number
Number of trucks in the list.
fecha
string
ISO 8601 timestamp of when the response was generated.

Example request

curl -X GET http://localhost:8080/api/recepciones/cedis/camiones

Example response

{
  "data": [
    { "numeroCamion": "CAM-001" },
    { "numeroCamion": "CAM-002" }
  ],
  "total": 2,
  "fecha": "2026-04-07T14:00:00.123456"
}

GET /api/recepciones/cedis/camion/{numeroCamion}

Returns the complete reception record for a given truck, including all product details, discrepancies, and RPC container data. Returns 404 with an inline message if the truck has no registered load.

Path parameters

numeroCamion
string
required
Truck number identifier (e.g. CAM-001).

Response fields

data
object
A RecepcionCedisResponseDTO object.

Example request

curl -X GET http://localhost:8080/api/recepciones/cedis/camion/CAM-001

Example response

{
  "total": 1,
  "fecha": "2026-04-07T14:05:00.000000",
  "data": {
    "recepcion": {
      "idRecepcion": 10,
      "numeroCamion": "CAM-001",
      "departamento": "LACTEOS",
      "division": "PERECEDEROS",
      "fechaRegistro": "2026-04-07T08:00:00",
      "estado": "PARCIAL",
      "totalEsperado": 120,
      "totalRecibido": 115
    },
    "detalles": [
      {
        "idProducto": 2,
        "nombreProducto": "Leche entera 1L",
        "cantidadRecibida": 115,
        "cantidadEsperada": 120,
        "lote": "L-001",
        "fechaCaducidad": "2026-04-14",
        "cantidadRpc": 10,
        "tipoRpc": "TIPO1"
      }
    ],
    "discrepancias": [
      {
        "idDiscrepancia": 4,
        "totalEsperado": 120,
        "totalRecibido": 115,
        "totalFaltante": 5
      }
    ],
    "rpc": [
      {
        "idRpc": 7,
        "tipoRpc": "TIPO1",
        "cantidadEntregada": 10,
        "cantidadRetornada": 0,
        "pendienteRetorno": true,
        "fechaRegistro": "2026-04-07"
      }
    ]
  }
}

GET /api/recepciones/cedis/camion/{numeroCamion}/departamento/{departamento}

Returns the reception summary for a specific truck and department combination.

Path parameters

numeroCamion
string
required
Truck number identifier.
departamento
string
required
Department name. Must be one of: FRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, FARMACIA.

Example request

curl -X GET http://localhost:8080/api/recepciones/cedis/camion/CAM-001/departamento/LACTEOS

Example response

{
  "total": 1,
  "fecha": "2026-04-07T14:10:00.000000",
  "data": {
    "recepcion": {
      "idRecepcion": 10,
      "numeroCamion": "CAM-001",
      "departamento": "LACTEOS",
      "division": "PERECEDEROS",
      "fechaRegistro": "2026-04-07T08:00:00",
      "estado": "PARCIAL",
      "totalEsperado": 120,
      "totalRecibido": 115
    },
    "detalles": [],
    "discrepancias": [],
    "rpc": []
  }
}

POST /api/recepciones/cedis

Registers a new CEDIS reception with all its product line items. Returns an RecepcionAuditoriaDTO with the full reception snapshot.

Request body

numeroCamion
string
required
Truck number identifier.
departamento
string
required
Department name string. Converted to the Departamento enum server-side. Must be one of: FRUTAS, VERDURAS, LACTEOS, CARNES, EMBUTIDOS, MULTIPLE, FARMACIA.
division
string
required
Division name string. Must be one of: PERECEDEROS, NO_PERECEDEROS.
totalEsperado
number
required
Total number of units expected per the invoice. Must be greater than 0.
detalles
object[]
required
List of product line items.

Example request

curl -X POST http://localhost:8080/api/recepciones/cedis \
  -H "Content-Type: application/json" \
  -d '{
    "numeroCamion": "CAM-001",
    "departamento": "LACTEOS",
    "division": "PERECEDEROS",
    "totalEsperado": 120,
    "detalles": [
      {
        "idProducto": 2,
        "cantidadRecibida": 115,
        "cantidadEsperada": 120,
        "lote": "L-001",
        "fechaCaducidad": "2026-04-14",
        "cantidadRpc": 10,
        "tipoRpc": "TIPO1"
      }
    ]
  }'

Example response

{
  "recepcion": {
    "idRecepcion": 10,
    "numeroCamion": "CAM-001",
    "departamento": "LACTEOS",
    "division": "PERECEDEROS",
    "fechaRegistro": "2026-04-07T08:00:00",
    "estado": "PARCIAL",
    "totalEsperado": 120,
    "totalRecibido": 115
  },
  "detalles": [
    {
      "idDetalleCedis": 1,
      "producto": "Leche entera 1L",
      "cantidadRecibida": 115,
      "lote": "L-001",
      "fechaCaducidad": "2026-04-14",
      "cantidadRpc": 10
    }
  ],
  "discrepancias": [
    {
      "idDiscrepancia": 4,
      "totalEsperado": 120,
      "totalRecibido": 115,
      "totalFaltante": 5
    }
  ],
  "rpc": [
    {
      "idRpc": 7,
      "tipoRpc": "TIPO1",
      "cantidadEntregada": 10,
      "cantidadRetornada": 0,
      "pendienteRetorno": true,
      "fechaRegistro": "2026-04-07"
    }
  ]
}

PUT /api/recepciones/cedis/{id}/cerrar

Closes an open reception, finalizing its status and computing audit data.

Path parameters

id
number
required
Numeric ID of the reception to close (idRecepcion).

Example request

curl -X PUT http://localhost:8080/api/recepciones/cedis/10/cerrar

Example response

{
  "recepcion": {
    "idRecepcion": 10,
    "numeroCamion": "CAM-001",
    "departamento": "LACTEOS",
    "division": "PERECEDEROS",
    "fechaRegistro": "2026-04-07T08:00:00",
    "estado": "FINALIZADA",
    "totalEsperado": 120,
    "totalRecibido": 115
  },
  "detalles": [],
  "discrepancias": [],
  "rpc": []
}