Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

getBankTransaction API Hangs with xero-node API

Started by Martin Thompson -   in API Endpoints

Hello

I'm using xero-node - and getBankTransaction doesn't seem to be operating correctly.

I obtain a XeroClient instance which works for everything else - but it just hangs for this API. It doesn't crash or anything - just hangs as if waiting to complete.

const bt = await xero.accountingApi.getBankTransaction(mytenantid, 'a6e0efbb-328f-4dd2-b50a-d4aa9f1c1993')

Thanks
Martin


Hi martin - we've got that in the sample app the same way (https://github.com/XeroAPI/xero-node-oauth2-app/blob/43c47fef1a81406dc094db277678118aba35ca7a/src/app.ts#L401)

Just a hunch but it probably has to do with the amount of data being fetched in your production org. You can probably remedy this by adding a paging parameter or using some other filter such as if-modified-since.

We will get examples for those added to the readme asap.

https://developer.xero.com/documentation/api/banktransactions#GET
 

Christopher Knight (Xero Staff)  

Hey Martin - I wasn't able to replicate but we did find there was a series of 404 responses in our api logs for that specific bank transaction id.

Tried to do in our sample app but the response should come back as a 404
https://imgur.com/a/jinjgKK

If the issue persists you can open an issue in the node SDK on Github or get in touch with our API support directly

https://developer.xero.com/contact-xero-developer-platform-support/
 

Christopher Knight (Xero Staff)