Generate Blank Invoice API
Introduction
Creates a new blank invoice shell: generates invoice numbers, sets type INVOICE_TYPE_BLANK, attaches two initial InvoiceModel rows (data row + remarks row), sales categories, city list, and tenant use-invoice-format / GST defaults. Does not persist to the database; client uses the payload for data entry before save blank invoice.
Source: GenerateInvoiceAPI.generateBlankInvoice.
See also: Generate Invoice — all endpoints.
HTTP Endpoint
| URL | /rest/generateinvoice/generateBlankInvoice |
| Method | POST |
| Produces | text/plain (JSON string) |
Request Body (JSON)
| Field | Required | Description |
|---|---|---|
userName | Yes | Auth. |
authKey | Yes | Auth. |
branch | Yes | Contract field. |
Authentication
401 when invalid; 200 on success. Access-Control-Allow-Origin: * on success.
Success Response
{
"data": "<stringified InvoiceOriginal JSON>"
}
data is produced with SpecificClassExclusionStrategy.
Example
{
"userName": "alice",
"authKey": "k",
"branch": "default"
}