Skip to main content

Create Draft Journal Entry

To create a journal entry with awaiting status

Request

  • POST /journal-entries/draft

Header Parameter

PropertyTypeDescription
Authorization RequiredstringBearer accessToken

Request Schema

PropertyTypeDescription
documentType Requirednumber
(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 59number
(integer)
The value is able to GET by go to section MyCompany > Bank Channel > Get list all contacts (link) or Get contacts (link),the field name is id
contactName Required when documentType is 53,55,57 and 59stringThe value is able to GET by go to section MyCompany > Bank Channel > Get list 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.
bookOfAccounts Requiredarray of objectsGroup of financial transactions
debitCredit Requirednumber (integer)Define type of transaction as a debit or credit
1 = Debit
3 = Credit
chartOfAccountId Requirednumber (integer)Chart of account id
The value is able to GET by go to Get list chart of accounts (link)
value Requirednumber (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 Draft",
"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
data objectDocument 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
documentType number (integer)Type of the journal entry
debitnumber (decimal)Total debit amount
creditnumber (decimal)Total credit amount
remarksstring Remark 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
statusbooleanAction success
messagestringError message
codeintegerError code