Show TrackingOptionID in LineItem in Invoices API (and other endpoints)
The Invoices endpoint in particular (and many others in general), do not include the TrackingOptionID in the data set. Instead, they generally provide only the Name, Option and TrackingCategoryID.
It is really important for being able to use "joins" on the data to incl;ude the TrackingOptionID .
-
IT Admin
commented
I posted a comment previously, but it's not showing. Xero support staff say they can see in the back-end that I posted, but don't know why it's not showing.
In any case, I've added my vote. It's pretty frustrating that this issue was raised 29 months ago and Xero hasn't fixed it. I think this should be considered a bug, not a feature request. The API's tracking info does not provide any reliable key to link tracking back to financial transactions. The only field given is name, which can be changed in the UI. This means old transactions will be lost, and, if in future a prior tracking category option name gets re-used, transactions will be linked to the wrong category option. In short - the data coming through the API are unreliable (and the reports we are building are unreliable as a result).
Having been a developer for 15+ years, this is surely a 15 minute fix for Xero developers. The field already exists. Just add a comma and the field name to each API that already includes tracking category info. Seriously, that's all. It shouldn't break anyone's existing usage of those APIs.
-
Rafael Echeverria commented
We would also like to get this done
-
Neill Skelly
commented
I would like for the GET Invoices endpoint to return tracking option Ids on line items, for example: GET https://api.xero.com/api.xro/2.0/Invoices?page=1
Tracking options are returned when getting a single invoice, for example: GET https://api.xero.com/api.xro/2.0/Invoices/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-
Richard Armstrong
commented
The users can edit the options which means the text/ option can change over time even if the optionID is unchanged. If externally we can only use option then any relationships with external data using the categories become corrupted.