Reimbursement Queries
GetAllReembolsos
Retrieve all reimbursement requests in the system.
Query:
query {
getAllReembolsos {
idReembolso
cedula
nombres
apellidos
correo
localidad
area
desde
hasta
descripcion
estado
fechaCreacion
observaciones
director
aprobador {
id
nombre
email
}
catalogo {
idCatalogo
nombre
}
}
}
Response:
Unique identifier for the reimbursement request
Employee identification number
Location/city of the expense
Description of the reimbursement purpose
Current status (INGRESADO, EN_VALIDACIÓN, APROBADO, RECHAZADO, etc.)
Date the reimbursement was created
Additional observations or notes
Director name for approval chain
User object containing approver information
Catalog entry with reimbursement classification
GetReembolsoById
Retrieve a specific reimbursement request by ID.
Query:
query {
getReembolsoById(id: 123) {
idReembolso
cedula
nombres
apellidos
correo
localidad
area
desde
hasta
descripcion
id_aprobador
id_creador
id_compania
idAnticipos
estado
fechaCreacion
observaciones
}
}
Parameters:
The unique identifier of the reimbursement request
Response: Returns a single IndReReembolsoDTO object with the same fields as GetAllReembolsos.
Source: Schema/Query/Query.cs:1016-1019
GetAllReembolsosByUser
Retrieve all reimbursement requests for a specific user.
Query:
query {
getAllReembolsosByUser(id: 5, correo: "employee@example.com") {
idReembolso
nombres
apellidos
descripcion
estado
fechaCreacion
aprobador {
nombre
email
}
}
}
Parameters:
The user ID of the employee who created the reimbursements
The email address of the employee
Response: Returns an array of reimbursement requests created by or associated with the specified user.
Source: Schema/Query/Query.cs:917-920
GetAllReembolsosByCorreo
Retrieve all reimbursement requests by email address only.
Query:
query {
getAllReembolsosByCorreo(correo: "employee@example.com") {
idReembolso
descripcion
estado
fechaCreacion
}
}
Parameters:
The email address of the employee
Response: Returns all reimbursements associated with the given email address.
Source: Schema/Query/Query.cs:922-925
GetAllReembolsoByUser
Retrieve a specific reimbursement request for a user.
Query:
query {
getAllReembolsoByUser(id: 5, id_reem: 123, correo: "employee@example.com") {
idReembolso
descripcion
estado
aprobador {
nombre
}
catalogo {
nombre
}
}
}
Parameters:
The user ID of the employee
The reimbursement ID to retrieve
The email address of the employee
Response: Returns a single reimbursement request if the user has access to it.
Source: Schema/Query/Query.cs:1001-1004
GetAllReembolsosByAprobador
Retrieve all reimbursement requests assigned to a specific approver.
Query:
query {
getAllReembolsosByAprobador(id: 10) {
idReembolso
nombres
apellidos
descripcion
estado
fechaCreacion
}
}
Parameters:
The user ID of the approver
Response: Returns all reimbursements awaiting approval from the specified approver, excluding those in “INGRESADO” or “EN_VALIDACIÓN” status.
Source: Schema/Query/Query.cs:1006-1009
GetAllReembolsoByAprobador
Retrieve a specific reimbursement request for an approver.
Query:
query {
getAllReembolsoByAprobador(id: 10, id_reem: 123) {
idReembolso
descripcion
estado
nombres
apellidos
}
}
Parameters:
The user ID of the approver
The reimbursement ID to retrieve
Response: Returns a single reimbursement request if assigned to the specified approver.
Source: Schema/Query/Query.cs:1011-1014
Expense Detail Queries
GetAllDetalles
Retrieve all expense details across all reimbursement requests.
Query:
query {
getAllDetalles {
idDetalle
id_reembolso
fechaRegistro
fechaEmision
totalFactura
baseIvaCero
baseIva
totalIva
numDocumento
ruc
archivo
reembolso {
idReembolso
nombres
apellidos
aprobador {
nombre
}
}
}
}
Response:
Unique identifier for the expense detail
Foreign key to the parent reimbursement request
Date the expense was registered in the system
Date on the receipt/invoice
Total amount of the invoice/receipt
Tax base amount at 0% IVA rate
Tax base amount subject to IVA
Tax ID (RUC) of the vendor
Path to the uploaded receipt/invoice file
Source: Schema/Query/Query.cs:1026-1029
GetAllDetallesByIdReembolso
Retrieve all expense details for a specific reimbursement request.
Query:
query {
getAllDetallesByIdReembolso(id: 123) {
idDetalle
fechaEmision
totalFactura
numDocumento
ruc
tipoGasto {
nombre
}
tipoDocumento {
nombre
}
grupoGasto {
nombre
}
grupoDocumento {
nombre
}
}
}
Parameters:
The reimbursement ID to retrieve details for
Response: Returns all expense details associated with the specified reimbursement, including related catalog entries.
Source: Schema/Query/Query.cs:1036-1039
GetDetallesSumado
Get the total sum of expenses for all reimbursement requests.
Query:
query {
getDetallesSumado {
id_reembolso
sumaTotal
}
}
Response:
Total sum of all expense details for this reimbursement
Source: Schema/Query/Query.cs:1041-1044
GetDetallesByIdUsuarioSumado
Get expense totals for a specific user’s reimbursement requests.
Query:
query {
getDetallesByIdUsuarioSumado(id: 5, correo: "employee@example.com") {
id_reembolso
sumaTotal
}
}
Parameters:
Response: Returns summed expense totals for each reimbursement belonging to the user.
Source: Schema/Query/Query.cs:1046-1049
GetDetallesByIdAprobadorSumado
Get expense totals for reimbursements assigned to an approver.
Query:
query {
getDetallesByIdAprobadorSumado(id: 10) {
id_reembolso
sumaTotal
}
}
Parameters:
Response: Returns summed expense totals for reimbursements pending approval.
Source: Schema/Query/Query.cs:1051-1054