Jump to content

Sage API - Chart of Accounts - get COA by providing Category Code


Recommended Posts

Posted

Hi

As I store category code in my db, I would like to be able to return the relevant COA by providing this data (i.e. 1000) rather than the ID Sage uses (I don't have this in my system).

If I call the /coa_accounts I receive all 417 entries in my chart, but it's impossible to quickly find the code I want to verify, without reading all these results and moving from page to page until I find the matching code (or not!).

Is the above possible?

Regards

Carl.

Posted

Hi Carl,

The below will allow you to filter the coa_accounts by the region you are interested in. You would need to change the country code if it was for a different region, for example, IE for Ireland. This filter returns the 131 ledger_accounts in a default coa. 

coa_accounts?coa_template_id=SMALL_BUSINESS_GB

If all you wish to do is obtain the ledger_account using the code and confirm it is in the COA the below will work.

ledger_accounts?search=1000&attributes=included_in_chart

Thanks

Mark

 

  • Like 1
Posted

Hi Mark

No, not quite. That suggestion will reduce the number of records returned but it would be far better if something like this worked:-

https://api.accounting.sage.com/v3.1/coa_accounts?category_code=1001
https://api.accounting.sage.com/v3.1/coa_accounts?category_code=1001

And it return a single record.

I presume I'm going to have to do this the slow way!

Kind regards

Carl.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...