How to get P&L for a Project

I’d like to the get the same ‘Project Profitability’ figures that are available in the Frontend UI when a user is looking at the detail for a Project. Simple things like total invoiced, total costs. How do I do this? I don’t see anywhere I can get these numbers easily - do I REALLY need to loop through ALL bank tx explanations to find the ones relating to a project, and if so, is there a way to query based on project id, rather than loop through potentially hundreds of thousands of transaction explanations?

Hi Glenavontech :wave:

My name is Katie, I’m one of the Support Engineers here at FreeAgent. Thank you very much for your question! I hope I can help you out.

Unfortunately, as you have seen, there is no way to get the profit and loss from the project side on the API. However, you should be able to easily calculate these yourself by finding the invoices/bills/expenses/estimates that are related to the project from their own endpoints.

For each of these end points, there is the option to pass in the project you want to search by. Example requests can be found following the below links:
Invoices
Bills
Estimates
Expenses

Using these end points should help you avoid having to loop over all your bank transactions.

I hope this helps!

Kind regards,
Katie

1 Like

Thanks Katie - I’ll take a look at that.