In Gestión Clínica’s accounting module, a contact (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ttpullima/RomsoftBackEnd2021_v2/llms.txt
Use this file to discover all available pages before exploring further.
CON_CONTACTO) is any external legal or natural person that participates in the clinic’s financial transactions — insurance companies (EPS/IAFAS), pharmaceutical suppliers, medical equipment vendors, guarantors, and contracted third parties. Each contact carries identifying information aligned with SUNAT requirements (RUC / document code) as well as operational metadata such as credit days, telephone numbers, and electronic billing email. Contacts are typed via CON_TIPO_CONTACTO, which provides the controlled vocabulary of contact categories used in purchase orders, accounts payable, and insurance billing workflows. Together, these two entities form the foundational directory that underpins all CON_* accounting transactions.
All endpoints are HTTP POST and require an
Authorization: Bearer {token} header. Responses are wrapped in the standard JsonResponse envelope (Success, Warning, Message, Data).CON_CONTACTO Endpoints
POST /api/CON_CONTACTO/Add
Creates a new accounting contact. Before inserting, the controller calls CON_CONTACTOBL.Instancia.Exists() to check for a duplicate; if the contact already exists, the operation is rejected with Warning: true and Message: "Ya existe el registro".
Pass
0 to create a new contact; the database assigns the real ID.Foreign key →
CON_TIPO_CONTACTO. Classifies the contact (supplier, insurer, client, etc.).Internal contact code assigned by the accounting department.
SUNAT-issued identifier: RUC (11 digits for companies) or DNI/CE for natural persons. Used for electronic invoicing (comprobante electrónico).
Surnames — applicable when the contact is a natural person.
Given names — applicable when the contact is a natural person.
Legal business name (razón social) as registered with SUNAT. Required for companies.
Trading / commercial name (nombre comercial) if different from the legal name.
Free-text notes about the contact.
Registered address of the contact.
Name of the primary liaison person at the external organisation.
Economic activity description as declared to SUNAT.
Primary telephone number.
Secondary telephone number.
E-mail address used to receive electronic invoices (Factura Electrónica / FFEE).
Credit term in days for accounts-payable scheduling.
Guarantor flag.
1 = this contact can act as a financial guarantor; 0 = no.Contracting-party flag.
1 = this contact is a contracting party (e.g., insurance company); 0 = no.Supplier flag.
1 = this contact is a supplier; 0 = no. A contact may have multiple flags set simultaneously.SUNAT “habido” status flag.
1 = SUNAT has confirmed the entity as active and locatable; 0 = not habido.Active/inactive status.
1 = active; 0 = inactive.ID of the authenticated user creating the record (for audit).
Username string of the creator — used in the audit log entry.
POST /api/CON_CONTACTO/Update
Updates an existing contact record. The request body is identical to Add; populate id_contacto with the target record’s ID.
Response (success)
POST /api/CON_CONTACTO/Delete
Soft-deletes (or logically deactivates) a contact record. The body must include at minimum id_contacto and UsuarioModificacion for audit logging.
Primary key of the contact to delete.
Username string of the user performing the deletion (for audit).
POST /api/CON_CONTACTO/GetById
Retrieves a specific contact by its primary key. The request body is a CON_CONTACTODTO with id_contacto set; the response Data is an array of matching CON_CONTACTODTO objects.
Primary key of the contact to retrieve.
CON_CONTACTODTO
curl example
POST /api/CON_CONTACTO/GetAllFilters
Performs a filtered search across all contacts. Pass any combination of CON_CONTACTODTO fields as filter criteria; the business layer builds the WHERE clause accordingly. Empty or null fields are ignored.
Request body — any subset of CON_CONTACTODTO fields used as filter predicates.
curl example
POST /api/CON_CONTACTO/GetAllActives
Returns all active contacts regardless of type. Useful for populating full contact directories or supplier dropdowns.
Request body — none required.
curl example
CON_TIPO_CONTACTO Endpoints
CON_TIPO_CONTACTO is the reference table that classifies contacts into named categories (e.g., Proveedor, Aseguradora, Cliente, Laboratorio). Its single endpoint feeds the type-selector in the contact registration form.
POST /api/CON_TIPO_CONTACTO/GetAllActives
Returns all active contact type records.
Request body — none required.
Response — array of CON_TIPO_CONTACTODTO
Sample response
Audit Fields (EntityAuditableDTO)
CON_CONTACTODTO and CON_TIPO_CONTACTODTO extend EntityAuditableDTO, which injects the following fields on every response:
| Field | Type | Description |
|---|---|---|
FechaCreacion | datetime | When the record was created. |
FechaModificacion | datetime | When the record was last modified. |
UsuarioCreacion | string | Username of the creator. |
UsuarioModificacion | string | Username of the last modifier. |
IdUsuarioActual | int | ID of the currently acting user. |
id_usuarioCreacion | int | Numeric ID of the creator. |
id_usuarioModifica | int | Numeric ID of the last modifier. |