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
| Property | Value |
|---|---|
| URL | /rest/invoicehome/submitEInvoice |
| Method | POST |
| Consumes | Raw JSON body |
| Produces | text/plain (JSON string entity) |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | Stored in activity log on success. |
invoiceNumber | String | Yes | Invoice number passed to updateEinvoiceXml. |
userName | String | Yes | Auth username. |
authKey | String | Yes | Auth key. |
Authentication
| Condition | HTTP status |
|---|---|
| Invalid credentials | 401 Unauthorized (Access-Control-Allow-Origin: *) |
| Success (HTTP) | 200 OK — note: submitted in body reflects business success, not HTTP status |
Behaviour
- Validates auth.
Map<String, Object> resultMap = eInvoiceService.updateEinvoiceXml(invoiceNo, tenantId).success = Boolean.TRUE.equals(resultMap.get("success")).errorMessage = (String) resultMap.get("message")(may be null).- If
success,CommonHelper.saveLatestActivityfor 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"
}