Skip to main content

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:
idReembolso
integer
required
Unique identifier for the reimbursement request
cedula
string
Employee identification number
nombres
string
Employee first name(s)
apellidos
string
Employee last name(s)
correo
string
Employee email address
localidad
string
Location/city of the expense
area
string
Department or area
desde
datetime
Trip/expense start date
hasta
datetime
Trip/expense end date
descripcion
string
Description of the reimbursement purpose
estado
string
Current status (INGRESADO, EN_VALIDACIÓN, APROBADO, RECHAZADO, etc.)
fechaCreacion
datetime
Date the reimbursement was created
observaciones
string
Additional observations or notes
director
string
Director name for approval chain
aprobador
object
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:
id
integer
required
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:
id
integer
required
The user ID of the employee who created the reimbursements
correo
string
required
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:
correo
string
required
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:
id
integer
required
The user ID of the employee
id_reem
integer
required
The reimbursement ID to retrieve
correo
string
required
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:
id
integer
required
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:
id
integer
required
The user ID of the approver
id_reem
integer
required
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:
idDetalle
integer
required
Unique identifier for the expense detail
id_reembolso
integer
required
Foreign key to the parent reimbursement request
fechaRegistro
datetime
Date the expense was registered in the system
fechaEmision
datetime
Date on the receipt/invoice
totalFactura
decimal
Total amount of the invoice/receipt
baseIvaCero
decimal
Tax base amount at 0% IVA rate
baseIva
decimal
Tax base amount subject to IVA
totalIva
decimal
Total IVA (VAT) amount
numDocumento
string
Document/invoice number
ruc
string
Tax ID (RUC) of the vendor
archivo
string
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:
id
integer
required
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:
id_reembolso
integer
The reimbursement ID
sumaTotal
decimal
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:
id
integer
required
The user ID
correo
string
required
The user’s email address
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:
id
integer
required
The approver’s user ID
Response: Returns summed expense totals for reimbursements pending approval. Source: Schema/Query/Query.cs:1051-1054