How to get chart of account tree information using rest api in .net

How to get chart of account tree information using rest api in .net.

Could you please help me with api references to get all account list tree and How to apply filter for that tree

Hi, @pusarlasandeep

To get the chart of accounts tree information using the Frappe REST API in .NET, you can use the following endpoint:

GET /api/resource/Account

This endpoint returns a list of all accounts in the chart of accounts tree, along with their details. You can apply filters to this endpoint to retrieve specific accounts based on various criteria.

To apply a filter to this endpoint, you can append a query string to the URL with the filter criteria. For example, to retrieve all accounts with an account type of “Expense”, you can use the following URL:

GET /api/resource/Account?filters=[["Account","account_type","=","Expense"]]

Hope this will help you out.

Thank you.

Hi Vinoth,

Thanks for your reply, Now i am able to fetch accounts information, But the above api is returning only 12 accounts only, not All account, when i apply filter with account type.
Could you please suggest.

Thanks,
SandeepKumar.P

Hi,

You can modify the limit of the API response by adding the limit_page_length parameter to the API URL. For example, to retrieve all accounts with an account type of “Expense”, you can use the following URL with a limit_page_length value of 1000:

GET /api/resource/Account?filters=[["Account","account_type","=","Expense"]]&limit_page_length=1000

Hope this will help you out.

Thank you.