Overview
The Anticipos API provides several query operations to retrieve advance information based on different criteria. All queries support GraphQL field selection for optimized data retrieval.GetAnticipos
Retrieves all advances in the system (legacy endpoint for basic advance listings).Response Fields
Identification number of the requester
Current status of the advance request (e.g., “EN PROCESO”)
Identification number of the person requesting the advance
Example Response
GetAnticipoById
Retrieves detailed information about a specific advance by its ID.Parameters
The unique identifier of the advance
Response Fields
Unique identifier of the advance
Email address of the requester
Identification number of the requester
Full name of the requester
Current state of the advance. Possible values:
INGRESADO: Initial stateREVISIÓN: Under reviewAPROBADO_T: First-level approvedAPROBADO: Fully approvedRECHAZADO: Rejected by first approverRECHAZADO_T: Rejected by second approverVENCIDO: Expired
Amount of the advance in the specified currency
Exchange rate or currency value
Description or justification for the advance
Credit-related information
Justification details
Supply-related flag
Date and time when the advance was created
Date and time of last status change
Additional observations or rejection reasons
SAP document class
Text field for SAP integration
Assignment code (includes payment date)
SAP document number assigned after approval
Beneficiary information:
idbeneficiario: Beneficiary IDcodigoBeneficiario: SAP beneficiary coderazonSocial: Legal nameidentificacionFiscal: Tax IDtipoBeneficiario: Beneficiary type (supplier, employee, etc.)compania: Associated companybloqueado: Blocked statuscupo: Credit limit
Purchase order information (if applicable):
idOrdenCompra: Purchase order IDcodigo: PO codevalorCompra: Purchase order amountbeneficiario: PO beneficiary
Currency information from catalog:
nombre: Currency namevalor: Currency code (e.g., “USD”, “EUR”)
Percentage catalog entry (if advance is percentage-based)
Rejection reason (if rejected)
Special payment condition (CME):
tipo: CME type codedescripcion: CME description
Example Response
GetAnticipoByBeneficiarioOC
Retrieves all active advances for a specific beneficiary and purchase order combination.Parameters
The beneficiary ID
The purchase order ID
Response Fields
Returns an array of advances with the same structure asGetAnticipoById.
This query automatically filters out advances in the following states:
INGRESADORECHAZADORECHAZADO_TVENCIDO
Example Response
GetAllAnticiposByCorreo
Retrieves all advances created by a specific user (by email).Parameters
Email address of the user
Response Fields
Returns an array of advances with full detail including beneficiary and purchase order information.GetAllAnticiposActivos
Retrieves all active advances in the system (excluding those in INGRESADO state).Response Fields
Returns an array of all active advances with complete information including beneficiary details, purchase order, currency type, and CME information.GetAnticipoByUser
Retrieves a specific advance if the requesting user is the owner.Parameters
The advance ID
Email address of the requesting user
Approval Queries
GetAprobadorByAnticipo
Retrieves the first-level approver for a specific advance.GetAprobadoresByAnticipo
Retrieves all approvers (both levels) for a specific advance.GetAllAprobacionByAnticipos
Retrieves approvals for multiple advances.Parameters
Array of advance IDs
Query Optimization Tips
Select Only Needed Fields
Select Only Needed Fields
GraphQL allows you to request only the fields you need. For list views, request minimal fields to improve performance:
Use Specific Queries
Use Specific Queries
Instead of querying all advances and filtering client-side, use specific queries like
GetAnticipoByBeneficiarioOC or GetAllAnticiposByCorreo to reduce data transfer.Leverage Nested Objects
Leverage Nested Objects
The API automatically includes related objects (beneficiary, purchase order, etc.) through Entity Framework Include statements. Request nested fields when you need complete information:
Error Handling
All queries follow GraphQL error conventions:IndAntAnticipoDTO_NOT_FOUND: Advance not foundUNAUTHORIZED: User not authorized to access this advance