---
title: "Retrieve GL Trial Balance by Account"
slug: "retrieve-gl-trial-balance-by-account"
updated: 2026-05-26T12:53:14Z
published: 2026-05-26T12:53:48Z
canonical: "developers.cmicglobal.com/retrieve-gl-trial-balance-by-account"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://developers.cmicglobal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve GL Trial Balance by Account

Get/glrestapi/rest/v1/gltrialbalancebyacct

# GL Trial Balance by Account

## Overview

Generates a GL trial balance report by account. Read-only.

## Endpoint

| Property | Value |
| --- | --- |
| URL | `{base_url}/glrestapi/rest/v1/gltrialbalancebyacct` |
| Media Type | `application/json` |

## Supported Operations

| Method | Operation | Description |
| --- | --- | --- |
| GET | Read | Retrieve trial balance report data |

All write operations (POST, PATCH, DELETE) are disabled.

If invalid query parameters are provided, a `ValidationException` is thrown with the message: "Please check your query parameters again".

## Query Parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| offset | Integer | No | 0 | Pagination offset |
| limit | Integer | No | 5 | Maximum number of records to return |
| finder | String | Yes |  | Named finder to apply (use `gl2000` to generate report) |

## Response

### Status Codes

| Code | Description |
| --- | --- |
| 200 | Success |
| 401 | Unauthorized |
| 500 | Validation error (bad query parameters) |

### Response Body Structure

```json
{
    "items": [
        {
            "Gl2000CompArchDate": "1998-12-31T00:00:00-05:00",
            "Gl2000CompOpenBalAmt": 0,
            "Gl2000CreditActivityAmt": -22410,
            "Gl2000DebitActivityAmt": -200,
            "Gl2000DeptCode": null,
            "Gl2000DeptCode1": null,
            "Gl2000DeptName": null,
            "Gl2000OpenBal": -149146,
            "Gl2000TableEndBal": -126936,
            "GlAccClearFlag": "N",
            "GlAccCode": "0831",
            "GlAccName": "testing",
            "GlAccNum": "0831",
            "GlAccSort": "0831",
            "GlAcctPicklist": null,
            "GlAcctypeName": "Assets",
            "GlAcctypeSeqNum": 1,
            "GlCompCode": "ZZ",
            "GlCompGroupCode": null,
            "GlCompName": "CMiC-ZZ  Test Company Incorp",
            "GlCurrentRunSeq": null,
            "GlDeptDetail": null,
            "GlDeptPicklist": null,
            "GlFiscalYear": null,
            "GlFromAcctCode": null,
            "GlFromDeptCode": null,
            "GlFromPeriod": null,
            "GlHomeCurrency": null,
            "GlPortalUser": null,
            "GlShowAcctW0activity": null,
            "GlToAcctCode": null,
            "GlToDeptCode": null,
            "GlToPeriod": null,
            "links": [
                {
                    "rel": "self",
                    "href": "http://localhost:7101/gl-rest-api/rest/v1/gltrialbalancebyacct/0003FFFFFFFF0000000430383331000000025A5A",
                    "name": "gltrialbalancebyacct",
                    "kind": "item"
                },
                {
                    "rel": "canonical",
                    "href": "http://localhost:7101/gl-rest-api/rest/v1/gltrialbalancebyacct/0003FFFFFFFF0000000430383331000000025A5A",
                    "name": "gltrialbalancebyacct",
                    "kind": "item"
                }
            ]
        }
    ],
    "count": 1,
    "hasMore": true,
    "limit": 1,
    "offset": 0,
    "links": [
        {
            "rel": "self",
            "href": "http://localhost:7101/gl-rest-api/rest/v1/gltrialbalancebyacct",
            "name": "gltrialbalancebyacct",
            "kind": "collection"
        }
    ]
}
```

### Key Attributes

