Skip to main content

Create Approve Journal Entry

To create a journal entry with approved status

Request

  • POST /journal-entries/approve

Header Parameter

PropertyTypeDescription
Authorization RequiredstringBearer accessToken

Request Schema

PropertyTypeDescription
documentTypeRequirednumber (integer)Type of the journal entry
51 = General Journal Entry
53 = Purchase Voucher
55 = Sales Voucher
57 = Payment Voucher
59 = Received Voucher
documentDateRequiredstringPosted Date YYYY-MM-DD
Example: 2024-01-31
contactIdRequired when documentType is 53,55,57 and 59 number
(integer)
The value is able to GET by going to section MyCompany > Bank Channel > Get list of all contacts (link) or Get contacts (link),the field name is id
contactNameRequired when documentType is 53,55,57 and 59stringThe value is able to GET by going to section MyCompany > Bank Channel > Get list of all contacts (link) or Get contacts (link),the field name is contactName
descriptionRequiredstringDescription of JV
notestringNote for internal notes
remarksstringRemark for document
referencestringReference document. This field will not affect system document reference.
bookOfAccountsRequiredarray of objectsGroup of financial transactions
debitCreditRequirednumber (integer)Define type of transaction as a debit or credit
1 = Debit
3 = Credit
chartOfAccountIdRequirednumber (integer)Chart of account id
The value is able to GET by going to Get list chart of accounts (link)
valueRequirednumber (decimal)Value of the transaction
descriptionstringDescription of the transaction

Request Sample Payload

{
"documentType": 51,
"documentDate": "2024-05-01",
"contactId": null,
"contactName": "",
"description": "OpenAPI Manual Create Approve",
"note": null,
"remarks": null,
"reference": null,
"bookOfAccounts": [
{
"debitCredit": 1,
"chartOfAccountId": 2696850,
"value": 107,
"description": null
},
{
"debitCredit": 3,
"chartOfAccountId": 2697053,
"value": 100,
"description": null
},
{
"debitCredit": 3,
"chartOfAccountId": 2697013,
"value": 7,
"description": null
}
]
}

Response

PropertyTypeDescription
dataobjectDocument data
recordIdinteger <int64>Id of document
companyIdinteger <int64>Id of the company
documentSerialstringSerial number of the document
statusintegerStatus of the document
1 = Awaiting
5 = Approved
descriptionstringDescription of JV
documentDatestringDate of the document
createdOnstringDate when the document is created
postedDatestringDate when the document is posted.
The value will be displayed as null when document status is awaiting
approvedOnstringDate when the document is approved.
The value will be displayed as null when document status is awaiting
documentTypenumber (integer)Type of the journal entry
debitnumber (decimal)Total debit amount
creditnumber (decimal)Total credit amount
remarksstringRemark for document
notestringNote for internal notes
referencestringReference document. This field will not affect system document reference.
contactIdnumber (integer)Contact id
contactNamestringContact Name
bookOfAccountsarray of objectsGroup of financial transactions
debitCreditnumber (integer)Type of transaction as a debit or credit
1 = Debit
3 = Credit
chartOfAccountIdnumber (integer)Chart of account id
valuenumber (decimal)Value of the transaction
rowNumbernumber (integer)Row number of the transaction
descriptionstringDescription of the transaction
displayNamestringName of chart of account
isSystemDocumentbooleanDefine if the document is a system document.
The value will be displayed as false when the document is created manually.
isLockingPeriodbooleanDefine if the document is in the locking period.
referenceDocumentsarray of objectsGroup of document reference by the system
documentIdnumber (integer)Document id of the reference document
documentTypenumber (integer)Document type of the reference document
documentSerialstringDocument serial number of the reference document
status booleanAction success
messagestringError message
codeintegerError code