Skip to main content

GL Codes

General ledger (GL) codes are alphanumeric strings assigned to categorize entries in an organization's ledger.

Schema​

GLCode​

Fields​

NameTypeDescriptionExample
idIDThe unique GL code ID"ckmnpybisiy5x08abky4g2d1f"
codestringThe unique code to represent this GL code"1840"
descriptionstringDescription of the GL code"Payroll Checking"
createdAtDateTimeWhen this object was created"2021-03-24 17:26:46.983Z"
updatedAtDateTimeWhen this object was last updated"2021-03-24 17:26:46.983Z"

Queries​

gLCode​

Read a single GL code. You must specify either the ID or the code.

Parameters​

NameDescriptionExample
idThe ID of the GL code to fetch"ckmnpybisiy5x08abky4g2d1f"
codeThe code of the GL code to fetch"1840"

Response​

A single GLCode object.

Example Query​

query {
gLCode(code: "1840") {
code
description
id
}
}

Example Response​

{
"code": "1840",
"description": "Payroll Checking",
"id": "ckmnpybisiy5x08abky4g2d1f"
}

gLCodes​

Read all GL codes, with pagination.

Parameters​

Accepts all standard pagination parameters.

Allowed orderBy fields: code (default), createdAt, deletedAt, description, id, updatedAt.

Allowed filter fields: code, createdAt, deletedAt, description, id, updatedAt.

Response​

A list of GLCode objects.

Example Query​

query {
gLCodes(limit: 10, orderBy: code) {
code
description
id
}
}

Example Response​

[
{
"code": "1840",
"name": "Payroll Checking",
"id": "ckmnpybisiy5x08abky4g2d1f"
},
{
"code": "1120",
"name": "Contract Receivables",
"id": "ckmnpybi7ag5x08abky4g2f1ff"
}
]

Mutations​

createGLCode​

Creates a new GL code.

Parameters​

NameTypeDescriptionExample
codestringThe unique code to represent this GL code"1840"
descriptionstringDescription of the GL Code"Payroll Checking"

Response​

The created GLCode.

Example Mutation​

mutation {
createGLCode(
code: "1190"
description: "Underbillings"
) {
code
description
id
}
}

Example Response​

{
"code": "1190",
"description": "Underbillings",
"id": "ckmnpybisiy5x08abky4g2d1f",
}

updateGLCode​

Updates a GL Code.

Parameters​

NameTypeDescriptionExample
idIDRequired. The ID of the GL code to update."ckmnpybisiy5x08abky4g2d1f"
codestringThe code of the GL code to update."1190"
descriptionstringDescription of the GL code"Underbillings"

Response​

The updated GLCode.

Example Mutation​

mutation {
updateGLCode(
id: "ckmnpybisiy5x08abky4g2d1f"
description: "Refundable Deposits"
) {
code
id
description
}
}

Example Response​

{
"code": "1940",
"id": "ckmnpybisiy5x08abky4g2d1f",
"description": "Refundable Deposits"
}