Skip to main content
GET
/
api
/
v1
/
envios
List All Shipments
curl --request GET \
  --url https://api.example.com/api/v1/envios
{
  "[]": [
    {
      "id": 123,
      "codigoSeguimiento": "<string>",
      "estado": "<string>",
      "fechaEnvio": "<string>",
      "fechaEntrega": "<string>",
      "precio": 123,
      "placa": "<string>",
      "nombreDestinatario": "<string>",
      "dniDestinatario": "<string>",
      "remitente": {},
      "sucursalOrigen": {},
      "sucursalDestino": {},
      "encomienda": {}
    }
  ]
}

Endpoint

GET /api/v1/envios
Retrieve a list of all shipments in the system. This endpoint returns complete shipment information for administrative purposes.

Response

Returns an array of shipment objects:
[]
array
Array of shipment objects
id
number
Unique shipment identifier
codigoSeguimiento
string
Tracking code (format: ENV-)
estado
string
Current shipment status (PENDIENTE, EN_TRANSITO, DISPONIBLE, ENTREGADO, CANCELADO)
fechaEnvio
string
Date and time when shipment was created
fechaEntrega
string
Date and time when shipment was delivered (null if not delivered)
precio
number
Shipment price
placa
string
Vehicle plate number assigned to shipment (null if not assigned)
nombreDestinatario
string
Recipient’s name
dniDestinatario
string
Recipient’s DNI
remitente
object
Sender information (ClienteDTO)
sucursalOrigen
object
Origin branch office (SucursalDTO)
sucursalDestino
object
Destination branch office (SucursalDTO)
encomienda
object
Package details (EncomiendaDTO)

Example Request

curl -X GET http://localhost:8080/api/v1/envios

Example Response

[
  {
    "id": 1,
    "codigoSeguimiento": "ENV-1709940000000",
    "estado": "EN_TRANSITO",
    "fechaEnvio": "2024-03-08T10:30:00",
    "fechaEntrega": null,
    "precio": 45.50,
    "placa": "ABC-123",
    "nombreDestinatario": "Carlos Rodríguez",
    "dniDestinatario": "87654321",
    "remitente": {
      "id": 1,
      "dni": "12345678",
      "nombreCompleto": "María García",
      "correo": "[email protected]",
      "telefono": "987654321"
    },
    "sucursalOrigen": {
      "id": 1,
      "codigoSucursal": "LIM-001",
      "nombreSucursal": "Lima Centro",
      "direccion": "Av. Abancay 123",
      "ciudad": "Lima"
    },
    "sucursalDestino": {
      "id": 2,
      "codigoSucursal": "CUS-001",
      "nombreSucursal": "Cusco Principal",
      "direccion": "Av. El Sol 456",
      "ciudad": "Cusco"
    },
    "encomienda": {
      "id": 1,
      "peso": 5.2,
      "dimensiones": "30x40x50",
      "descripcion": "Documentos importantes"
    }
  }
]
This endpoint returns all shipments without pagination. For large datasets, consider using the filtered endpoints like GET /api/v1/envios/estado/ with pagination.

Build docs developers (and LLMs) love