Skip to main content

Delete Invoice Booking API

Introduction​

Removes a pending invoicing row (and related booking linkage) for a numeric invoicing.ID via InvoiceService.delInvoiceAndBookingFromInvoicing. On success, records an activity log entry for invoicing. Intended for use from the invoice booking UI when deleting a line from the pending list.

Source: InvoiceHomePageAPI.deleteInvoice (@Path("invoicehome")).

See also: Invoice Home — all endpoints.


Security note​

This endpoint does not call TmsUtil.checkIfAuthKeyIsValid. Path segments officeBranch and authKey are not used for authentication in the current implementation. Rely on network policies, session filters, or harden the API before exposing it broadly.


HTTP Endpoint​

PropertyValue
URL/rest/invoicehome/deleteinvoice/{bookingId}/{userId}/{officeBranch}/{authKey}
MethodGET
Producestext/plain (entity is a JSON string)

The path parameter name bookingId maps to the int primary key of the invoicing row (@PathParam("bookingId") int bookingId).


Path Parameters​

ParameterTypeRequiredDescription
bookingIdIntegerYesinvoicing.ID to delete.
userIdStringYesStored in the activity log as the acting user on success.
officeBranchStringYesRequired by URL shape; unused in handler.
authKeyStringYesRequired by URL shape; not validated in handler.

Behaviour​

  • Calls invoiceService.delInvoiceAndBookingFromInvoicing(bookingId, tenantId).
  • If deleted is true: CommonHelper.saveLatestActivity with title TmsConstants.TITLE_INVOICING and message describing the deleted booking id.

Response​

Code: 200 OK (always returned when no framework error; check deleted in body)

Body (JSON string):

{"deleted":true}

or

{"deleted":false}

Headers: Access-Control-Allow-Origin: *


Example Request​

GET /rest/invoicehome/deleteinvoice/12345/alice/default/unusedAuthKey HTTP/1.1
Host: {base}