date and timestamp in descending order.Factura)Complementos de Pago / REP or Notas de Crédito)detail query parameter:summary (default): Computes outstanding balances (pending), total collected,full: Returns the raw MongoDB document with all internal accounting subdocuments.curl --location 'https://api.dufrei.com/api/financial-docs?limit=&page=&startDate=&endDate=&client=&status=&detail=' \
--header 'x-api-key: <api-key>'{
"meta": {
"total": 120,
"page": 1,
"limit": 50,
"tenant": "XAXX010101000",
"detail": "summary"
},
"data": [
{
"id": "1765368000000_0866e",
"company": "XAXX010101000",
"client": "PME380607P35",
"status": {
"code": 6,
"label": "Pagado"
},
"dates": {
"lastUpdate": "2025-06-15T10:30:00.000Z",
"date": 1765346400,
"timestamp": 1765368000,
"invoiceDate": "2025-12-10T02:00:00.000Z",
"satCertDate": "2025-12-10T02:05:00.000Z"
},
"references": {
"ref1_relacion": "2025-90237",
"ref2_cedula": "T-246"
},
"amounts": {
"subtotal": 71328.36,
"vat16": 11412.54,
"vatRetention4": 2317.48,
"discount": 0,
"shrinkageDeduction": 0,
"total": 80423.42
},
"balance": {
"total": 80423.42,
"paid": 80423.42,
"pending": 0,
"isFullyPaid": true,
"paymentsCount": 2
},
"invoice": {
"folio": "202500384",
"uuid": "295A6B4A-25E5-56C0-95BF-CCCC0D169E4B",
"pdf": "https://storage.googleapis.com/dufrei-admin/XAXX010101000/invoice/FC-202500384.pdf",
"xml": "https://storage.googleapis.com/dufrei-admin/XAXX010101000/invoice/FC-202500384.xml"
},
"cancellations": {
"hasCancellations": false,
"count": 0
}
}
]
}