Create Approve Journal Entry
To create a journal entry with approved status
Request
- POST /journal-entries/approve
Header Parameter
| Property | Type | Description |
|---|---|---|
| Authorization Required | string | Bearer accessToken |
Request Schema
| Property | Type | Description |
|---|---|---|
| documentTypeRequired | number (integer) | Type of the journal entry 51 = General Journal Entry 53 = Purchase Voucher 55 = Sales Voucher 57 = Payment Voucher 59 = Received Voucher |
| documentDateRequired | string | Posted 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 59 | string | 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 contactName |
| descriptionRequired | string | Description of JV |
| note | string | Note for internal notes |
| remarks | string | Remark for document |
| reference | string | Reference document. This field will not affect system document reference. |
| bookOfAccountsRequired | array of objects | Group of financial transactions |
| debitCreditRequired | number (integer) | Define type of transaction as a debit or credit 1 = Debit 3 = Credit |
| chartOfAccountIdRequired | number (integer) | Chart of account id The value is able to GET by going to Get list chart of accounts (link) |
| valueRequired | number (decimal) | Value of the transaction |
| description | string | Description 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
| Property | Type | Description |
|---|---|---|
| data | object | Document data |
| recordId | integer <int64> | Id of document |
| companyId | integer <int64> | Id of the company |
| documentSerial | string | Serial number of the document |
| status | integer | Status of the document 1 = Awaiting 5 = Approved |
| description | string | Description of JV |
| documentDate | string | Date of the document |
| createdOn | string | Date when the document is created |
| postedDate | string | Date when the document is posted. The value will be displayed as null when document status is awaiting |
| approvedOn | string | Date 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 |
| debit | number (decimal) | Total debit amount |
| credit | number (decimal) | Total credit amount |
| remarks | string | Remark for document |
| note | string | Note for internal notes |
| reference | string | Reference document. This field will not affect system document reference. |
| contactId | number (integer) | Contact id |
| contactName | string | Contact Name |
| bookOfAccounts | array of objects | Group of financial transactions |
| debitCredit | number (integer) | Type of transaction as a debit or credit 1 = Debit 3 = Credit |
| chartOfAccountId | number (integer) | Chart of account id |
| value | number (decimal) | Value of the transaction |
| rowNumber | number (integer) | Row number of the transaction |
| description | string | Description of the transaction |
| displayName | string | Name of chart of account |
| isSystemDocument | boolean | Define if the document is a system document. The value will be displayed as false when the document is created manually. |
| isLockingPeriod | boolean | Define if the document is in the locking period. |
| referenceDocuments | array of objects | Group of document reference by the system |
| documentId | number (integer) | Document id of the reference document |
| documentType | number (integer) | Document type of the reference document |
| documentSerial | string | Document serial number of the reference document |
| status | boolean | Action success |
| message | string | Error message |
| code | integer | Error code |