Skip to main content
GET
/
api
/
v1
/
envios
/
mis-envios
Client Shipment History
curl --request GET \
  --url https://api.example.com/api/v1/envios/mis-envios
{
  "[]": [
    {
      "codigoSeguimiento": "<string>",
      "estado": "<string>",
      "fechaEnvio": "<string>",
      "fechaEntrega": "<string>",
      "precio": 123,
      "nombreDestinatario": "<string>",
      "origen": {
        "origen.codigoSucursal": "<string>",
        "origen.nombreSucursal": "<string>",
        "origen.ciudad": "<string>"
      },
      "destino": {},
      "encomienda": {
        "encomienda.peso": 123,
        "encomienda.dimensiones": "<string>",
        "encomienda.descripcion": "<string>"
      }
    }
  ]
}

Endpoint

GET /api/v1/envios/mis-envios
Retrieve all shipments sent by a client using their email address. This is a public-facing endpoint suitable for customer portals.

Query Parameters

correo
string
required
The email address of the client

Response

Returns an array of shipment records:
[]
array
Array of shipment objects
codigoSeguimiento
string
Tracking code
estado
string
Current shipment status
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
nombreDestinatario
string
Recipient’s name
origen
object
Origin branch information
origen.codigoSucursal
string
Branch code
origen.nombreSucursal
string
Branch name
origen.ciudad
string
City
destino
object
Destination branch information
encomienda
object
Package details
encomienda.peso
number
Weight in kg
encomienda.dimensiones
string
Dimensions
encomienda.descripcion
string
Description

Example Request

curl -X GET "http://localhost:8080/api/v1/envios/[email protected]"

Example Response

[
  {
    "codigoSeguimiento": "ENV-20260309-ABCD1234",
    "estado": "ENTREGADO",
    "fechaEnvio": "2026-03-09T10:30:00",
    "fechaEntrega": "2026-03-12T14:20:00",
    "precio": 25.50,
    "nombreDestinatario": "Juan Pérez",
    "origen": {
      "codigoSucursal": "LIM-001",
      "nombreSucursal": "Lima Centro",
      "ciudad": "Lima"
    },
    "destino": {
      "codigoSucursal": "CUS-001",
      "nombreSucursal": "Cusco Principal",
      "ciudad": "Cusco"
    },
    "encomienda": {
      "peso": 2.5,
      "dimensiones": "30x40x20 cm",
      "descripcion": "Documentos importantes"
    }
  },
  {
    "codigoSeguimiento": "ENV-20260305-WXYZ9876",
    "estado": "EN_TRANSITO",
    "fechaEnvio": "2026-03-05T08:15:00",
    "fechaEntrega": null,
    "precio": 35.00,
    "nombreDestinatario": "Ana López",
    "origen": {
      "codigoSucursal": "LIM-001",
      "nombreSucursal": "Lima Centro",
      "ciudad": "Lima"
    },
    "destino": {
      "codigoSucursal": "AQP-001",
      "nombreSucursal": "Arequipa Centro",
      "ciudad": "Arequipa"
    },
    "encomienda": {
      "peso": 5.0,
      "dimensiones": "50x60x30 cm",
      "descripcion": "Paquete con productos electrónicos"
    }
  }
]

Error Response

If the client is not found:
{
  "error": "ClienteNotFoundException",
  "message": "Cliente no encontrado con correo: [email protected]"
}

Empty Result

If the client exists but has no shipments:
[]
Results are ordered by shipment date, with most recent shipments first.

Alternative Endpoint

For paginated results and additional client information, use:
GET /api/v1/clientes/{clienteId}/envios?page=0&size=10
This endpoint requires the client ID and returns a paginated response with metadata:
{
  "clienteId": 1,
  "nombreCompleto": "María García",
  "correo": "[email protected]",
  "envios": {
    "content": [...],
    "totalElements": 15,
    "totalPages": 2,
    "size": 10,
    "number": 0
  }
}
This endpoint returns public information only. Sensitive details like delivery passwords are excluded.

Build docs developers (and LLMs) love