JSON API: Manage Journal Entries
Refer to the entry schema for a formal definition of the request and the entry response schema for a definition of the response.
Route: entry/add
Sample request:
{
"currency": "CAD",
"description": "Got paid for the first thing!",
"date": "2021-11-12",
"details": [
{
"code": "4110",
"amount": "-520.00"
},
{
"code": "1120",
"amount": "500.00",
"reference": {
"code": "CUST001"
}
},
{
"code": "2250",
"amount": "20.00"
}
]
}
Sample response:
{
"entry": {
"id": 2,
"date": "2021-11-12 00:00:00.000000",
"revision": "aac0610d7a02de675821c2baa0d07c588c1cdb2eac6a608448dfc5e904324ea0",
"createdAt": "2021-12-29T05:55:26.049040Z",
"updatedAt": "2021-12-29T05:55:26.049040Z"
},
"time": "2021-12-29T05:55:26.080726Z"
}
A request specifying a domain and journal:
{
"currency": "CAD",
"description": "Got paid for the first thing!",
"date": "2021-11-12",
"details": [
{
"code": "4110",
"amount": "-520.00"
},
{
"code": "1120",
"amount": "500.00",
"reference": {
"code": "CUST001"
}
},
{
"code": "2250",
"amount": "20.00"
}
],
"domain": "ASIA",
"journal": "SALES"
}
Route: entry/delete
Sample request:
{
"id": 2,
"revision": "aac0610d7a02de675821c2baa0d07c588c1cdb2eac6a608448dfc5e904324ea0"
}
Sample response:
{
"success": true,
"time": "2021-12-29T06:01:25.250753Z"
}
Route: entry/lock
Sample request:
{
"id": 2,
"lock": true,
"revision": "aac0610d7a02de675821c2baa0d07c588c1cdb2eac6a608448dfc5e904324ea0"
}
Sample response:
{
"entry": {
"id": 2,
"date": "2021-11-12 00:00:00.000000",
"description": "Sold the first thing!",
"language": "en",
"opening": false,
"locked": true,
"reviewed": false,
"currency": "CAD",
"details": [
{
"code": "4110",
"accountUuid": "813d5d76-a6c5-479c-ae33-5933ed3fc457",
"amount": "-520.00"
},
{
"code": "1120",
"accountUuid": "47943a74-46f8-4e5b-98fd-72ed74a80b2d",
"amount": "500.00",
"reference": {
"code": "CUST001"
}
},
{
"code": "2250",
"uuid": "212b3cef-a74c-4196-b24f-65873d393be5",
"amount": "20.00"
}
],
"revision": "aad98dc11f565d7844af9719868dc9a4c48317f90c5f65ff863c94ae7be03932",
"createdAt": "2021-12-29T06:02:39.122770Z",
"updatedAt": "2021-12-29T06:02:39.122770Z"
},
"time": "2021-12-29T06:02:39.187481Z"
}
Route: entry/get
Sample request:
{
"id": 2
}
Sample response:
{
"entry": {
"id": 2,
"date": "2021-11-12 00:00:00.000000",
"description": "Sold the first thing!",
"language": "en",
"opening": false,
"locked": false,
"reviewed": false,
"currency": "CAD",
"details": [
{
"code": "4110",
"accountUuid": "813d5d76-a6c5-479c-ae33-5933ed3fc457",
"amount": "-520.00"
},
{
"code": "1120",
"accountUuid": "47943a74-46f8-4e5b-98fd-72ed74a80b2d",
"amount": "500.00",
"reference": {
"code": "CUST001"
}
},
{
"code": "2250",
"uuid": "212b3cef-a74c-4196-b24f-65873d393be5",
"amount": "20.00"
}
],
"revision": "aad98dc11f565d7844af9719868dc9a4c48317f90c5f65ff863c94ae7be03932",
"createdAt": "2021-12-29T06:02:39.122770Z",
"updatedAt": "2021-12-29T06:02:39.122770Z"
},
"time": "2021-12-29T06:02:39.187481Z"
}
Route: entry/update
Sample request:
{
"currency": "CAD",
"description": "Oops, that was a rental!",
"date": "2021-11-12",
"details": [
{
"code": "1310",
"debit": "520.00"
},
{
"code": "4240",
"credit": "520.00"
}
],
"id": 1,
"revision": "671897a7beb3d3bb3be10ec9701f1c14958cc030ff2e02966266e176bfb1c262"
}
Sample response:
{
"entry": {
"id": 1,
"date": "2021-11-12 00:00:00.000000",
"revision": "93ef2586ae54bf1e22fd9f63875786a69cece1c3f2ab9ac706341dcc1a6369df",
"createdAt": "2021-12-29T06:12:23.355784Z",
"updatedAt": "2021-12-29T06:12:23.507397Z"
},
"time": "2021-12-29T06:12:23.526148Z"
}