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"

REST Endpoints​

GET /gl-codes/:idOrCode​

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 Request​

GET https://api.kojo.tech/gl-codes/1840

Example Response​

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

GET /gl-codes​

Read all GL codes, with pagination.

Parameters​

Accepts all standard pagination parameters.

Default orderBy field: code

Additionally allowed orderBy fields: createdAt, deletedAt, id, description, updatedAt.

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

Response​

A list of GLCode objects.

Example Request​

GET https://api.kojo.tech/gl-codes

Example Response​

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

POST /gl-codes​

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 Request​

POST https://api.kojo.tech/gl-codes
{
code: "1190"
description: "Underbillings"
}

Example Response​

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

PATCH /gl-codes/:idOrCode​

Updates a GL code.

Parameters​

You must specify either the ID or the code.

NameTypeDescriptionExample
idIDThe ID of the GL code to update."ckmnpybisiy5x08abky4g2d1f"
codestringThe code of the GL code to update."1840"
descriptionstringDescription of the GL code"Payroll Checking"

Response​

The updated GLCode.

Example Request​

POST https://api.kojo.tech/gl-codes/ckmnpybisiy5x08abky4g2d1f
{
description: "Refundable Deposits",
}

Example Response​

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