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" |
REST Endpoints​
GET /gl-codes/:idOrCode
​
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 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​
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 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.
Name | Type | Description | Example |
---|---|---|---|
id | ID | The ID of the GL code to update. | "ckmnpybisiy5x08abky4g2d1f" |
code | string | The code of the GL code to update. | "1840" |
description | string | Description 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"
}