The credit application endpoints support a two-step workflow: a staff member generates a secure, tokenized link for a client; the client uses that link to fill and submit their credit application form (natural person or legal entity) along with supporting documents; staff then review applications and can export a CIS PDF for any submission. Submission accepts either a Bearer JWT (for staff-submitted forms) or a solicitud token (for client-submitted forms via the public link). Both authentication paths are handled by theDocumentation 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.
authOrSolicitudToken middleware.
For client-facing form submissions, authentication is flexible: include either
Authorization: Bearer <jwt> for staff or X-Solicitud-Token: <token> as a header, or pass token as a field in the form body. The server accepts whichever is present.Generate a public credit application link
Method:POSTPath:
/api/report/solicitud-credito-linkAuthentication: Bearer JWT required Creates a tokenized URL that can be sent to a client. The token embeds the client identity and has an expiry. When the client opens the link, they can submit their credit application without needing a system account.
Body parameters
UUID of the client record for whom the link is being generated.
Response fields
true on success."Link generado" on success.Link metadata.
Examples
Success response
200
Error responses
400
Validate a solicitud link token
Method:GETPath:
/api/report/solicitud-credito/validarAuthentication: None (public endpoint) Validates a token from a generated link and returns the associated link metadata along with pre-fill data for the form. The client-facing application should call this endpoint when the page loads to confirm the token is valid and to populate known fields.
Query parameters
The token value from the public link URL.
Response fields
true when the token is valid and has not expired.Link and client pre-fill data.
Examples
Success response
200
Error responses
400
400
List credit applications
Method:GETPath:
/api/report/solicitud-creditoAuthentication: None (currently unauthenticated; subject to change) Returns submitted credit applications, optionally filtered by applicant type or by a specific client. At least one filter must be provided.
Query parameters
Filter by applicant type. Typical values:
PN (natural person), PJ (legal entity / persona jurídica).UUID of the credit client record. Returns all applications submitted for that client.
Response fields
true on success.Array of solicitud records. Returns an empty array when no records match the filter.
Examples
Error responses
400
Submit a credit application
Method:POSTPath:
/api/report/solicitud-creditoAuthentication: Bearer JWT (staff) or solicitud token (client via public link)
Content-Type:
multipart/form-data
Accepts a completed credit application form for a natural person (PN) or legal entity (PJ). Supports optional document file uploads; multiple PDFs are merged into a single document automatically. The form can be submitted by a logged-in staff member using a JWT or by the client using the public link token.
The public link workflow is as follows:
Staff generates a link
Call
POST /api/report/solicitud-credito-link with the client’s cliente_id to get a tokenized URL.Client opens the link
The client opens the URL in their browser. The frontend calls
GET /solicitud-credito/validar?token=... to confirm validity and pre-fill known fields.Client submits the form
The client fills the form and submits it via
POST /api/report/solicitud-credito with the token in X-Solicitud-Token header or as a token body field.Body parameters (multipart/form-data)
Solicitud link token. Required when the request does not include a Bearer JWT. Can alternatively be supplied via
X-Solicitud-Token header.Applicant type:
PN (natural person) or PJ (legal entity).Applicant’s first name (PN) or legal name (PJ).
Applicant’s last name. Applicable for
PN.National identity number (PN) or tax ID / RIF (PJ).
Contact email address.
Contact phone number.
One or more PDF files to attach to the application. Multiple files are merged into a single PDF. The field name may be repeated for multiple files.
Response fields
true on success."Solicitud de crédito registrada correctamente" on success.The created solicitud record including its generated UUID.
Examples
Success response
201
Error responses
400
400
Generate CIS PDF for a credit application
Method:GETPath:
/api/report/solicitud-credito/:id/pdfAuthentication: Bearer JWT required Generates and streams a CIS (Client Information Sheet) PDF for the specified credit application. The PDF language can be controlled via the
X-Contract-Language request header.
Path parameters
UUID of the credit application (solicitud de crédito) record.
Request headers
Language for the PDF template. Accepted values:
es (Spanish, default) or en (English).Response
On success the server responds with a PDF file:Examples
Error responses
404
500