| Attribute | Type | DB Column | Description |
| --- | --- | --- | --- |
| Gl2000CompArchDate | oracle.jbo.domain.Date | GL2000_COMP_ARCH_DATE (DATE) | Company archive date |
| Gl2000CompOpenBalAmt | java.math.BigDecimal | GL2000_COMP_OPEN_BAL_AMT (NUMBER) | Company opening balance amount |
| Gl2000CreditActivityAmt | java.math.BigDecimal | GL2000_CREDIT_ACTIVITY_AMT (NUMBER) | Credit activity amount for the period range |
| Gl2000DebitActivityAmt | java.math.BigDecimal | GL2000_DEBIT_ACTIVITY_AMT (NUMBER) | Debit activity amount for the period range |
| Gl2000DeptCode | java.lang.String | GL2000_DEPT_CODE (VARCHAR2) | Department code |
| Gl2000DeptCode1 | java.lang.String | GL2000_DEPT_CODE1 (VARCHAR2) | Alternate department code |
| Gl2000DeptName | java.lang.String | GL2000_DEPT_NAME (VARCHAR2) | Department name |
| Gl2000OpenBal | java.math.BigDecimal | GL2000_OPEN_BAL (NUMBER) | Opening balance for the period |
| Gl2000TableEndBal | java.math.BigDecimal | GL2000_TABLE_END_BAL (NUMBER) | Ending balance |
| GlAccClearFlag | java.lang.String | GL_ACC_CLEAR_FLAG (VARCHAR2) | Account clearing flag |
| GlAccCode | java.lang.String | GL_ACC_CODE (VARCHAR2) | GL account code |
| GlAccName | java.lang.String | GL_ACC_NAME (VARCHAR2) | GL account name |
| GlAccNum | java.math.BigDecimal | GL_ACC_NUM (NUMBER) | GL account number |
| GlAccSort | java.math.BigDecimal | GL_ACC_SORT (NUMBER) | Account sort order |
| GlAcctPicklist | java.lang.String | GL_ACCT_PICKLIST (VARCHAR2) | Account picklist filter |
| GlAcctypeName | java.lang.String | GL_ACCTYPE_NAME (VARCHAR2) | Account type name (Asset, Liability, etc.) |
| GlAcctypeSeqNum | java.math.BigDecimal | GL_ACCTYPE_SEQ_NUM (NUMBER) | Account type sequence number |
| GlCompCode | java.lang.String | GL_COMP_CODE (VARCHAR2) | Company code |
| GlCompGroupCode | java.lang.String | GL_COMP_GROUP_CODE (VARCHAR2) | Company group code |
| GlCompName | java.lang.String | GL_COMP_NAME (VARCHAR2) | Company name |
| GlCurrentRunSeq | java.math.BigDecimal | GL_CURRENT_RUN_SEQ (NUMBER) | Current run sequence number |
| GlDeptDetail | java.lang.String | GL_DEPT_DETAIL (VARCHAR2) | Department detail level filter |
| GlDeptPicklist | java.lang.String | GL_DEPT_PICKLIST (VARCHAR2) | Department picklist filter |
| GlFiscalYear | java.math.BigDecimal | GL_FISCAL_YEAR (NUMBER) | Fiscal year |
| GlFromAcctCode | java.lang.String | GL_FROM_ACCT_CODE (VARCHAR2) | From account code filter |
| GlFromDeptCode | java.lang.String | GL_FROM_DEPT_CODE (VARCHAR2) | From department code filter |
| GlFromPeriod | java.math.BigDecimal | GL_FROM_PERIOD (NUMBER) | From period filter |
| GlHomeCurrency | java.lang.String | GL_HOME_CURRENCY (VARCHAR2) | Home currency code |
| GlPortalUser | java.lang.String | GL_PORTAL_USER (VARCHAR2) | Portal user |
| GlShowAcctW0activity | java.lang.String | GL_SHOW_ACCT_W0ACTIVITY (VARCHAR2) | Show accounts with zero activity flag |
| GlToAcctCode | java.lang.String | GL_TO_ACCT_CODE (VARCHAR2) | To account code filter |
| GlToDeptCode | java.lang.String | GL_TO_DEPT_CODE (VARCHAR2) | To department code filter |
| GlToPeriod | java.math.BigDecimal | GL_TO_PERIOD (NUMBER) | To period filter |

## Finders / Filters

### Named Finders

#### gl2000

Triggers trial balance report generation via the `JSR.DBK_JSR_GL2000` stored procedure and returns results. All parameters are optional but providing at minimum `companyCode`, `fiscalYear`, `fromPeriod`, and `toPeriod` are required.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| companyCode | java.lang.String | Yes | Company code to report on |
| companyGroupCode | java.lang.String | No | Company group code |
| deptDetail | java.lang.String | No | Department detail level |
| fromDeptCode | java.lang.String | No | From department code |
| toDeptCode | java.lang.String | No | To department code |
| deptPickList | java.lang.String | No | Department picklist filter |
| fromAcctCode | java.lang.String | No | From account code |
| toAcctCode | java.lang.String | No | To account code |
| acctPickList | java.lang.String | No | Account picklist filter |
| fiscalYear | java.lang.Long | Yes | Fiscal year |
| fromPeriod | java.lang.Long | Yes | From period |
| toPeriod | java.lang.Long | Yes | To period |
| showZeroFlag | java.lang.String | No | Show accounts with zero activity |
| homeCurrency | java.lang.String | No | Home currency code |

## **Example Request:**

### Generate Trial Balance Report (GET with Finder)

```
{{CMIC_BaseUrl}}/gl-rest-api/rest/v1/gltrialbalancebyacct?finder=gl2000;companyCode=ZZ,fiscalYear=2026,fromPeriod=1,toPeriod=12&offset=0&limit=1
```

SecurityHTTPType basic

Basic authentication

Query parametersfinderstringExamplegl2000;companyCode=ZZ,fiscalYear=2026,fromPeriod=1,toPeriod=12
offsetintegerExample0
limitintegerExample5

Responses200

Successful response

<select class='api-response-data' aria-label='Media type'><option value='de63bda2-40f8-4fce-a0f0-67ef52ef73e6'>application/json</option>
</select>
