Skip to main content

Get Summary Invoice As JSON API

Introduction​

Builds template JSON for the standard summary invoice print layout (property SUMMARY_INVOICE_TEMPLATE_NAME). Loads InvoiceOriginal and lines, enriches customer and summary first page, sorts Invoicing list by delivery date for second page, and for each booking outputs a JSON object with descriptionDetails (array of formatted InvoiceModel rows with row totals in #,###.00 format).

Source: GenerateInvoiceAPI.getSummaryInvoiceJSON (@Path("getSummaryInvoiceAsJson")).

See also: Generate Invoice — all endpoints.


HTTP Endpoint​

| URL | /rest/generateinvoice/getSummaryInvoiceAsJson | | Method | POST |


Request Body (JSON)​

FieldRequired
userNameYes
authKeyYes
branchYes
invoiceNumberYes

Response (top-level)​

KeyDescription
invoiceDetailsSame pattern as group API: template SUMMARY_INVOICE_TEMPLATE_NAME, amounts, words, service tax.
customerDetailsCustomer block for summary.
summaryInvoiceFirstPageArray with cost/total formatted.
summaryInvoiceSecondPageArray: each element is Invoicing + descriptionDetails (lines for that booking).

Headers: Access-Control-Allow-Origin: *


Example​

{
"userName": "alice",
"authKey": "k",
"branch": "default",
"invoiceNumber": "SI-2026-01"
}