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 Payments API records financial transactions associated with work orders (pendientes). Each payment captures the amount, method, date, and the client, employee, and work order it relates to. This provides a full audit trail of what was collected in the field.
All endpoints require a valid Bearer token. Include Authorization: Bearer <token> in every request header.

List active payments

GET /api/pagos Returns a paginated list of payments where vigente = true.

Query parameters

page
number
default:"0"
Zero-based page index.
size
number
default:"20"
Number of records per page.
curl --request GET \
  --url 'https://your-api.example.com/api/pagos?page=0&size=20' \
  --header 'Authorization: Bearer <token>'

Response fields

id
number
Unique payment ID.
empleado
object
The employee who recorded the payment. See EmpleadoResponse for field details.
cliente
object
The client who made the payment. See ClienteResponse for field details.
pendienteId
number
ID of the associated work order.
monto
number
Payment amount.
fechaPago
string
Payment date in YYYY-MM-DD format.
metodoPago
string
Payment method. One of: BCP, EFECTIVO, LOS_ANDES, OTRO.
referencia
string
Reference number or note (e.g., bank transaction ID).
vigente
boolean
true if the payment record is active.

Create a payment

POST /api/pagos Records a new payment for a work order.

Request body

empleadoId
number
required
ID of the employee recording the payment.
clienteId
number
required
ID of the client making the payment.
pendienteId
number
required
ID of the work order this payment applies to.
monto
number
required
Payment amount as a decimal (e.g., 150.00).
fechaPago
string
required
Payment date in YYYY-MM-DD format.
metodoPago
string
required
Payment method. One of: BCP, EFECTIVO, LOS_ANDES, OTRO.
referencia
string
Reference string for the transaction (e.g., a bank operation number or receipt ID). Optional but recommended for non-cash payments.
Always include a referencia value for bank transfer methods (BCP, LOS_ANDES) to support reconciliation. For EFECTIVO, this field can describe the receipt number.
curl --request POST \
  --url 'https://your-api.example.com/api/pagos' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "empleadoId": 3,
    "clienteId": 42,
    "pendienteId": 15,
    "monto": 150.00,
    "fechaPago": "2026-05-24",
    "metodoPago": "BCP",
    "referencia": "OP-20260524-0045"
  }'

Update a payment

PUT /api/pagos/{id} Updates an existing payment record (e.g., to correct the amount or add a reference).

Path parameters

id
number
required
Numeric ID of the payment to update.
All body fields from Create a payment are accepted. Only included fields are updated.
curl --request PUT \
  --url 'https://your-api.example.com/api/pagos/28' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "referencia": "OP-20260524-0046",
    "monto": 175.00
  }'

Delete a payment

DELETE /api/pagos/{id} Soft-deletes a payment by setting vigente = false. The record is retained for audit purposes.

Path parameters

id
number
required
Numeric ID of the payment to deactivate.
Payment records are preserved as part of the audit trail. Deactivating a payment removes it from active listings but the record remains in the database.
curl --request DELETE \
  --url 'https://your-api.example.com/api/pagos/28' \
  --header 'Authorization: Bearer <token>'

Get payments for a work order

GET /api/pagos/pendiente/{pendienteId} Returns all payment records associated with a specific work order.

Path parameters

pendienteId
number
required
The ID of the work order to retrieve payments for.
curl --request GET \
  --url 'https://your-api.example.com/api/pagos/pendiente/15' \
  --header 'Authorization: Bearer <token>'

Enumerations

MetodoPago

ValueDescription
BCPBanco de Crédito del Perú transfer
EFECTIVOCash payment
LOS_ANDESCaja Los Andes transfer
OTROOther payment method

Build docs developers (and LLMs) love