Skip to main content

Generate Summary Invoice API

Introduction​

Builds a summary invoice InvoiceOriginal from invoicedata (List<Invoicing>). Resolves customer and credit terms, populates country/zone/state/city lists for address UI, aggregates multiple bookings into line items (shared logic with large in-method loops), summary first-page data, totals, and validation flags. Same high-level pattern as single invoice but for consolidated billing.

Source: GenerateInvoiceAPI.generateSummaryInvoice.

See also: Generate Invoice — all endpoints.


HTTP Endpoint​

| URL | /rest/generateinvoice/generateSummaryInvoice | | Method | POST |


Request Body (JSON)​

FieldRequiredDescription
userNameYesAuth.
authKeyYesAuth.
branchYesContract.
invoicedataYesArray → List<Invoicing> (bookings in the summary).

Authentication​

401 invalid; 200 success with CORS *.


Success Response​

KeyDescription
isValid"Valid" or "NoCreditTerm" (credit-term branch outcome).
dataStringified InvoiceOriginal (Gson + SpecificClassExclusionStrategy).

Note: Response uses isValid, not res (unlike generate single invoice).


Example​

{
"userName": "alice",
"authKey": "k",
"branch": "default",
"invoicedata": [
{ "bookingId": "BK-1", "customerId": "C1", "...": "..." },
{ "bookingId": "BK-2", "customerId": "C1", "...": "..." }
]
}