Skip to main content

Base URL

All client endpoints are available at:
http://localhost:8080/api/v1/clientes

Available Endpoints

The Client Management Service provides functionality for managing clients and viewing their shipment history:

Client Operations

  • GET /api/v1/clientes - List all clients
  • GET /api/v1/clientes/ - Get client by ID
  • POST /api/v1/clientes - Create or update a client
  • GET /api/v1/clientes/search - Search clients by keyword

Client Shipment History

  • GET /api/v1/clientes//envios - Get paginated shipment history for a client
  • GET /api/v1/envios/mis-envios - Get shipment history by email (public endpoint)

Client Object Structure

Clients are represented with the following fields:
{
  "id": 1,
  "dni": "12345678",
  "nombreCompleto": "María García",
  "correo": "[email protected]",
  "telefono": "987654321"
}
id
number
Unique client identifier (auto-generated)
dni
string
National ID number (DNI)
nombreCompleto
string
Client’s full name
correo
string
Client’s email address
telefono
string
Client’s phone number
The search endpoint allows finding clients by any field containing the keyword:
curl -X GET "http://localhost:8080/api/v1/clientes/search?keyword=garcia"
This searches across DNI, name, email, and phone fields.

Pagination

Endpoints that return multiple results support pagination:
page
number
default:"0"
Page number (zero-indexed)
size
number
default:"5"
Number of items per page
Example:
curl -X GET "http://localhost:8080/api/v1/clientes/1/envios?page=0&size=10"
Client data is used for shipment tracking and notifications. Ensure email addresses are valid for delivery notifications.

Build docs developers (and LLMs) love