Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt

Use this file to discover all available pages before exploring further.

The Clients API manages the people and organizations that receive field service work orders. Each client record stores contact details, document identification, and a unique client code used across the system. All write operations require authentication.
All endpoints require a valid Bearer token unless otherwise stated. Include Authorization: Bearer <token> in every request header.

List active clients


GET /api/clientes Returns a paginated list of all clients where vigente = true.

Query parameters

page
number
default:"0"
Zero-based page index.
size
number
default:"20"
Number of records per page.

Response fields

content
ClienteResponse[]
Array of client objects for the current page.
totalElements
number
Total number of active clients.
totalPages
number
Total number of pages.
number
number
Current page index (zero-based).
size
number
Page size used for this response.
curl --request GET \
  --url 'https://your-api.example.com/api/clientes?page=0&size=20' \
  --header 'Authorization: Bearer <token>'

Get client by ID


GET /api/clientes/{id} Returns a single client record.

Path parameters

id
number
required
The numeric ID of the client.
curl --request GET \
  --url 'https://your-api.example.com/api/clientes/42' \
  --header 'Authorization: Bearer <token>'

Create a client


POST /api/clientes Creates a new active client record. The codigoCliente value must be unique across all clients.

Request body

nombre
string
required
Full name (individual) or company name.
tipoCliente
string
required
Client category. One of: PERSONA, EMPRESA, OTRO.
tipoDocumento
string
required
Document type. One of: RUC, DNI, CE, OTRO.
numeroDocumento
string
required
Document number. Must match the format expected for the selected tipoDocumento.
codigoCliente
string
required
Unique internal code for this client (e.g., CLI001).
direccion
string
Primary service address.
telefono
string
Contact phone number.
email
string
Email address.
contactoRepresentante
string
Name of the representative or point of contact. Recommended for EMPRESA clients.
curl --request POST \
  --url 'https://your-api.example.com/api/clientes' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "nombre": "Empresa Telecom SAC",
    "tipoCliente": "EMPRESA",
    "tipoDocumento": "RUC",
    "numeroDocumento": "20512345678",
    "codigoCliente": "CLI042",
    "direccion": "Av. Principal 123, Lima",
    "telefono": "999888777",
    "email": "contacto@telecomsac.pe",
    "contactoRepresentante": "Carlos Mendoza"
  }'

Update a client


PUT /api/clientes/{id} Updates an existing client’s information. All fields are accepted; only provided fields are updated.

Path parameters

id
number
required
The numeric ID of the client to update.

Request body

Same fields as Create a client. All fields are optional on update.
curl --request PUT \
  --url 'https://your-api.example.com/api/clientes/42' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "telefono": "987654321",
    "email": "nuevo@telecomsac.pe"
  }'

Delete a client


DELETE /api/clientes/{id} Soft-deletes a client by setting vigente = false. The record is retained in the database and will no longer appear in list responses.

Path parameters

id
number
required
The numeric ID of the client to deactivate.
This operation is a soft delete. The client record is preserved and can be reactivated directly in the database if needed, but it will not appear through the API after deletion.
curl --request DELETE \
  --url 'https://your-api.example.com/api/clientes/42' \
  --header 'Authorization: Bearer <token>'

Enumerations

TipoCliente

ValueDescription
PERSONAIndividual person
EMPRESACompany or organization
OTROOther client type

TipoDocumento

ValueDescription
RUCRegistro Único de Contribuyentes (11 digits)
DNIDocumento Nacional de Identidad (8 digits)
CECarné de Extranjería
OTROOther document type

Build docs developers (and LLMs) love