Skip to main content

Save Single Invoice API

Introduction​

Queues an asynchronous save for an individual generated invoice. Wraps InvoiceOriginal in PodQueueObjectHelper, sets queue title to the individual DB invoice type constant, and calls SaveInvoiceQueue.saveInvoice. A 200 ms sleep runs before enqueueing.

Source: GenerateInvoiceAPI.saveSingleInvoice.

See also: Generate Invoice — all endpoints.


HTTP Endpoint​

| URL | /rest/generateinvoice/saveSingleInvoice | | Method | POST |


Request Body (JSON)​

FieldTypeRequiredDescription
userNameStringYesAuth.
authKeyStringYesAuth.
branchStringYesContract.
userIdStringYesPassed to helper for queue/activity context.
invoiceDataObjectYesGson → InvoiceOriginal.

Authentication​

401 with CORS on failure. Success 200 response does not set Access-Control-Allow-Origin in the current code.


Success Response​

{"data": true}

or false if the queue rejects the job.


Example​

{
"userName": "alice",
"authKey": "k",
"branch": "default",
"userId": "42",
"invoiceData": { "invoiceNumber": "...", "...": "InvoiceOriginal" }
}