GL Codes
General ledger (GL) codes are alphanumeric strings assigned to categorize entries in an organization's ledger.
Schema​
GLCode
​
Fields​
Name | Type | Description | Example |
---|---|---|---|
id | ID | The unique GL code ID | "ckmnpybisiy5x08abky4g2d1f" |
code | string | The unique code to represent this GL code | "1840" |
description | string | Description of the GL code | "Payroll Checking" |
createdAt | DateTime | When this object was created | "2021-03-24 17:26:46.983Z" |
updatedAt | DateTime | When 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​
Name | Description | Example |
---|---|---|
id | The ID of the GL code to fetch | "ckmnpybisiy5x08abky4g2d1f" |
code | The 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​
Name | Type | Description | Example |
---|---|---|---|
code | string | The unique code to represent this GL code | "1840" |
description | string | Description 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​
Name | Type | Description | Example |
---|---|---|---|
id | ID | Required. The ID of the GL code to update. | "ckmnpybisiy5x08abky4g2d1f" |
code | string | The code of the GL code to update. | "1190" |
description | string | Description 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"
}