Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > SDKs >

getInvoices - returns empty Contact

Started by Eric Handbury -   in SDKs


I am using the xero-node SDK.

I use the getInvoices entry point, and everything works fine meaning the returned Invoice data is fine. The problem is that the Contact information for this Invoice is also returned and it is blank except for the contactID and name. I don't know what I am doing wrong as there is no parameter on the call that deals with the Contact data.

Are you using a GET invoice call for a particular invoice number/id or are you doing a generic GET invoices call?

Contact id is only returned if you call a particular invoice number/id (or numbers/ids) or if you using pagination or a status filter on the GET invoices call.

Xero Developer Centre: GET invoices

Sally C (Community Manager)  

Thanks for this, Sally.

No, this is on the getInvoices entry point of the xero-node SDK. As part of the Invoice Object, It returns an Object of the Contact associated with the Invoice. But it's all blank other than the ID and name.
So I assume that it is there just to give those 2 pieces of info. But why send back an object that is 99% blank.

Eric Handbury  

Hi Sally,

Sorry to bombard you but it seems that the data coming from the Xero SDK is quite different than the data from the base APIs. I created a stackoverflow question on this.


Eric Handbury