Ledgers
Create A Ledger
$ curl 'http://localhost:8080/ledgers' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "ASSET",
"identifier" : "1000",
"name" : "Cash",
"description" : "Cash Ledger",
"showAccountsInChart" : true
}'
POST /ledgers HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 131
{
"type" : "ASSET",
"identifier" : "1000",
"name" : "Cash",
"description" : "Cash Ledger",
"showAccountsInChart" : true
}
$ echo '{
"type" : "ASSET",
"identifier" : "1000",
"name" : "Cash",
"description" : "Cash Ledger",
"showAccountsInChart" : true
}' | http POST 'http://localhost:8080/ledgers' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Account identifier |
|
|
Name of account |
|
|
Description of account |
|
|
Should account be shown in charts ? |
HTTP/1.1 202 Accepted
Fetch Ledgers
$ curl 'http://localhost:8080/ledgers' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /ledgers HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/ledgers' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1188
{
"ledgers" : [ {
"type" : "ASSET",
"identifier" : "1021",
"name" : "Name of 1021",
"description" : "Description of 1021",
"parentLedgerIdentifier" : null,
"subLedgers" : [ ],
"totalValue" : 0,
"createdOn" : "2018-06-13T13:04:58.887Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null,
"showAccountsInChart" : true
}, {
"type" : "ASSET",
"identifier" : "1022",
"name" : "Name of 1022",
"description" : "Description of 1022",
"parentLedgerIdentifier" : null,
"subLedgers" : [ ],
"totalValue" : 0,
"createdOn" : "2018-06-13T13:04:59.02Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null,
"showAccountsInChart" : false
}, {
"type" : "ASSET",
"identifier" : "1023",
"name" : "Name of 1023",
"description" : "Description of 1023",
"parentLedgerIdentifier" : null,
"subLedgers" : [ ],
"totalValue" : 0,
"createdOn" : "2018-06-13T13:04:59.076Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null,
"showAccountsInChart" : true
} ],
"totalPages" : 1,
"totalElements" : 3
}
Path | Type | Description |
---|---|---|
|
|
List of Ledgers |
|
|
Type of first ledger |
|
|
first ledger identifier |
|
|
first ledger name |
|
|
description of first ledger |
|
|
first ledger’s parent |
|
|
Total Value of first ledger |
|
|
date first ledger was created |
|
|
employee who created first ledger |
|
|
date first ledger was modified |
|
|
employee who last modified first ledger |
|
|
Should ledger be shown in charts ? |
|
|
Type of second ledger |
|
|
second ledger identifier |
|
|
second ledger name |
|
|
description of second ledger |
|
|
second ledger’s parent |
|
|
Total Value of second ledger |
|
|
date second ledger was created |
|
|
employee who created second ledger |
|
|
date second ledger was modified |
|
|
employee who last modified second ledger |
|
|
Should ledger be shown in charts ? |
|
|
Type of third ledger |
|
|
third ledger identifier |
|
|
third ledger name |
|
|
description of third ledger |
|
|
third ledger’s parent |
|
|
Total Value of third ledger |
|
|
date third ledger was created |
|
|
employee who created third ledger |
|
|
date second ledger was modified |
|
|
employee who last modified third ledger |
|
|
Should ledger be shown in charts ? |
|
|
Total number of pages |
|
|
Total number of elements |
Fetch Accounts For Ledger
$ curl 'http://localhost:8080/ledgers/6100/accounts' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"accounts" : [ {
"type" : "LIABILITY",
"identifier" : "6100.10",
"name" : "First Account Of 6100",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 1234.0,
"ledger" : "6100"
} ],
"totalPages" : 1,
"totalElements" : 1
}'
GET /ledgers/6100/accounts HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 295
{
"accounts" : [ {
"type" : "LIABILITY",
"identifier" : "6100.10",
"name" : "First Account Of 6100",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 1234.0,
"ledger" : "6100"
} ],
"totalPages" : 1,
"totalElements" : 1
}
$ echo '{
"accounts" : [ {
"type" : "LIABILITY",
"identifier" : "6100.10",
"name" : "First Account Of 6100",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 1234.0,
"ledger" : "6100"
} ],
"totalPages" : 1,
"totalElements" : 1
}' | http GET 'http://localhost:8080/ledgers/6100/accounts' 'Content-Type:application/json' 'Accept:*/*'
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Type of first Account |
|
|
first account identifier |
|
|
first account name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
first account’s balance |
|
|
Associated ledger |
|
|
Total pages |
|
|
Total accounts in page |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 518
{
"accounts" : [ {
"type" : "LIABILITY",
"identifier" : "6100.10",
"name" : "First Account Of 6100",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 1234.0,
"referenceAccount" : null,
"ledger" : "6100",
"state" : "OPEN",
"alternativeAccountNumber" : null,
"createdOn" : "2018-06-13T16:02:25.546Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null
} ],
"totalPages" : 1,
"totalElements" : 1
}
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Total number of pages |
|
|
Total number of elements |
Find A Ledger
$ curl 'http://localhost:8080/ledgers/7200' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /ledgers/7200 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/ledgers/7200' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 346
{
"type" : "ASSET",
"identifier" : "7200",
"name" : "Name of7200",
"description" : "Description of 7200",
"parentLedgerIdentifier" : null,
"subLedgers" : [ ],
"totalValue" : 0,
"createdOn" : "2018-06-13T14:29:04.63Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null,
"showAccountsInChart" : false
}
Path | Type | Description |
---|---|---|
|
|
Type of first ledger |
|
|
first ledger identifier |
|
|
first ledger name |
|
|
description of first ledger |
|
|
list of sub ledgers |
|
|
first ledger’s parent |
|
|
Total Value of first ledger |
|
|
date first ledger was created |
|
|
employee who created first ledger |
|
|
date first ledger was modified |
|
|
employee who last modified first ledger |
|
|
Should ledger be shown in charts ? |
Add A Sub Ledger
$ curl 'http://localhost:8080/ledgers/6200' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "ASSET",
"identifier" : "6201",
"name" : "SubLedger One of 6200",
"description" : "First Sub Ledger of 6200",
"showAccountsInChart" : false
}'
POST /ledgers/6200 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 162
{
"type" : "ASSET",
"identifier" : "6201",
"name" : "SubLedger One of 6200",
"description" : "First Sub Ledger of 6200",
"showAccountsInChart" : false
}
$ echo '{
"type" : "ASSET",
"identifier" : "6201",
"name" : "SubLedger One of 6200",
"description" : "First Sub Ledger of 6200",
"showAccountsInChart" : false
}' | http POST 'http://localhost:8080/ledgers/6200' 'Content-Type:application/json' 'Accept:application/json'
HTTP/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Sub Ledger identifier |
|
|
Name of sub ledger |
|
|
Description of sub ledger |
|
|
Should ledger be shown in charts ? |
Update A Ledger
$ curl 'http://localhost:8080/ledgers/6200' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "ASSET",
"identifier" : "6200",
"name" : "New Name Of 6200",
"description" : "New Description Of 6200",
"showAccountsInChart" : true
}'
PUT /ledgers/6200 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 155
{
"type" : "ASSET",
"identifier" : "6200",
"name" : "New Name Of 6200",
"description" : "New Description Of 6200",
"showAccountsInChart" : true
}
$ echo '{
"type" : "ASSET",
"identifier" : "6200",
"name" : "New Name Of 6200",
"description" : "New Description Of 6200",
"showAccountsInChart" : true
}' | http PUT 'http://localhost:8080/ledgers/6200' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Sub Ledger identifier |
|
|
Name of sub ledger |
|
|
Description of sub ledger |
|
|
Should ledger be shown in charts ? |
HTTP/1.1 202 Accepted
Delete A Ledger
$ curl 'http://localhost:8080/ledgers/6200' -i -X DELETE -H 'Content-Type: application/json' -H 'Accept: */*'
DELETE /ledgers/6200 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http DELETE 'http://localhost:8080/ledgers/6200' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 202 Accepted
Accounts
Create An Account
$ curl 'http://localhost:8080/accounts' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "ASSET",
"identifier" : "10013",
"name" : "Interest Receivables",
"holders" : [ "First Holder", "Second Holder" ],
"signatureAuthorities" : [ "Second To Sign", "First To Sign" ],
"balance" : 105.0,
"ledger" : "1001"
}'
POST /accounts HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 242
{
"type" : "ASSET",
"identifier" : "10013",
"name" : "Interest Receivables",
"holders" : [ "First Holder", "Second Holder" ],
"signatureAuthorities" : [ "Second To Sign", "First To Sign" ],
"balance" : 105.0,
"ledger" : "1001"
}
$ echo '{
"type" : "ASSET",
"identifier" : "10013",
"name" : "Interest Receivables",
"holders" : [ "First Holder", "Second Holder" ],
"signatureAuthorities" : [ "Second To Sign", "First To Sign" ],
"balance" : 105.0,
"ledger" : "1001"
}' | http POST 'http://localhost:8080/accounts' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Account identifier |
|
|
Name of account |
|
|
Account Holders |
|
|
Account signatories |
|
|
Account balance |
|
|
Associated ledger |
HTTP/1.1 202 Accepted
Find An Account
$ curl 'http://localhost:8080/accounts/1001' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"type" : "ASSET",
"identifier" : "1001",
"name" : "Receivables",
"holders" : [ "Holder One", "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two", "Signatory One" ],
"balance" : 906.4,
"referenceAccount" : "1000",
"ledger" : "1001"
}'
GET /accounts/1001 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 257
{
"type" : "ASSET",
"identifier" : "1001",
"name" : "Receivables",
"holders" : [ "Holder One", "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two", "Signatory One" ],
"balance" : 906.4,
"referenceAccount" : "1000",
"ledger" : "1001"
}
$ echo '{
"type" : "ASSET",
"identifier" : "1001",
"name" : "Receivables",
"holders" : [ "Holder One", "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two", "Signatory One" ],
"balance" : 906.4,
"referenceAccount" : "1000",
"ledger" : "1001"
}' | http GET 'http://localhost:8080/accounts/1001' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 437
{
"type" : "ASSET",
"identifier" : "1001",
"name" : "Receivables",
"holders" : [ "Holder One", "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two", "Signatory One" ],
"balance" : 906.4,
"referenceAccount" : "1000",
"ledger" : "1001",
"state" : "OPEN",
"alternativeAccountNumber" : null,
"createdOn" : "2018-06-12T14:24:24.696Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null
}
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Account identifier |
|
|
Name of account |
|
|
Account Holders |
|
|
Account signatories |
|
|
Account balance |
|
|
Associated ledger |
|
|
Reference Account |
|
|
State of account |
|
|
Alternative account |
|
|
Date account was created |
|
|
Account creator |
|
|
Date when account was last modified |
|
|
Employee who last modified account |
Find Account Using Alternative Account Number
$ curl 'http://localhost:8080/accounts/7100.10' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /accounts/7100.10 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/accounts/7100.10' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json;charset=UTF-8
Content-Length: 425
{
"type" : "REVENUE",
"identifier" : "7100.10",
"name" : "Organic Maize",
"holders" : [ "Only Holder" ],
"signatureAuthorities" : [ "Only Signatory" ],
"balance" : 3435.0,
"referenceAccount" : null,
"ledger" : "7100",
"state" : "OPEN",
"alternativeAccountNumber" : "7-1-0-0-.-1-0",
"createdOn" : "2018-06-13T10:32:36.343Z",
"createdBy" : "setna",
"lastModifiedOn" : null,
"lastModifiedBy" : null
}
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Account identifier |
|
|
Account name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
account’s balance |
|
|
Reference Account |
|
|
Associated ledger |
|
|
State of Account |
|
|
Total accounts in page |
|
|
List of Accounts |
|
|
Total number of pages |
|
|
Total number of elements |
|
|
Total number of elements |
Update An Account
$ curl 'http://localhost:8080/accounts/2001' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "ASSET",
"identifier" : "2001",
"name" : "Payables",
"holders" : [ "Holder Second", "Holder First" ],
"signatureAuthorities" : [ "Second Signatory", "First Signatory" ],
"balance" : 342.0,
"ledger" : "2000"
}'
PUT /accounts/2001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 233
{
"type" : "ASSET",
"identifier" : "2001",
"name" : "Payables",
"holders" : [ "Holder Second", "Holder First" ],
"signatureAuthorities" : [ "Second Signatory", "First Signatory" ],
"balance" : 342.0,
"ledger" : "2000"
}
$ echo '{
"type" : "ASSET",
"identifier" : "2001",
"name" : "Payables",
"holders" : [ "Holder Second", "Holder First" ],
"signatureAuthorities" : [ "Second Signatory", "First Signatory" ],
"balance" : 342.0,
"ledger" : "2000"
}' | http PUT 'http://localhost:8080/accounts/2001' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of Account |
|
|
Account identifier |
|
|
Name of account |
|
|
Account Holders |
|
|
Account signatories |
|
|
Account balance |
|
|
Associated ledger |
HTTP/1.1 202 Accepted
Fetch Accounts
$ curl 'http://localhost:8080/accounts' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"accounts" : [ {
"type" : "EXPENSE",
"identifier" : "1111",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
}, {
"type" : "EXPENSE",
"identifier" : "1112",
"name" : "Organic Beans",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales"
} ],
"totalPages" : 1,
"totalElements" : 2
}'
GET /accounts HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 518
{
"accounts" : [ {
"type" : "EXPENSE",
"identifier" : "1111",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
}, {
"type" : "EXPENSE",
"identifier" : "1112",
"name" : "Organic Beans",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales"
} ],
"totalPages" : 1,
"totalElements" : 2
}
$ echo '{
"accounts" : [ {
"type" : "EXPENSE",
"identifier" : "1111",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
}, {
"type" : "EXPENSE",
"identifier" : "1112",
"name" : "Organic Beans",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales"
} ],
"totalPages" : 1,
"totalElements" : 2
}' | http GET 'http://localhost:8080/accounts' 'Content-Type:application/json' 'Accept:*/*'
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Type of first Account |
|
|
first account identifier |
|
|
first account name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
first account’s balance |
|
|
Associated ledger |
|
|
Type of second Account |
|
|
second account identifier |
|
|
second account’s name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
second account balance |
|
|
Associated ledger |
|
|
Total number of pages |
|
|
Total number of elements |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"accounts" : [ ],
"totalPages" : 0,
"totalElements" : 0
}
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Total number of pages |
|
|
Total number of elements |
Fetch Accounts For Term
$ curl 'http://localhost:8080/accounts' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "2100.1",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
} ],
"totalPages" : 1,
"totalElements" : 1
}'
GET /accounts HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 292
{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "2100.1",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
} ],
"totalPages" : 1,
"totalElements" : 1
}
$ echo '{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "2100.1",
"name" : "Organic Maize",
"holders" : [ "Holder One" ],
"signatureAuthorities" : [ "Signatory One" ],
"balance" : 225.0,
"ledger" : "Organic Sales"
} ],
"totalPages" : 1,
"totalElements" : 1
}' | http GET 'http://localhost:8080/accounts' 'Content-Type:application/json' 'Accept:*/*'
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Type of first Account |
|
|
first account identifier |
|
|
first account name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
first account’s balance |
|
|
Associated ledger |
|
|
Total pages |
|
|
Total accounts in page |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"accounts" : [ ],
"totalPages" : 0,
"totalElements" : 0
}
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Total number of pages |
|
|
Total number of elements |
Fetch Active Accounts
$ curl 'http://localhost:8080/accounts' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "3100.20",
"name" : "Organic Pens",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.30",
"name" : "Organic Peas",
"holders" : [ "Holder Three" ],
"signatureAuthorities" : [ "Signatory Three" ],
"balance" : 953.0,
"ledger" : "Organic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.40",
"name" : "Organic Pencils",
"holders" : [ "Holder Four" ],
"signatureAuthorities" : [ "Signatory Four" ],
"balance" : 345.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
} ],
"totalPages" : 1,
"totalElements" : 3
}'
GET /accounts HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 827
{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "3100.20",
"name" : "Organic Pens",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.30",
"name" : "Organic Peas",
"holders" : [ "Holder Three" ],
"signatureAuthorities" : [ "Signatory Three" ],
"balance" : 953.0,
"ledger" : "Organic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.40",
"name" : "Organic Pencils",
"holders" : [ "Holder Four" ],
"signatureAuthorities" : [ "Signatory Four" ],
"balance" : 345.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
} ],
"totalPages" : 1,
"totalElements" : 3
}
$ echo '{
"accounts" : [ {
"type" : "REVENUE",
"identifier" : "3100.20",
"name" : "Organic Pens",
"holders" : [ "Holder Two" ],
"signatureAuthorities" : [ "Signatory Two" ],
"balance" : 895.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.30",
"name" : "Organic Peas",
"holders" : [ "Holder Three" ],
"signatureAuthorities" : [ "Signatory Three" ],
"balance" : 953.0,
"ledger" : "Organic Sales",
"state" : "OPEN"
}, {
"type" : "REVENUE",
"identifier" : "3100.40",
"name" : "Organic Pencils",
"holders" : [ "Holder Four" ],
"signatureAuthorities" : [ "Signatory Four" ],
"balance" : 345.0,
"ledger" : "Inorganic Sales",
"state" : "OPEN"
} ],
"totalPages" : 1,
"totalElements" : 3
}' | http GET 'http://localhost:8080/accounts' 'Content-Type:application/json' 'Accept:*/*'
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Type of first Account |
|
|
first account identifier |
|
|
first account name |
|
|
Set of account holders |
|
|
Set of signatories to account |
|
|
first account’s balance |
|
|
Associated ledger |
|
|
Total pages |
|
|
Total accounts in page |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 65
{
"accounts" : [ ],
"totalPages" : 0,
"totalElements" : 0
}
Path | Type | Description |
---|---|---|
|
|
List of Accounts |
|
|
Total number of pages |
|
|
Total number of elements |
Close An Account
$ curl 'http://localhost:8080/accounts/3001/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "CLOSE",
"comment" : "Close Account"
}'
POST /accounts/3001/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 55
{
"action" : "CLOSE",
"comment" : "Close Account"
}
$ echo '{
"action" : "CLOSE",
"comment" : "Close Account"
}' | http POST 'http://localhost:8080/accounts/3001/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action CLOSE |
|
|
Close comment |
HTTP/1.1 202 Accepted
Lock An Account
$ curl 'http://localhost:8080/accounts/4001/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "LOCK",
"comment" : "Lock Account"
}'
POST /accounts/4001/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 53
{
"action" : "LOCK",
"comment" : "Lock Account"
}
$ echo '{
"action" : "LOCK",
"comment" : "Lock Account"
}' | http POST 'http://localhost:8080/accounts/4001/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action LOCK |
|
|
Lock comment |
HTTP/1.1 202 Accepted
Unlock An Account
$ curl 'http://localhost:8080/accounts/5001/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "UNLOCK",
"comment" : "Unlock Account"
}'
POST /accounts/5001/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 57
{
"action" : "UNLOCK",
"comment" : "Unlock Account"
}
$ echo '{
"action" : "UNLOCK",
"comment" : "Unlock Account"
}' | http POST 'http://localhost:8080/accounts/5001/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action UNLOCK |
|
|
Unlock comment |
HTTP/1.1 202 Accepted
Delete An Account
$ curl 'http://localhost:8080/accounts/5002' -i -X DELETE -H 'Accept: */*' -H 'Content-Type: application/json'
DELETE /accounts/5002 HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
$ http DELETE 'http://localhost:8080/accounts/5002' 'Accept:*/*' 'Content-Type:application/json'
HTTP/1.1 202 Accepted
Fetch Action Commands
$ curl 'http://localhost:8080/accounts/5002/actions' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /accounts/5002/actions HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/accounts/5002/actions' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 181
[ {
"action" : "LOCK",
"comment" : null,
"createdOn" : null,
"createdBy" : null
}, {
"action" : "CLOSE",
"comment" : null,
"createdOn" : null,
"createdBy" : null
} ]
Fetch Account Entries
$ curl 'http://localhost:8080/accounts/1601/entries' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /accounts/1601/entries HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/accounts/1601/entries' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 528
{
"accountEntries" : [ {
"type" : "CREDIT",
"transactionDate" : "2018-06-13T09:37:11.508Z",
"message" : "Message 0",
"amount" : 5.0,
"balance" : -5.0
}, {
"type" : "CREDIT",
"transactionDate" : "2018-06-13T09:37:11.508Z",
"message" : "Message 1",
"amount" : 5.0,
"balance" : -10.0
}, {
"type" : "CREDIT",
"transactionDate" : "2018-06-13T09:37:11.509Z",
"message" : "Message 2",
"amount" : 5.0,
"balance" : -15.0
} ],
"totalPages" : 1,
"totalElements" : 3
}
Journal Entries
Create A Journal Entry
$ curl 'http://localhost:8080/journal' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"transactionIdentifier" : "F14062018",
"transactionDate" : "2018-06-14",
"transactionType" : "ADBT",
"clerk" : "Boring Clerk",
"note" : "Account Db",
"debtors" : [ {
"accountNumber" : "7100",
"amount" : "100.0"
} ],
"creditors" : [ {
"accountNumber" : "Uhiquy7GGFvuMTDxHTfp6oOEuMEBQCFt",
"amount" : "100.0"
} ],
"message" : "Account Has Been Debited"
}'
POST /journal HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 390
{
"transactionIdentifier" : "F14062018",
"transactionDate" : "2018-06-14",
"transactionType" : "ADBT",
"clerk" : "Boring Clerk",
"note" : "Account Db",
"debtors" : [ {
"accountNumber" : "7100",
"amount" : "100.0"
} ],
"creditors" : [ {
"accountNumber" : "Uhiquy7GGFvuMTDxHTfp6oOEuMEBQCFt",
"amount" : "100.0"
} ],
"message" : "Account Has Been Debited"
}
$ echo '{
"transactionIdentifier" : "F14062018",
"transactionDate" : "2018-06-14",
"transactionType" : "ADBT",
"clerk" : "Boring Clerk",
"note" : "Account Db",
"debtors" : [ {
"accountNumber" : "7100",
"amount" : "100.0"
} ],
"creditors" : [ {
"accountNumber" : "Uhiquy7GGFvuMTDxHTfp6oOEuMEBQCFt",
"amount" : "100.0"
} ],
"message" : "Account Has Been Debited"
}' | http POST 'http://localhost:8080/journal' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Transaction ID |
|
|
Account identifier |
|
|
Type of transaction |
|
|
Clerk who initiated transaction |
|
|
Transaction note |
|
|
Set of debtors |
|
|
Set of creditors |
|
|
Associated ledger |
HTTP/1.1 202 Accepted
Find A Journal Entry
$ curl 'http://localhost:8080/journal/FE136183' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /journal/FE136183 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/journal/FE136183' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 375
{
"transactionIdentifier" : "FE136183",
"transactionDate" : "2017-06-24T01:00:00Z",
"transactionType" : "ACCO",
"clerk" : "Mr. Clark",
"note" : "Noted",
"debtors" : [ {
"accountNumber" : "7110",
"amount" : "50.0"
} ],
"creditors" : [ {
"accountNumber" : "8110",
"amount" : "50.0"
} ],
"state" : "PROCESSED",
"message" : "Message Noted"
}
Path | Type | Description |
---|---|---|
|
|
Transaction ID |
|
|
Account identifier |
|
|
Type of transaction |
|
|
Clerk who initiated transaction |
|
|
Transaction note |
|
|
Set of debtors |
|
|
Set of creditors |
|
|
State of journal entry |
|
|
Journal Message |
Fetch Journal Entries
$ curl 'http://localhost:8080/journal' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /journal HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/journal' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3
[ ]
Transaction Types
Create A Transaction Type
$ curl 'http://localhost:8080/transactiontypes' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"code" : "ABCD",
"name" : "Account Starter",
"description" : "Account Starter"
}'
POST /transactiontypes HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 88
{
"code" : "ABCD",
"name" : "Account Starter",
"description" : "Account Starter"
}
$ echo '{
"code" : "ABCD",
"name" : "Account Starter",
"description" : "Account Starter"
}' | http POST 'http://localhost:8080/transactiontypes' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Transaction Type’s code |
|
|
Name of transaction type |
|
|
Description of transaction type |
HTTP/1.1 202 Accepted
Find A Transaction Type
$ curl 'http://localhost:8080/transactiontypes/AXYZ' -i -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"code" : "AXYZ",
"name" : "Account Lock",
"description" : "Lock Account"
}'
GET /transactiontypes/AXYZ HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 82
{
"code" : "AXYZ",
"name" : "Account Lock",
"description" : "Lock Account"
}
$ echo '{
"code" : "AXYZ",
"name" : "Account Lock",
"description" : "Lock Account"
}' | http GET 'http://localhost:8080/transactiontypes/AXYZ' 'Content-Type:application/json' 'Accept:application/json'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 82
{
"code" : "AXYZ",
"name" : "Account Lock",
"description" : "Lock Account"
}
Path | Type | Description |
---|---|---|
|
|
Transaction Type’s code |
|
|
Name of transaction type |
|
|
Description of transaction type |
Fetch Transaction Types
$ curl 'http://localhost:8080/transactiontypes' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /transactiontypes HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/transactiontypes' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1769
{
"transactionTypes" : [ {
"code" : "ACCC",
"name" : "Account Closing",
"description" : null
}, {
"code" : "ACCO",
"name" : "Account Opening",
"description" : null
}, {
"code" : "ACCT",
"name" : "Account Transfer",
"description" : null
}, {
"code" : "ACDT",
"name" : "ACH Credit",
"description" : null
}, {
"code" : "ADBT",
"name" : "ACH Debit",
"description" : null
}, {
"code" : "ADJT",
"name" : "Adjustments",
"description" : null
}, {
"code" : "APAC",
"name" : "ACH Pre-Authorised",
"description" : null
}, {
"code" : "ARET",
"name" : "ACH Return",
"description" : null
}, {
"code" : "AREV",
"name" : "ACH Reversal",
"description" : null
}, {
"code" : "ARPD",
"name" : "ARP Debit",
"description" : null
}, {
"code" : "ASET",
"name" : "ACH Settlement",
"description" : null
}, {
"code" : "ATXN",
"name" : "ACH Transaction",
"description" : null
}, {
"code" : "BACT",
"name" : "Branch Account Transfer",
"description" : null
}, {
"code" : "BBDD",
"name" : "SEPA B2B Direct Debit",
"description" : null
}, {
"code" : "BCDP",
"name" : "Branch Deposit",
"description" : null
}, {
"code" : "BCHQ",
"name" : "Branch Cheque",
"description" : null
}, {
"code" : "BCWD",
"name" : "Branch Withdrawal",
"description" : null
}, {
"code" : "CAJT",
"name" : "Credit Adjustments",
"description" : null
}, {
"code" : "CASH",
"name" : "Cash Letter",
"description" : null
}, {
"code" : "CCCH",
"name" : "Certified Customer Cheque",
"description" : null
} ],
"totalPages" : 3,
"totalElements" : 57
}
Update A Transaction Type
$ curl 'http://localhost:8080/transactiontypes/AXYZ' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"code" : "AXYZ",
"name" : "Account Unveil",
"description" : "Unveil Account"
}'
PUT /transactiontypes/AXYZ HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 86
{
"code" : "AXYZ",
"name" : "Account Unveil",
"description" : "Unveil Account"
}
$ echo '{
"code" : "AXYZ",
"name" : "Account Unveil",
"description" : "Unveil Account"
}' | http PUT 'http://localhost:8080/transactiontypes/AXYZ' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Transaction Type’s code |
|
|
Name of transaction type |
|
|
Description of transaction type |
HTTP/1.1 202 Accepted