Skip to main content

Submit E-Invoice API

Introduction​

Triggers e-invoice submission / XML update for a given invoice number via EInvoiceService.updateEinvoiceXml(invoiceNo, tenantId). The service returns a map with success (Boolean) and message (String), which are copied into the JSON response. Activity is logged when submission succeeds.

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

See also: Invoice Home — all endpoints.


HTTP Endpoint​

PropertyValue
URL/rest/invoicehome/submitEInvoice
MethodPOST
ConsumesRaw JSON body
Producestext/plain (JSON string entity)

Request Body (JSON)​

FieldTypeRequiredDescription
userIdStringYesStored in activity log on success.
invoiceNumberStringYesInvoice number passed to updateEinvoiceXml.
userNameStringYesAuth username.
authKeyStringYesAuth key.

Authentication​

ConditionHTTP status
Invalid credentials401 Unauthorized (Access-Control-Allow-Origin: *)
Success (HTTP)200 OK — note: submitted in body reflects business success, not HTTP status

Behaviour​

  1. Validates auth.
  2. Map<String, Object> resultMap = eInvoiceService.updateEinvoiceXml(invoiceNo, tenantId).
  3. success = Boolean.TRUE.equals(resultMap.get("success")).
  4. errorMessage = (String) resultMap.get("message") (may be null).
  5. If success, CommonHelper.saveLatestActivity for e-invoice submission.

Response​

Code: 200 OK

Body (JSON string):

{
"submitted": true,
"message": "..."
}
  • submitted: mirrors map entry "success" (strict Boolean true check).
  • message: service message (error or informational text).

Headers: Access-Control-Allow-Origin: *


Example Request​

POST /rest/invoicehome/submitEInvoice HTTP/1.1
Host: {base}
Content-Type: application/json

{
"userId": "42",
"invoiceNumber": "INV-2026-050",
"userName": "alice",
"authKey": "secretKey"
}