Ledger
Create Ledger
Create Ledger
POST
{base url}/v1/accounting/ledgers
Create a new ledger
Headers
Body
Response
{
"responseCode": "00",
"message": "Ledger successfully created",
"data": {
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "Ledger1",
"type": 101,
"currency": "NGN",
"description": "Expense account",
"allowedManualEntry": false,
"isHeadAccount": true,
"isActive": true,
"accountNumber": "1012130087",
"id": "5b1f7422-bed6-473f-81a0-1712359a1023",
"balance": 0,
"created_at": "2024-03-28T07:09:19.554Z",
"updated_at": "2024-03-28T07:09:19.554Z"
}
}
{
"message": "No authorization token found",
"code": 90
}
{
"ledgerName" : "Ledger1",
"currency" : "NGN",
"ledgerType" : 101,
"description": "Expense account",
"isActive": true,
"allowedManualEntry": false,
"isHeadAccount":true,
}
{
"responseCode": "00",
"message": "Ledger successfully created",
"data": {
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "Ledger1",
"type": 101,
"currency": "NGN",
"description": "Expense account",
"allowedManualEntry": false,
"isHeadAccount": true,
"isActive": true,
"accountNumber": "1012130087",
"id": "5b1f7422-bed6-473f-81a0-1712359a1023",
"balance": 0,
"created_at": "2024-03-28T07:09:19.554Z",
"updated_at": "2024-03-28T07:09:19.554Z"
}
}
Update Ledger balance
Update Ledger Balance
PATCH
{Base url}/v1/accounting/update_balance/{ledgerId}
Update ledger balance
Headers
Body
Response
{
"message": "ledger balance credited successfully",
"data": {
"balance": 2000
}
}
{
"message": "No authorization token found",
"code": 90
}
{
"amount": 2000,
"type": "credit"
}
{
"message": "ledger balance credited successfully",
"data": {
"balance": 2000
}
}
Fetch Ledgers
Fetch Ledgers
GET
{Base url}/v1/accounting/ledgers
Fetch all available ledgers
Headers
Response
{
"message": "ledgers fetch successfully",
"data": [
{
"id": "32430370-69bd-4347-ab2d-f92df7b64ab6",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "transactions gl",
"accountNumber": "3033699536",
"balance": 0,
"currency": "NGN",
"type": 303,
"description": "test",
"isHeadAccount": true,
"headAccount": "",
"isActive": false,
"allowedManualEntry": true,
"created_at": "2024-02-05T19:47:18.486Z",
"updated_at": "2024-03-13T14:33:19.355Z",
"childAccount": [
{
"id": "08f743a6-757f-4e06-a729-dc3989001e30",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "transactions child",
"accountNumber": "3036126385",
"balance": 660000,
"currency": "NGN",
"type": 303,
"description": "test",
"isHeadAccount": false,
"headAccount": "3033699536",
"isActive": false,
"allowedManualEntry": true,
"created_at": "2024-02-05T19:47:36.279Z",
"updated_at": "2024-03-13T14:32:41.612Z"
}
]
},
}
{
"message": "No authorization token found",
"code": 90
}
Fetch Ledger Balance
Fetch Ledger Balance
GET
{Base url}/v1/accounting/{ledgerId}/balance
Fetch ledger balance
Headers
Response
{
"message": "ledger balance fetch successfully",
"data": {
"accountNumber": "3033699536",
"balance": 0
}
}
{
"message": "No authorization token found",
"code": 90
}
Fetch Ledger Transactions
Fetch Ledger Transactions
GET
{base url}/v1/accounting/ledgers/transactions
Fetch all Ledger transactions
Headers
Params
Response
{
"responseCode": "00",
"message": "ledger transactions fetch successful",
"data": [
{
"id": "dd3269f9-0488-4103-a1f5-b36674e6fcbd",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"productId": "33c5ed37-56db-4275-b362-473f6a17f7ff",
"accountNumber": "3036126385",
"accountName": "transactions child",
"accountType": "general_ledger",
"transactionGroup": "deposit",
"amount": 200000,
"narration": "deposit on 59607912061",
"type": "deposits",
"created_at": "2024-02-06T06:57:53.286Z",
"updated_at": "2024-02-06T06:57:53.290Z",
"userId": "a677cce1-efec-4fc1-bf82-a5c2af257673",
"fullName": "Louis",
"total_count": "4"
},
{
"id": "8f480ee0-5835-4302-a63b-1647f284f90f",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"productId": "33c5ed37-56db-4275-b362-473f6a17f7ff",
"accountNumber": "3036126385",
"accountName": "transactions child",
"accountType": "general_ledger",
"transactionGroup": "deposit",
"amount": 50000,
"narration": "withdrawal on 59607912061",
"type": "withdrawals",
"created_at": "2024-02-06T06:58:08.641Z",
"updated_at": "2024-02-06T06:58:08.644Z",
"userId": "a677cce1-efec-4fc1-bf82-a5c2af257673",
"fullName": "Louis",
"total_count": "4"
},
],
"pagination": {
"totalCount": 4,
"totalPages": null,
"previousPage": 1,
"nextPage": 1
}
}
{
"message": "No authorization token found",
"code": 90
}
get trial balance
get trial balance
POST
{base url}/accounting/trial_balance
get ledger trial balance
Headers
Query parameters
Response
{
"responseCode": "00",
"message": "ledgers fetch successful",
"data": [
{
"id": "5b1f7422-bed6-473f-81a0-1712359a1023",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "Ledger1",
"accountNumber": "1012130087",
"balance": 2000,
"currency": "NGN",
"type": "101",
"description": "Expense account",
"isHeadAccount": true,
"headAccount": "if isHeadAccount is false, you will provide the headAccount here",
"isActive": true,
"allowedManualEntry": false,
"created_at": "2024-03-28T07:09:19.554Z",
"updated_at": "2024-03-28T07:21:49.056Z",
"total_count": "11"
},
{
"id": "08f743a6-757f-4e06-a729-dc3989001e30",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "transactions child",
"accountNumber": "3036126385",
"balance": 660000,
"currency": "NGN",
"type": "303",
"description": "test",
"isHeadAccount": false,
"headAccount": "3033699536",
"isActive": false,
"allowedManualEntry": true,
"created_at": "2024-02-05T19:47:36.279Z",
"updated_at": "2024-03-13T14:32:41.612Z",
"total_count": "11"
},
],
"pagination": {
"currentPage": 1,
"perPage": 20,
"totalCount": 11,
"totalPages": 1,
"previousPage": 0,
"nextPage": 1
}
}
{
"message": "No authorization token found",
"code": 90
}
{
"responseCode": "00",
"message": "ledgers fetch successful",
"data": [
{
"id": "5b1f7422-bed6-473f-81a0-1712359a1023",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "Ledger1",
"accountNumber": "1012130087",
"balance": 2000,
"currency": "NGN",
"type": "101",
"description": "Expense account",
"isHeadAccount": true,
"headAccount": "if isHeadAccount is false, you will provide the headAccount here",
"isActive": true,
"allowedManualEntry": false,
"created_at": "2024-03-28T07:09:19.554Z",
"updated_at": "2024-03-28T07:21:49.056Z",
"total_count": "11"
},
{
"id": "08f743a6-757f-4e06-a729-dc3989001e30",
"organizationId": "153c58d7-c15b-41fa-a717-67b5ae8e3f98",
"name": "transactions child",
"accountNumber": "3036126385",
"balance": 660000,
"currency": "NGN",
"type": "303",
"description": "test",
"isHeadAccount": false,
"headAccount": "3033699536",
"isActive": false,
"allowedManualEntry": true,
"created_at": "2024-02-05T19:47:36.279Z",
"updated_at": "2024-03-13T14:32:41.612Z",
"total_count": "11"
},
],
"pagination": {
"currentPage": 1,
"perPage": 20,
"totalCount": 11,
"totalPages": 1,
"previousPage": 0,
"nextPage": 1
}
}
Last updated