Skip to main content

Get Credit Term List API

Introduction​

Returns all credit terms for the current tenant as a JSON array, loaded via CreditTermService.getCreditTermList(tenantId). Used by invoice forms to populate credit-term dropdowns (for example invoiceForm.xhtml).

Source: InvoiceHomePageAPI.getFromAccountList (mapped to path getCreditTermList) (@Path("invoicehome")).

See also: Invoice Home — all endpoints.


Security note​

authKey (and officeBranch) appear in the URL but checkIfAuthKeyIsValid is not invoked. Treat as an internal or trusted call path unless another layer enforces authentication.


HTTP Endpoint​

PropertyValue
URL/rest/invoicehome/getCreditTermList/{officeBranch}/{authKey}
MethodGET
Producestext/plain (entity is a JSON array string, not wrapped in { "data": ... })

Path Parameters​

ParameterTypeRequiredDescription
officeBranchStringYesConvention: default; not read in the Java method (still required in the path).
authKeyStringYesConvention: placeholder or real key; not validated in code.

Behaviour​

Executes creditTermService.getCreditTermList(TmsUtil.getTenantIdFromServlet(request)) and returns gson.toJson(creditTermLIst).


Success Response​

Code: 200 OK

Body: Gson serialisation of List<CreditTerm> — a top-level JSON array, for example:

[
{
"id": 1,
"termCode": "...",
"description": "...",
"...": "fields from CreditTerm entity"
}
]

Exact property names follow the CreditTerm model and Gson defaults.

Headers: Access-Control-Allow-Origin: *


Example Request​

GET /rest/invoicehome/getCreditTermList/default/29384729 HTTP/1.1
Host: {base}