I’m currently trying to create a new account (Chart of Accounts) via the REST API. Currently, I"m able to retrieve the list of accounts. However, when I try creating a new one, it just returns me a list of accounts instead.
Appreciate if anyone could tell me what I’m doing incorrectly would be great.
POST api/resource/Account/
Body request as below:
{
"name":"Test Account - MD",
"account_name":"Test Account",
"root_type":"Asset",
"report_type":"Balance Sheet",
"account_currency":"MYR",
"parent_account":"Current Assets - M",
"account_type":"Bank",
}
The response I got is just the list of accounts:
{
"data": [
{
"name": "Application of Funds (Assets) - M"
},
{
"name": "Current Assets - M"
},
{
"name": "Accounts Receivable - M"
},
{
"name": "Debtors - M"
},
{
"name": "Bank Accounts - M"
},
{
"name": "Bank Account - M"
},
{
"name": "Cash In Hand - M"
},
{
"name": "Cash - M"
},
{
"name": "Loans and Advances (Assets) - M"
},
{
"name": "Employee Advances - M"
},
{
"name": "Securities and Deposits - M"
},
{
"name": "Earnest Money - M"
},
{
"name": "Stock Assets - M"
},
{
"name": "Stock In Hand - M"
},
{
"name": "Tax Assets - M"
},
{
"name": "Fixed Assets - M"
},
{
"name": "Accumulated Depreciation - M"
},
{
"name": "Buildings - M"
},
{
"name": "Capital Equipments - M"
},
{
"name": "CWIP Account - M"
}
]
}