Get Invoice
Returns the full detail of an invoice or a credit note.
The document is identified by docEntry, the internal id returned by the list, or by docNum, the visible document number, together with type (invoice by default, or creditNote) and empresa.
On top of what the list already returns, the detail adds the lines, the tax breakdown and the due dates with the amount paid on each one.
Endpoint:
GET /documento/getFactura
Successful document detail response
Here is an example of the correct response obtained:
{
"error": false,
"document": {
"empresa": 1,
"company": "NATURALSL",
"type": "invoice",
"docEntry": 1001,
"docNum": 2001,
"docDate": "2026-01-15",
"dueDate": "2026-02-15",
"customerReference": "PED-0001",
"status": "open",
"currency": "EUR",
"netAmount": 100,
"taxAmount": 21,
"total": 121,
"paidAmount": 0,
"dueAmount": 121,
"paymentTerms": { "name": "30 dias fecha factura", "days": 30 },
"paymentMethod": { "name": "Recibo domiciliado" },
"documentType": "items",
"billingAddress": "C/ Ejemplo 1\n00000 Ciudad de ejemplo\nProvincia de ejemplo",
"billingAddressCode": "FACTURACION",
"shippingAddress": "C/ Ejemplo 2\n00000 Ciudad de ejemplo",
"shippingAddressCode": "ALMACEN",
"lines": [
{
"lineNum": 0,
"itemCode": "ABRA0004",
"description": "Sustrato profesional 50 L",
"quantity": 10,
"unitOfMeasure": "Ud",
"itemsPerUnit": 1,
"listPrice": 12,
"discountPercent": 16.67,
"unitPrice": 10,
"netTotal": 100,
"netTotalForeignCurrency": 0,
"taxCode": "S1",
"taxPercent": 21,
"taxAmount": 21,
"equivalenceSurchargePercent": 0,
"equivalenceSurcharge": 0,
"grossTotal": 121
}
],
"taxes": [
{
"code": "S1",
"rate": 21,
"base": 100,
"amount": 21,
"equivalenceSurchargePercent": 0,
"equivalenceSurcharge": 0
}
],
"dueDates": [
{
"installment": 1,
"dueDate": "2026-02-15",
"percent": 100,
"amount": 121,
"paidAmount": 0
}
]
}
}