Xero API: Not Retrieving Full Contact Details with Invoices Endpoint

62 Views Asked by At

Hi I dont know if something wrong with my code but When I extract invoices its as if not all information is being extracted.

'm using the Xero API to extract invoice data in JSON format. While I'm able to retrieve a lot of information about the invoices themselves, I'm finding that certain nested structures, particularly within the Contact object such as Addresses, Phones, ContactGroups, and ContactPersons, always return as empty lists ([]).

Is there another parameter or setting I need to enable to retrieve the full contact details? Could this be an issue with how data is stored or configured in Xero, or is it an API limitation? Are there any workarounds or alternative endpoints I should consider to get this information? Any guidance or suggestions would be greatly appreciated!

Here's a snippet of what I'm seeing in the JSON output:

`"Contact": 
   `"ContactID": "example-id",
   "Name": "Sample Name",
   "Addresses": [],
   "Phones": [],
   "ContactGroups": [],
   "ContactPersons": [],
   ...`
}`

My query to the Xero API endpoint for invoices is set with summaryOnly as false to ensure detailed

1

There are 1 best solutions below

0
On

You can use the contact id in the response to make a GET call to the contacts endpoint or you can make a GET Invoice call with an individual id to see the full contact details