The contracts and documents endpoints cover the full lifecycle of legal paperwork for credit clients: generating a pre-filled PDF, creating a contract record linked to a product (TPROD), uploading a signed copy, and downloading or deleting stored files. A parallel set of endpoints handles client vinculos (legal links). A final pair of endpoints manages multi-document uploads for credit client records, supporting both multipart/form-data and raw PDF body. All endpoints require a valid JWT bearer token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/scoria02/marbes2021_backend/llms.txt
Use this file to discover all available pages before exploring further.
Generate contract PDF
GET /api/rrhh/contrato/pdf
Generates and streams a pre-filled contract PDF for a given contract record. The response body is the raw PDF binary; callers should save it with a .pdf extension.
UUID of the contract to render as PDF.
| Header | Value |
|---|---|
Content-Type | application/pdf |
Content-Disposition | attachment; filename="contrato-{id}-{timestamp}.pdf" |
Cache-Control | no-cache, no-store, must-revalidate |
400
500
Create client contract
POST /api/rrhh/contrato/new
Creates a new contract record linked to a product (TPROD). The contract starts in pendiente status until a signed PDF is uploaded.
ID of the TPROD (product) this contract is linked to.
Contract party type. Accepted values:
persona_natural, empresa.Version identifier for the contract template (e.g.,
"2024-v1").Maximum credit amount covered by this contract.
Currency code (e.g.,
"USD", "VES").Term in months.
Interest rate (as a decimal, e.g.,
0.12 for 12%).Late-payment penalty rate (as a decimal).
Signing date in ISO 8601 format (
YYYY-MM-DD).Expiration date in ISO 8601 format (
YYYY-MM-DD).Maximum disbursement period in days.
Legal representative name (required for
empresa contracts).Legal representative ID.
Legal representative title.
Company legal name.
Company tax ID.
Commercial registry reference.
Commercial registry jurisdiction.
Guarantee type description.
Full description of the guarantee.
Email address for contract notifications.
Phone number for contract notifications.
Physical address for contract notifications.
201
400
Upload signed contract PDF
POST /api/rrhh/contrato/cliente/:id
Uploads a signed PDF for an existing contract and moves it from pendiente to aprobado status. Only PDF files are accepted. Send the file as multipart/form-data.
UUID of the contract (TPROD ID).
The signed PDF file. Field name:
file. Must be application/pdf.200
400
Delete pending contract
DELETE /api/rrhh/contrato/cliente/:id
Deletes a contract that is still in pendiente status. Contracts that have already been approved cannot be deleted through this endpoint.
UUID of the contract to delete.
200
400
Download signed contract PDF
GET /api/rrhh/contrato/cliente/:id/download
Streams the signed PDF binary for a contract. The response body is the raw PDF.
UUID of the contract to download.
404
Create client vinculo
POST /api/rrhh/vinculo/new
Creates a new vinculo (legal link) record for a credit client. Structure mirrors the contract payload but uses cliente_id instead of contrato_id.
UUID of the credit client this vinculo belongs to.
Party type. Accepted values:
persona_natural, empresa.Template version identifier.
Maximum amount covered.
Currency code.
Term in months.
Interest rate (decimal).
Late-payment rate (decimal).
Signing date (
YYYY-MM-DD).Expiration date (
YYYY-MM-DD).Legal representative name.
Legal representative ID.
Legal representative title.
Company legal name.
Company tax ID.
Guarantee type.
Guarantee description.
Notification email.
Notification phone.
Notification address.
201
Upload signed vinculo PDF
POST /api/rrhh/vinculo/cliente/:id
Uploads a signed PDF for a vinculo. Accepts multipart/form-data. Only PDF files are accepted.
UUID of the client the vinculo belongs to.
Signed PDF file (
application/pdf). Must be the first file in the multipart payload.200
400
Update vinculo status
PUT /api/rrhh/vinculo/cliente/:id/estatus
Updates the status of a client vinculo.
UUID of the client the vinculo belongs to.
New status. Accepted values:
activo, finalizado, cancelado, pendiente, revision.200
400
Download vinculo PDF
GET /api/rrhh/vinculo/cliente/:id/download
Streams the signed vinculo PDF binary.
UUID of the client the vinculo belongs to.
404
Upload client credit documents
POST /api/rrhh/clientes-creditos/:id/documentos
Uploads one or more documents for a credit client. This endpoint is designed to integrate with n8n automation flows and supports two content-type modes.
This endpoint accepts two mutually exclusive body formats. Send either a raw PDF binary or a
multipart/form-data payload — not both. If the request body is a raw PDF (Content-Type: application/pdf), the entire body is treated as a single document. If the request is multipart/form-data, files must be attached under the field name data.UUID of the credit client to attach documents to.
Set to
application/pdf when sending a raw PDF body. Omit (or set to multipart/form-data) for multipart uploads.Document type label stored alongside the file (e.g.,
cedula, contrato, comprobante). Falls back to the tipo_documento body field, then defaults to "documento".Original filename for raw PDF uploads (e.g.,
cedula.pdf). Auto-generated if omitted.For
multipart/form-data uploads: one or more PDF files under the field name data.true on success.List of successfully stored document records.
201
400
List client credit documents
GET /api/rrhh/clientes-creditos/:id/documentos
Returns the list of all documents stored for a credit client.
UUID of the credit client.
true on success.Total number of documents found.
Array of document records.
200
404
500