Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

API for transactions in an account for certain period

Started by Jason Tsang -   in Getting Started

Is there an api to retrieve the transactions in an account for a specific period?
Do you mean journal transactions? You could retrieve them via GET Journals,but you would need to retrieve all journals and filter out the ones you wanted to look at.

If you want to give a bit more detail as to what you are trying to do, we can see if there are other alternatives.

Ronan Quirke (Community Manager)  

The Journal API doesn't do very well here.

The Journal API works fine if the client is on a cash basis as everything are recorded to xero when it is paid. But when the client is on an accrual basis, we need to pull the unpaid invoices as well.

Basically I am trying to retrieve the transactions of an account. (e.g. something like this
Profit & Loss report-> click on the YTD value of an account)

Jason Tsang  

Hi Jason

I'm afraid there is nothing available via the API similar to that right now.
If you want to add a suggestion though, it does sound like a good idea for the future.


Ronan Quirke (Community Manager)  

I have a similar need so I'd vote for that too :-)

The naming of the journals endpoint is confusing too given the use of manual journals elsewhere...

John Milton  

Thx Ronan,

Suggestion raised here http://xero.uservoice.com/forums/5528-xero-api/suggestions/3368356-be-able-to-retrieve-account-transactions-via-the-a


Jason Tsang  

Would love to have the ability to retrieve Account Transactions Report via API

Nerizza Rebosura  

Agreed the naming is confusing; is the Journals end point for all transactions or just manual journals within the application? Transactions is probably a better end point name.

Liam Smith  

Hi Liam

My use-case was to be able to get a 'drill down' from a report (such as a balance sheet) to see the underlying *transactions* making up a balance for a given period.

But I've given up to be honest. The lack of a suitable endpoint and the nightmare that is parsing the reports retrieved from Xero made this a non-starter.

Which is a shame.

We're moving our main companies onto another platform in January.

I love, and will continue to use, Xero for smaller, simpler companies but it's not a good fit for us anymore and the API which has much potential is, in practice, very frustrating.



John Milton  

Cheers John, getting transactions from an account was my use case as well.

In my case I'm trying to match fuel transactions/items to calculate fuel tax credits.

@Xero - is there an underlying reason for not making the transactional data available? If it's not going to happen then I'd prefer to know than keep hassling you poor guys about it.

Liam Smith  

Has there been any update to this?

I am after an endpoint(s) where i can retrieve every income and expense transaction at an Account level, showing me:
> when and how much was invoiced (accrual basis), and
> when and how much was actually paid / received (cash basis).

atomic webdesign  

Any updates on this at all?

Jeronimo Cabrera  

We are looking for such an API endpoint as well. Not having it hugely complicates checks against our internal billing systems.

Alexander Azarov  

any update? really disappointed that this doesn't already exist in the API.

Jonny Leroux  

can we get an update please

Silvan Maeder  

Need this API too. pulling down journals and filter them is not efficient

Seyyed Hedayati  

I have trouble with xero.reports.get() returning an empty array (reports do exist). https://community.xero.com/developer/discussion/86923627/ I think I can work around that by getting all JournalLines and making my own BalanceSheet Report. Found this post while looking for an alternatives. Transactions endpoint may be useful. Did anyone else have trouble with xero.reports.get() returning an empty array? Using xero-node.

Jacob Silverman  

What a terrible thing that we can't retrieve account transactions. Are there other accounting software out there that can via API?

It's also terrible that we can't do automatic reconciliations.

Honey Bear Cabins  

Upvote - I need Report->Account Transactions endpoints to drill down and to show clients full tally per tracking category of an account - come on XERO please

Suba Lafendi  

Upvote for this request please.

Phocas Software  

I pull the "Account transactions" report for all transactions monthly, then manually add that to the (growing) Excel file of prior months. Would love to do this pull via the API. Can't see why that should be particularly difficult? Over 1,000 votes for this - can we at least hear why this isn't on the dev roadmap?

Rick Schultz  

retrieving accounting transactions is a basic requirement. This thread goes back to 2012 and 9 years later and still no luck. This is true of other requests. To be honest, Xero, for all their PT, just have a basic template and just want to add thousands of users, not really improve things once you are hooked. I have 29 companies on Xero and because of the inability for custom reports or the link to transactions am thinking that I may have to leave Xero, at least for all but the very smallest of clients.

David Mitchell  

well, 9 years...is it that hard?

Patrick Dong  

I'd also like this functionality, is there any update on this?

Benjamin Scicluna  

I came across this thread looking for info on GL Transactions. In our reporting app we access the journal API and build a JournalHeader and JournalLine table. This get refreshed by incremental sync. We use this to build P&L, BalanceSheet, Trial Balance incl tracking cats for divisional analysis. Works Ok.

The gotcha is the journal api returns journals records for every single edit and although this is not an issue when aggregates on account, tracking category, date etc it is an issue when we show journal detail because all these edits get seen. This edit detail is not ordered by datetime.

Has anyone come across this and have they git a work-around ?

BI4Cloud Integration  

WorkAround: I raised a question on this thread and thought I'd share what we found. The solution we arrived at was based on Xero support advise that the last JournalHeader.JournalNumber is the posted journal so we GET all the journals into our reports DB and do SQL to PARTITION and ORDER to get the last for each set. Most transactions follow this rule and it works however there are some outliers.

BI4Cloud Integration  

Thank you ReportBI4Cloud Integration, took us a while to clean up journals to get only the list of active ones, but after two weeks we finally managed to get clean and reliable transaction least from the API journal data.

Nick Dorogavtsev  

If you're still looking for assistance in your project and the issue isn't resolved yet, we will be happy to help you with your requirement as we've successfully implemented the Xero transactions report for other companies.

We are a Sydney-based company with a branch in London, UK. and we've been listed on the Xero developer website as their trusted partner. as you can see here: https://apps.xero.com/au/function/custom-made-integration

You can have a free consulting session with our experts to clarify the details of your requirements.

Please contact me via email.

Narges Aliola