How to bifurcate categories for a new bill

Hi,

When I am fetching categories using https://api.freeagent.com/v2/categories, I am getting all categories. But a few of them are used while creating a new bill. How to bifurcate particular list of categories which are used while creating a new bill. In below example of Admin expense categories, Accommodation and Meals is coming in a new bill screen but Mileage is not.

{
“url”:“https://api.sandbox.freeagent.com/v2/categories/249”,
“description”:“Mileage”,
“group_description”:“Admin expenses (normally VATable)”,
“nominal_code”:“249”,
“allowable_for_tax”:true,
“tax_reporting_name”:“Car, Van and Travel Expenses”,
“auto_sales_tax_rate”:“Standard rate”
},

{
“url”:“https://api.sandbox.freeagent.com/v2/categories/285”,
“description”:“Accommodation and Meals”,
“group_description”:“Admin expenses (normally VATable)”,
“nominal_code”:“285”,
“allowable_for_tax”:true,
“tax_reporting_name”:“Car, Van and Travel Expenses”,
“auto_sales_tax_rate”:“Standard rate”
},

Please update me regarding the same as soon as possible.

Hi Nishit,

It looks like our code implements a few filters to display the category dropdown in the New Bill view, I’ll clarify them with my colleagues and get back to you as soon as I can.

Best wishes,

Ewa

Hi Nishit,

Thanks for your patience while we we looked into this query for you. The exact list of accounting categories that are acceptable when creating a new bill will partially depend on the company setup (the company type, whether they use stock, and any custom capital asset types), but in general it will include the following:
• all Admin Expense categories except Unrealized Currency Exchange Gain/Loss, Realized Currency Exchange Gain/Loss, and Mileage,
• all of the Cost of Sales categories,
• purchase accounts for all the types of capital assets (normally appearing as 602 with different subcodes, e.g. 602-1, 602-2)
• [if the company manages their stock in FreeAgent] Purchase of Stock (which corresponds to the Stock category 609 with sub-code)

I hope this helps!

Best wishes,

Ewa

Hi,

Thanks for your reply.

However this still does not help in achieving the goal of filters. as mentioned in first question.

Admin expense categories, Accommodation and Meals is coming in a new bill screen but Mileage is not.

{
“url”:“https://api.sandbox.freeagent.com/v2/categories/249”,
“description”:“Mileage”,
“group_description”:“Admin expenses (normally VATable)”,
“nominal_code”:“249”,
“allowable_for_tax”:true,
“tax_reporting_name”:“Car, Van and Travel Expenses”,
“auto_sales_tax_rate”:“Standard rate”
},

{
“url”:“https://api.sandbox.freeagent.com/v2/categories/285”,
“description”:“Accommodation and Meals”,
“group_description”:“Admin expenses (normally VATable)”,
“nominal_code”:“285”,
“allowable_for_tax”:true,
“tax_reporting_name”:“Car, Van and Travel Expenses”,
“auto_sales_tax_rate”:“Standard rate”
},

I need a solution to make a filter with categories to use to create a new bill.

Thanks

Hi Nishit,

You should be able to include logic in your application which filters the list of categories retrieved with a GET call to /v2/categories?sub_accounts=true according to the rules I mentioned in my post above.

Best wishes,

Ewa